Created
April 4, 2017 14:11
-
-
Save hasherezade/ca96912986d393031b3526528bedf5e1 to your computer and use it in GitHub Desktop.
Defensive checks from Moker Trojan
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <Windows.h> | |
| #include <stdio.h> | |
| bool isVBox() | |
| { | |
| HKEY hKey = NULL; | |
| RegOpenKeyA(HKEY_LOCAL_MACHINE, "HARDWARE\\ACPI\\DSDT\\VBOX__", &hKey); | |
| if (hKey != NULL) { | |
| RegCloseKey(hKey); | |
| return true; | |
| } | |
| return false; | |
| } | |
| bool isTrusterRapportInstalled() | |
| { | |
| HKEY hKey = NULL; | |
| RegOpenKeyA(HKEY_CURRENT_USER, "Software\\Trusteer\\Rapport", &hKey); | |
| if (hKey != NULL) { | |
| RegCloseKey(hKey); | |
| return true; | |
| } | |
| return false; | |
| } | |
| int main() | |
| { | |
| size_t score = 0; | |
| if (isVBox()) { | |
| printf("[+] VM detected by the key: HKLM\\HARDWARE\\ACPI\\DSDT\\VBOX__\n"); | |
| score++; | |
| } | |
| if (isTrusterRapportInstalled()) { | |
| printf("[+] Truster Rapport detected by the key: HKCU\\Software\\Trusteer\\Rapport\n"); | |
| score++; | |
| } | |
| printf("---\nTotal score: %d\n", score); | |
| if (score == 0) { | |
| printf("Clean!\n"); | |
| } else { | |
| printf("Not clean!\n"); | |
| } | |
| system("pause"); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment