가상 머신에서 프로그램이 실행되는지 여부를 감지하는 인라인 어셈블러 기능이 있습니다. 하지만 64 비트 인라인 어셈블리에서는 더 이상 x64 내장 함수를 사용할 수 없습니다. 그것을 탐지하는 또 다른 방법이 있습니까? 여기 가상화 검색
코드는 32 비트 VM웨어 작동부울 IsInsideVMWare (공극) {
부울 RC = TRUE;
__try
{
__asm
{
push edx
push ecx
push ebx
mov eax, 'VMXh'
mov ebx, 0 // any value but not the MAGIC VALUE
mov ecx, 10 // get VMWare version
mov edx, 'VX' // port number
in eax, dx // read port
// on return EAX returns the VERSION
cmp ebx, 'VMXh' // is it a reply from VMWare?
setz [rc] // set return value
pop ebx
pop ecx
pop edx
}
} __except (필터 (GetExceptionCode()))
{ RC = 거짓; }
return rc; }