Skip to content

解析妨害回避

t-tani edited this page Oct 28, 2019 · 1 revision

解析妨害回避のためのVM参考設定例

CPU ブランド名

CPUのブランド名に含まれる文字列による環境検知が行われる。

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記

Intel Core i5

cpuid.80000002.0.eax = "0110:0101:0111:0100:0110:1110:0100:1001"
cpuid.80000002.0.ebx = "0010:1001:0101:0010:0010:1000:0110:1100"
cpuid.80000002.0.ecx = "0111:0010:0110:1111:0100:0011:0010:0000"
cpuid.80000002.0.edx = "0100:1101:0101:0100:0010:1000:0110:0101"
cpuid.80000003.0.eax = "0011:0101:0110:1001:0010:0000:0010:1001"
cpuid.80000003.0.ebx = "0011:0101:0101:1001:0011:0111:0010:1101"
cpuid.80000003.0.ecx = "0101:0000:0100:0011:0010:0000:0011:0100"
cpuid.80000003.0.edx = "0010:0000:0100:0000:0010:0000:0101:0101"
cpuid.80000004.0.eax = "0011:0000:0011:0010:0010:1110:0011:0001"
cpuid.80000004.0.ebx = "0000:0000:0111:1010:0100:1000:0100:0111"
cpuid.80000004.0.ecx = "0000:0000:0000:0000:0000:0000:0000:0000"
cpuid.80000004.0.edx = "0000:0000:0000:0000:0000:0000:0000:0000"

Intel XEON (非推奨)

cpuid.80000002.0.eax = "0110:0101:0111:0100:0110:1110:0100:1001"
cpuid.80000002.0.ebx = "0010:1001:0101:0010:0010:1000:0110:1100"
cpuid.80000002.0.ecx = "0110:1111:0110:0101:0101:1000:0010:0000"
cpuid.80000002.0.edx = "0010:1001:0101:0010:0010:1000:0110:1110"
cpuid.80000003.0.eax = "0101:0101:0101:0000:0100:0011:0010:0000"
cpuid.80000003.0.ebx = "0010:0000:0010:0000:0010:0000:0010:0000"
cpuid.80000003.0.ecx = "0010:0000:0010:0000:0010:0000:0010:0000"
cpuid.80000003.0.edx = "0101:1000:0010:0000:0010:0000:0010:0000"
cpuid.80000004.0.eax = "0010:0101:0011:0111:0011:0110:0011:0101"
cpuid.80000004.0.ebx = "0010:0000:0100:0000:0010:0000:0010:0000"
cpuid.80000004.0.ecx = "0011:0111:0011:0000:0010:1110:0011:0011"
cpuid.80000004.0.edx = "0000:0000:0111:1010:0100:1000:0100:0111"

VirtualBox

TBU

仮想CPU

EAX=1__cpuid が実行された際にCPUの仮想化に関する情報を取得により、環境検知が行われる。
返り値の31bitが 0 の場合は物理、1の場合は仮想となっている。

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
cpuid.1.ecx = "0---:----:----:----:----:----:----:----"

VirtualBox

TBU

Hypervisor environments

Hypervisorの環境情報とMCE(Machine Check Exception) によって環境検知が行われる。

VMware

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
mce.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"

Hypervisor vendor detection

Hypervisorのベンダー名によって検知が行われる。 EAX=40000000__cpuid の呼び出しが行われると EAXEBXECXにHypervisorのベンダー名が返される。

例:

  • Microsoft: “Microsoft HV”
  • VMware : “VMwareVMware”

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
cpuid.40000000.0.eax = "0000:0000:0000:0000:0000:0000:0000:0000"

VirtualBox

TBU

Streaming SIMD Extensions 3 (SSE3)

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
monitor_control.enable_fullcpuid = "TURE"

VirtualBox

TBU

MAC address

以下のMACアドレスが設定されている場合には VMWare の環境であると検知される。

00:05:69:xx:xx:xx // VMWare, Inc.
00:0c:29:xx:xx:xx // VMWare, Inc.
00:1C:14:xx:xx:xx // VMWare, Inc.
00:50:56:xx:xx:xx // VMWare, Inc.

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
ethernet0.address = "00:11:56:35:57:58"

VirtualBox

TBU

SCSI device name

SCSIデバイス名に "vmware" や "vbox"、 "qemu" 、"VirtualHD" が含まれていると検知される。

VMWare

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
scsi0:0.productID = "Toshiba SSD"
scsi0:0.vendorID = "Toshiba"

VirtualBox

TBU

VMware tools backdoor channel

VMware toolsのバックドアチャンネルが環境検知に利用される。

VMware

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
monitor_control.restrict_backdoor = "TRUE"

VMware monitoring functions

VMware

  • Step 1. Shutdown the VM
  • Step 2. Confirm your permition
  • Step 3. Back up the .vmx file
  • Step 4. Insert following settings into .vmx file
monitor_control.disable_directexec = "TRUE"
monitor_control.disable_chksimd = "TRUE"
monitor_control.disable_ntreloc = "TRUE"
monitor_control.disable_selfmod = "TRUE"
monitor_control.disable_reloc = "TRUE"
monitor_control.disable_btinout = "TRUE"
monitor_control.disable_btmemspace = "TRUE"
monitor_control.disable_btpriv = "TRUE"
monitor_control.disable_btseg = "TRUE"

BIOS情報

仮想基盤のBIOS情報を使って仮想検知が行われる。

VMware

  • Step 1. VMの停止
  • Step 2. VMXファイルの編集権限の確認
  • Step 3. VMXファイルのバックアップ
  • Step 4. VMXファイルへ設定を追記
board-id.reflectHost = "TRUE"
hw.model.reflectHost = "TRUE"
serialNumber.reflectHost = "TRUE"
smbios.reflectHost = "TRUE"
SMBIOS.noOEMStrings = "TRUE"

VirtualBox

TBU