Parsi Coders
VM Detection UDF - نسخه قابل چاپ

+- Parsi Coders (http://parsicoders.com)
+-- انجمن: Cracking / Anti Crack (http://parsicoders.com/forumdisplay.php?fid=75)
+--- انجمن: Anti Debug (http://parsicoders.com/forumdisplay.php?fid=76)
+--- موضوع: VM Detection UDF (/showthread.php?tid=826)



VM Detection UDF - Amin_Mansouri - 08-30-2011

small UDF with 3 functions.

These are:
_AntiVirtualPC ()
_AntiVirtualBox ()
_AntiVmWare ()



کد:
#include-once

;=================================================================================================
; AutoIt Version:    3.3.6.1
; Language:            English
; Platform:            All Windows
; Author:            killax2x
;=================================================================================================
;
; Functions:
;
;=================================================================================================
; Function:            _AntiVirtualPC()
; Description:
; Return Value(s):  Returns 1 when the Script is in a Virtual PC.
;                    Returns 0 when the Script is not in a Virtual PC.
; Author(s):        killax2x
;=================================================================================================
; Function:            _AntiVirtualBox()
; Description:
; Return Value(s):  Returns 1 when the Script is in a Virtual Box.
;                    Returns 0 when the Script is not in a Virtual Box.
; Author(s):        killax2x
;=================================================================================================
; Function:            _AntiVmWare()
; Description:
; Return Value(s):  Returns 1 when the Script is in a VmWare.
;                    Returns 0 when the Script is not in a VmWare.
; Author(s):        killax2x
;=================================================================================================


Global Const $crtset = RegEnumKey("HKEY_LOCAL_MACHINE\SYSTEM", 2)
Global Const $vide = "HKEY_LOCAL_MACHINE\SYSTEM\" & $crtset & "\Control\Class\{4D36E968-E325-11CE-BFC1-08002BE10318}\0000"
Global Const $read = RegRead($vide, "driverdesc")

If _AntiVirtualPC() = 1 Then
    MsgBox(0,"","Detected!")
EndIf

Func _AntiVirtualBox()
    If $read = "VirtualBox Graphics Adapter" Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc

Func _AntiVirtualPC()
        If $read = "VM Additions S3 Trio32/64" Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc

Func _AntiVmWare()
        If $read = "VMware SVGA II" Then
        Return 1
    Else
        Return 0
    EndIf
EndFunc