Created
June 18, 2015 09:44
-
-
Save evernick/d78386b0f12705293a96 to your computer and use it in GitHub Desktop.
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 anti_debug() | |
{ | |
HKEY hKey; | |
int i=0; | |
if( RegOpenKeyEx (HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Enum\\IDE\\DiskVMware_Virtual_IDE_Hard_Drive___________00000001", 0L, KEY_READ , &hKey) ) | |
return 0; | |
return 1; | |
} | |
int main(int argc, char **argv) | |
{ | |
if(anti_debug()) | |
printf("VM Detected\n"); | |
else | |
printf("No VM...\n"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment