Blobrunner
reversing shellcode
Ham shellcode’u PE olmadan çalıştırmak için Blobrunner (veya benzeri loader) kullanılır. Debugger attach ile API ve C2 gözlenir.
Metodoloji
Section titled “Metodoloji”-
Shellcode blob’unu dosyaya çıkar (offset/length bil).
-
Blobrunner ile map et; breakpoint için debugger bağla.
-
Network/API çağrılarını izle.
-
Gerekirse emülasyon (scdbg/speakeasy) ile karşılaştır.
Hazırlık
Section titled “Hazırlık”# PE içinden shellcode kesdd if=sample.exe bs=1 skip=OFFSET count=LEN of=sc.binxxd sc.bin | headfile sc.binent sc.bin 2>/dev/nullBlobrunner
Section titled “Blobrunner”BlobRunner.exe sc.bin# x64dbg attach → bp VirtualAlloc / connect / CreateFileEntry: allocated RWX region; rip/eip shellcode başlangıcıAlternatifler
Section titled “Alternatifler”scdbg -f sc.bin -s -1speakeasy -r -t sc.bin# minimal loader (lab)import ctypesbuf=open('sc.bin','rb').read()r=ctypes.windll.kernel32.VirtualAlloc(0,len(buf),0x3000,0x40)ctypes.memmove(r,buf,len(buf))ctypes.cast(r,ctypes.CFUNCTYPE(None))()# Linuxgcc -z execstack host.c -o host && ./host sc.binChecklist
Section titled “Checklist”[ ] shellcode offset doğrulandı[ ] loader ile map/execute edildi[ ] debugger/API iz alındı[ ] emülasyon ile davranış karşılaştırıldı