free
binexp heap
free bellek güvenliği istismarı notudur. Protections ölç, primitif kur, kontrol akışını ele geçir.
Metodoloji
Section titled “Metodoloji”-
checksec + mimari + crash yüzeyini çıkar.
-
Leak veya write primitifini kur.
-
ROP/hook/AW2E ile kontrol akışı al.
-
Shell veya flag’i stabilize et.
Binary profil
Section titled “Binary profil”file ./vulnchecksec --file=./vulnpwn checksec ./vulnreadelf -l ./vuln | rg -i 'gnu_stack|interp'readelf -S ./vuln | rg -i 'got|plt|bss|fini'gdb -q ./vulnHeap primitif
Section titled “Heap primitif”echo "gdb/pwndbg: heap / bins / chunks"from pwn import *p=process('./vuln')def alloc(sz,data=b'A'): p.sendlineafter(b'>', b'1'); p.sendlineafter(b':', str(sz).encode()); p.sendafter(b':', data)def free(idx): p.sendlineafter(b'>', b'2'); p.sendlineafter(b':', str(idx).encode())Exploit iskeleti
Section titled “Exploit iskeleti”from pwn import *context.binary=ell=ELF('./vuln')p=process('./vuln')# p=remote('TARGET',1337)# leak → calc → write → controlp.interactive()python3 exploit.pyChecklist
Section titled “Checklist”[ ] fingerprint / profil alındı[ ] primitif veya erişim doğrulandı[ ] PoC etkiyi gösterdi[ ] kanıt paketlendi[ ] sonraki pivot not edildi