Re: VBoxAntiVMDetectHardened mitigation X64 only(03/01/15)
PostPosted:Sun Jan 04, 2015 1:04 pm
Are you considering releasing a x86 version?
A forum for reverse engineering, OS internals and malware analysis
https://www.kernelmode.info/forum/
EP_X0FF wrote:Your VirtualBox version (including build number) and how do you start VM, all steps (how do you run loader etc, is it loaded driver etc).4.3.20 r96997.
And I think it's because of this partThis was note to people who want to patch DSDT table manually (for future versions of VBox). Table in 1st post attach already with fixed checksum.
Launched loader.exe from my downloads folder though admin cmd with parameters '-l C:\VBoxData', so "C:\Users\user\Downloads\VBox\loader.exe -l C:\VBoxData".What is the "C:\VBoxData"?
static unsigned char TsmiPatchDataValue[143] = {then it must be saved as binary file, so you have to convert this to bin. Or use attached.
0x8D, 0x21, 0x03, 0x00, 0x02, 0x51, 0x52, 0xf4, 0x23, 0x03, 0x00, 0x02, 0x51, 0x52, 0x47, 0x25,
0x03, 0x00, 0x02, 0x51, 0x52, 0x72, 0x28, 0x03, 0x00, 0x02, 0x51, 0x52, 0x14, 0x2a, 0x03, 0x00,
0x02, 0x51, 0x52, 0x48, 0x2b, 0x03, 0x00, 0x02, 0x51, 0x52, 0x30, 0xbf, 0x03, 0x00, 0x02, 0x51,
0x52, 0x98, 0xbf, 0x11, 0x00, 0x08, 0x4D, 0x61, 0x67, 0x69, 0x63, 0x61, 0x6C, 0x52, 0xe7, 0x95,
0x11, 0x00, 0x1B, 0x44, 0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00,
0x53, 0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00, 0x00, 0xB6, 0xD8,
0x00, 0x00, 0x02, 0xDE, 0x10, 0x26, 0x20, 0x01, 0x00, 0x02, 0xDE, 0x10, 0x0e, 0xF7, 0x01, 0x00,
0x02, 0xDE, 0x10, 0xf1, 0x1e, 0x04, 0x00, 0x02, 0xDE, 0x10, 0x05, 0x1f, 0x04, 0x00, 0x02, 0xAD,
0xDE, 0x01, 0xF7, 0x01, 0x00, 0x02, 0xDE, 0x10, 0x0e, 0xF7, 0x01, 0x00, 0x02, 0xC0, 0xC0
};
Hunter wrote:Are you considering releasing a x86 version?No, however you can fork from sources and adapt it for x86, this will require removal of dsefix part and creating patch table for x86 vboxdd.dll.
EP_X0FF wrote:Great description, thanks.data folder is this:
ThisLaunched loader.exe from my downloads folder though admin cmd with parameters '-l C:\VBoxData', so "C:\Users\user\Downloads\VBox\loader.exe -l C:\VBoxData".What is the "C:\VBoxData"?
if it this tablestatic unsigned char TsmiPatchDataValue[143] = {then it must be saved as binary file, so you have to convert this to bin. Or use attached.
0x8D, 0x21, 0x03, 0x00, 0x02, 0x51, 0x52, 0xf4, 0x23, 0x03, 0x00, 0x02, 0x51, 0x52, 0x47, 0x25,
0x03, 0x00, 0x02, 0x51, 0x52, 0x72, 0x28, 0x03, 0x00, 0x02, 0x51, 0x52, 0x14, 0x2a, 0x03, 0x00,
0x02, 0x51, 0x52, 0x48, 0x2b, 0x03, 0x00, 0x02, 0x51, 0x52, 0x30, 0xbf, 0x03, 0x00, 0x02, 0x51,
0x52, 0x98, 0xbf, 0x11, 0x00, 0x08, 0x4D, 0x61, 0x67, 0x69, 0x63, 0x61, 0x6C, 0x52, 0xe7, 0x95,
0x11, 0x00, 0x1B, 0x44, 0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00,
0x53, 0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00, 0x00, 0xB6, 0xD8,
0x00, 0x00, 0x02, 0xDE, 0x10, 0x26, 0x20, 0x01, 0x00, 0x02, 0xDE, 0x10, 0x0e, 0xF7, 0x01, 0x00,
0x02, 0xDE, 0x10, 0xf1, 0x1e, 0x04, 0x00, 0x02, 0xDE, 0x10, 0x05, 0x1f, 0x04, 0x00, 0x02, 0xAD,
0xDE, 0x01, 0xF7, 0x01, 0x00, 0x02, 0xDE, 0x10, 0x0e, 0xF7, 0x01, 0x00, 0x02, 0xC0, 0xC0
};
Edit:
I see you use 96997 build, while we worked with 96996 build. There seems was stealth VBox update. Offsets maybe be broken, that's the reason why it crash.
EP_X0FF wrote:@TETYYSs
you seems don't understand the purpose of 2nd parameter.
It must point to patch table file, not directory or whatever.
e.g.
C:\Users\user\Downloads\VBox\loader.exe -l C:\VBoxData\output.bin
where output.bin is translated to binary patch table from rinn post (attached in my previous post).
TETYYSs wrote:Thanks, totally works! Also, used 96996 build, not sure if it'll work on 96997, but who cares nowI checked VBoxDD from 96997 and it is the same as in 96996.
EP_X0FF wrote:Also latest rinn posted table contain 1 duplicate entry (last one) :)
typedef struct _BINARY_PATCH_BLOCK {
ULONG VirtualOffset;
UCHAR DataLength;
UCHAR Data[1];
} BINARY_PATCH_BLOCK, *PBINARY_PATCH_BLOCK;
typedef struct _BINARY_PATCH_BLOCK_INTERNAL {
ULONG VirtualOffset;
UCHAR DataLength;
UCHAR Data[32];
} BINARY_PATCH_BLOCK_INTERNAL, *PBINARY_PATCH_BLOCK_INTERNAL;
#define NUMBER_OF_PATCHES 15
static BINARY_PATCH_BLOCK_INTERNAL TempDataArray[NUMBER_OF_PATCHES] = {
{ 0x3218d, 2, { 0x51, 0x52 } },
{ 0x323f4, 2, { 0x51, 0x52 } },
{ 0x32547, 2, { 0x51, 0x52 } },
{ 0x32872, 2, { 0x51, 0x52 } },
{ 0x32a14, 2, { 0x51, 0x52 } },
{ 0x32b48, 2, { 0x51, 0x52 } },
{ 0x3bf30, 2, { 0x51, 0x52 } },
{ 0x11bf98, 8, { 0x4D, 0x61, 0x67, 0x69, 0x63, 0x61, 0x6C, 0x52 } },
{ 0x1195e7, 0x1b, {
0x44, 0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00, 0x53,
0x73, 0x64, 0x74, 0x46, 0x69, 0x6C, 0x65, 0x50, 0x61, 0x74, 0x68, 0x00, 0x00}
},
{ 0xd8b6, 2, { 0xDE, 0x10 } },
{ 0x12026, 2, { 0xDE, 0x10 } },
{ 0x1f70e, 2, { 0xDE, 0x10 } },
{ 0x41ef1, 2, { 0xDE, 0x10 } },
{ 0x41f05, 2, { 0xAD, 0xDE } },
{ 0x1f701, 2, { 0xDE, 0x10 } }
};
VOID BuildTable()
{
int i;
PUCHAR Table;
DWORD dwTableSize, dwEntrySize;
TCHAR szOutputFileName[MAX_PATH * 2];
Table = (PUCHAR)LocalAlloc(LPTR, 0x1000);
if (Table == NULL) return;
dwTableSize = 0;
for (i = 0; i < NUMBER_OF_PATCHES; i++) {
dwEntrySize = sizeof(ULONG) + sizeof(UCHAR) + (sizeof(UCHAR) * TempDataArray[i].DataLength);
if (dwTableSize + dwEntrySize > 0x1000) break;
RtlCopyMemory(&Table[dwTableSize], &TempDataArray[i], dwEntrySize);
dwTableSize += dwEntrySize;
}
GetCurrentDirectory(MAX_PATH, szOutputFileName);
lstrcat(szOutputFileName, TEXT("\\output.bin"));
WriteBufferToFile(Table, dwTableSize, szOutputFileName);
LocalFree(HLOCAL(Table));
}