Skip to content

Commit

Permalink
Merge pull request #19 from jgajek/MSVC
Browse files Browse the repository at this point in the history
Additional registry fakery for VMware
  • Loading branch information
spender-sandbox authored Sep 26, 2016
2 parents db1765e + 6226ef3 commit d5e4237
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ void perform_ascii_registry_fakery(PWCHAR keypath, LPVOID Data, ULONG DataLength
replace_string_in_buf(Data, DataLength, "Xeon(R) ", "Core(TM)");
}

if (!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemManufacturer") ||
!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemProductName")) {
replace_string_in_buf(Data, DataLength, "VMware", "Lenovo");
replace_string_in_buf(Data, DataLength, "Virtual Platform", "X230 ThinkPad PC");
}

// fake the manufacturer name
if (!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\SystemInformation\\SystemManufacturer"))
replace_string_in_buf(Data, DataLength, "QEMU", "DELL");
Expand Down Expand Up @@ -389,6 +395,12 @@ void perform_unicode_registry_fakery(PWCHAR keypath, LPVOID Data, ULONG DataLeng
replace_wstring_in_buf(Data, DataLength, L"Xeon(R) ", L"Core(TM)");
}

if (!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemManufacturer") ||
!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS\\SystemProductName")) {
replace_wstring_in_buf(Data, DataLength, L"VMware", L"Lenovo");
replace_wstring_in_buf(Data, DataLength, L"Virtual Platform", L"X230 ThinkPad PC");
}

// fake the manufacturer name
if (!wcsicmp(keypath, L"HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Control\\SystemInformation\\SystemManufacturer"))
replace_wstring_in_buf(Data, DataLength / sizeof(wchar_t), L"QEMU", L"DELL");
Expand Down

0 comments on commit d5e4237

Please sign in to comment.