An attempt to run such instructions in user-mode will generate an exception. VMWare uses IN instruction in a special port (VX) as an interface between VMM. So, such operation will not generate an exception if executed in user-mode inside a VMWare virtual machine.


Detection Rules

    name: execute anti-VM instructions
    namespace: anti-analysis/anti-vm/vm-detection
    scope: basic block
      - Defense Evasion::Virtualization/Sandbox Evasion::System Checks [T1497.001]
      - Anti-Behavioral Analysis::Virtual Machine Detection::Instruction Testing [B0009.029]
      - Practical Malware Analysis Lab 17-03.exe_:0x401A80
    - or:
      - mnemonic: sdit
      - mnemonic: sgdt
      - mnemonic: sldt
      - mnemonic: smsw
      - mnemonic: str
      - mnemonic: in
      - mnemonic: cpuid
      - mnemonic: vpcext

Additional Resources

Subscribe to our Newsletter

The information entered into this form is mandatory. It will be subjected to computer processing. It is processed by computer in order to support our users and readers. The recipients of the data will be :

According to the Data Protection Act of January 6th, 1978, you have at any time, a right of access to and rectification of all of your personal data. If you wish to exercise this right and gain access to your personal data, please write to Thomas Roccia at

You may also oppose, for legitimate reasons, the processing of your personal data.