Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static char * lpShellcode = "\x55\x8B\xEC\x51\x53\x56\x57\xE9\xFF\xFF\xFF\xFF";
- __declspec(naked) static void TrampolineIntoAbyss(uint32_t p_Mode, void * p_Arg1, void * p_Arg2, void * p_Arg3)
- {
- __asm PUSH EBP
- __asm MOV EBP, ESP
- __asm PUSH ECX
- __asm PUSH EBX
- __asm PUSH ESI
- __asm PUSH EDI
- if (p_Mode == 0)
- {
- // Shutdown everything in here
- }
- __asm POP EDI
- __asm POP ESI
- __asm POP EBX
- __asm POP ECX
- __asm ESP, EBP
- __asm POP EBP
- __asm JMP lpShellcode
- }
- coclass_implementation()
- {
- auto lpAddress = ::GetModuleHandleA("VBA6.DLL");
- if (lpAddress != nullptr)
- {
- uint8_t * lpFunction = (uint8_t * ) ::GetProcAddress(lpAddress, "EbSetMode");
- * lpFunction = 0xE9;
- * (uint32_t *) (lpFunction + 1) = (uint32_t) & TrampolineIntoAbyss;
- * (uint32_t *) (lpShellcode + 8) = (uint32_t) lpFunction + 7;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement