unsigned char hexData[14] = {
0x31, 0xC0, 0xBB, 0x42, 0x24, 0x80, 0x7C, 0x66,
0xB8, 0x88, 0x13, 0x50, 0xFF, 0xD3
};
void dummy(){}
int main()
{
void *code_ptr = &dummy;
PDWORD OP;
__asm
{
call code_ptr
add code_ptr,10h
}
VirtualProtect(code_ptr, 14, PAGE_EXECUTE_WRITECOPY, OP);
memcpy(code_ptr, hexData, 14);
.
.
.
Run Code Online (Sandbox Code Playgroud)
并在拆卸
_LoadLibraryA@4:
003C11E0 jmp _LoadLibraryA@4 (03C1430h)
dummy:
003C11E5 jmp dummy (03C1A80h)
_printf:
003C11EA jmp _printf (03C1436h)
_VirtualProtect@16:
003C11EF jmp _VirtualProtect@16 (03C143Ch)
003C11F4 int 3
003C11F5 int 3
003C11F6 int 3
003C11F7 int …Run Code Online (Sandbox Code Playgroud)