Bright side
Dark Side
Malwares may detect virtualized environments
Malwares may detect virtualized environments
Games may detect virtualized environments
Games may detect virtualized environments
Is it easier to hide or to detect ?
Sandbox environments have to
Each processor have its own IDT
Physical | Virtual |
---|---|
0x80000000 |
0xc0000000 |
[2004, J.Rutkowska]
CPU Informations
VM Entry example
Integrated instructions
Not very accurate
Poor compatibility
Rely on external protocol
Ratio
Processors does not produce expected behavior
Démo
WIN
dad@gambas ~/Projets/DetectHypervisor % ./detect2
000000: 50 65 6e 74 Pent
000000: 69 75 6d 28 ium(
000000: 52 29 20 44 R) D
000000: 75 61 6c 2d ual-
[+] IDT base: 819da000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 0c00e3bd bit:0
MSW: 8005003b
Ratio: 207.865799
dad@debian:~$ ./detect2
000000: 50 65 6e 74 Pent
000000: 69 75 6d 28 ium(
000000: 52 29 20 44 R) D
000000: 75 61 6c 2d ual-
[+] IDT base: 8172d000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 8c202201 bit:1
MSW: 8005003b
Ratio: 1588.099243
ubuntu@ubuntu:~$ ./detect2
000000: 49 6e 74 65 Inte
000000: 6c 28 52 29 l(R)
000000: 20 58 65 6f Xeo
000000: 6e 28 52 29 n(R)
[+] IDT base: 81dd9000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 82982203 bit:1
MSW: 8005003b
Ratio: 615.849609
Thanks Pascal!
root@debian:~# ./detect2
000000: 51 45 4d 55 QEMU
000000: 20 56 69 72 Vir
000000: 74 75 61 6c tual
000000: 20 43 50 55 CPU
[+] IDT base: 8172d000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 80802001 bit:1
MSW: cccc003b
Ratio: 3.352355
root@debby:~# ./detect2
000000: 51 45 4d 55 QEMU
000000: 20 56 69 72 Vir
000000: 74 75 61 6c tual
000000: 20 43 50 55 CPU
[+] IDT base: 81738000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 80802001 bit:1
MSW: 8005003b
Ratio: 901.177551
root@Xenny:~# ./detect2
000000: 49 6e 74 65 Inte
000000: 6c 28 52 29 l(R)
000000: 20 58 65 6f Xeo
000000: 6e 28 52 29 n(R)
[+] IDT base: 8172d000
[+] SIDT[5] : 0x81
[+] SIDT[5] : 0x81
cpuid 1 ecx: 81b82221 bit:1
MSW: 8005003b
Ratio: 681.817383
Thanks Alex!
in progress
VM detection categories
[T.Garfinkel]
[T.Raffetserder]
[X.Chen, and M.Lindorfer]
20 000 in few hours
[A.Nguyen and E.Keller]
Physical virtualization
Awesome part: Free code available! (!Ether)
Virtualize without Hypervisors
Slow CPUs
Calling thousands of VMEXITs is doubious
…Set up a threshold, and hide VMM when hit
Less VMEXITs
toward hypervisor into the CPU
Detect ether!