Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

New HideVM plugin #1499

Merged
merged 5 commits into from
Sep 6, 2022
Merged

New HideVM plugin #1499

merged 5 commits into from
Sep 6, 2022

Conversation

blsvntn
Copy link
Contributor

@blsvntn blsvntn commented Aug 12, 2022

Hello! This plugin is designed to impove stealth of Windows VM while analyzing malware.

  1. It advances boot time by modifying KUSER_SHARED_DATA.TickCount and KUSER_SHARED_DATA.TickCountMultiplier fields;
  2. Hooks IWbemServices::ExecQuery to spoof WQL-queries to WMI objects that aren't present on VM. Name of the requested object is overwritten to Win32_BIOS which is alway presented. It is done to bypass checks like in al-khaser project (https://github.com/LordNoteworthy/al-khaser/blob/06399c26a488c1bbdea29fe2023cf5360b640bb7/al-khaser/AntiVM/Generic.cpp#L1673)
  3. Hooks NtDeviceIoControlFile syscall in 3 stages to provide fake data when MSAcpi_ThermalZoneTemperature object is requested to check current temperature.

@drakvuf-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

@tklengyel
Copy link
Owner

@drakvuf-jenkins Test this please

1 similar comment
@tklengyel
Copy link
Owner

@drakvuf-jenkins Test this please

Copy link
Contributor

@BonusPlay BonusPlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the code, only part with hardcoded responses is worth changing.

Comment on lines +175 to +190
const uint8_t binThermalZoneGuid[] = {0xC0, 0x18, 0xBC, 0xA1, 0xC8, 0xA7, 0xD1, 0x11, 0xBF, 0x3C, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0x10};
const uint8_t WMI_data[] = {0xD4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x45, 0xCA, 0x73, 0x47, 0xBB, 0xC9, 0xD7, 0x01, 0xC0, 0x18, 0xBC, 0xA1, 0xC8, 0xA7, 0xD1, 0x11,
0xBF, 0x3C, 0x00, 0xA0, 0xC9, 0x06, 0x29, 0x10, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x01, 0x00,
0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00,
0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x0C, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x94, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x30, 0x00, 0x41, 0x00, 0x43, 0x00, 0x50, 0x00,
0x49, 0x00, 0x5C, 0x00, 0x54, 0x00, 0x68, 0x00, 0x65, 0x00, 0x72, 0x00, 0x6D, 0x00, 0x61, 0x00,
0x6C, 0x00, 0x5A, 0x00, 0x6F, 0x00, 0x6E, 0x00, 0x65, 0x00, 0x5C, 0x00, 0x54, 0x00, 0x48, 0x00,
0x52, 0x00, 0x4D, 0x00, 0x5F, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fingerprintable af

@tklengyel
Copy link
Owner

@drakvuf-jenkins Test this please

@tklengyel
Copy link
Owner

@blsvntn once review comments are resolved we are good to merge

@disaykin
Copy link
Contributor

disaykin commented Sep 5, 2022

@tklengyel I already use this plugin and I think this PR is good enough to merge.

@tklengyel
Copy link
Owner

Sgtm

@tklengyel tklengyel merged commit 1ad2b94 into tklengyel:master Sep 6, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants