Skip to content

Commit 06ee1e8

Browse files
authored
Merge pull request #343 from NotRequiem/dev
Major changes
2 parents 6570157 + 7ea2455 commit 06ee1e8

File tree

6 files changed

+1241
-1502
lines changed

6 files changed

+1241
-1502
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
The library is:
1515
- Very easy to use
1616
- Cross-platform (Windows + MacOS + Linux)
17-
- Features up to 115 unique VM detection techniques [[list](https://github.com/kernelwernel/VMAware/blob/main/docs/documentation.md#flag-table)]
17+
- Features up to 100+ unique VM detection techniques [[list](https://github.com/kernelwernel/VMAware/blob/main/docs/documentation.md#flag-table)]
1818
- Features the most cutting-edge techniques
1919
- Able to detect 65+ VM brands including VMware, VirtualBox, QEMU, Hyper-V, and much more [[list](https://github.com/kernelwernel/VMAware/blob/main/docs/documentation.md#brand-table)]
2020
- Able to beat VM hardeners
@@ -239,7 +239,7 @@ You can view the full docs [here](docs/documentation.md). All the details such a
239239

240240
> I would've made it strictly MIT so proprietary software can make use of the library, but some of the techniques employed are from GPL projects, and I have no choice but to use the same license for legal reasons.
241241
>
242-
> This gave me an idea to make an MIT version without all of the GPL code so it can also be used without forcing your code to be open source. It should be noted that the MIT version removes <b>7</b> techniques out of 115 (as of 2.0 version), and the lesser the number of techniques, the less accurate the overall result might be.
242+
> This gave me an idea to make an MIT version without all of the GPL code so it can also be used without forcing your code to be open source. It should be noted that the MIT version removes <b>7</b> techniques out of 109 (as of 2.0 version), and the lesser the number of techniques, the less accurate the overall result might be.
243243
244244
</details>
245245

docs/documentation.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,6 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
440440
| `VM::DMIDECODE` | Check if dmidecode output matches a VM brand | Linux | 55% | Admin | | | |
441441
| `VM::DMESG` | Check if dmesg output matches a VM brand | Linux | 55% | Admin | | | |
442442
| `VM::HWMON` | Check if /sys/class/hwmon/ directory is present. If not, likely a VM | Linux | 35% | | | | |
443-
| `VM::SIDT5` | Check if the 5th byte after sidt is null | Linux | 45% | | | | |
444443
| `VM::DLL` | Check for VM-specific DLLs | Windows | 25% | | | | |
445444
| `VM::REGISTRY` | Check for VM-specific registry values | Windows | 50% | | | | |
446445
| `VM::VM_FILES` | Find for VM-specific specific files | Windows | 25% | | | | |
@@ -466,13 +465,9 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
466465
| `VM::MAC_SIP` | Check if System Integrity Protection is disabled (likely a VM if it is) | MacOS | 40% | | | | |
467466
| `VM::HKLM_REGISTRIES` | Check HKLM registries for specific VM strings | Windows | 25% | | | | |
468467
| `VM::VPC_INVALID` | Check for official VPC method | Windows | 75% | | | 32-bit | |
469-
| `VM::SIDT` | Check for sidt instruction method | Windows | 25% | | | | |
470-
| `VM::SGDT` | Check for sgdt instruction method | Windows | 30% | | | 32-bit | |
471-
| `VM::SLDT` | Check for sldt instruction method | Windows | 15% | | | 32-bit | |
472-
| `VM::OFFSEC_SIDT` | Check for Offensive Security SIDT method | Windows | 60% | | | 32-bit | |
473-
| `VM::OFFSEC_SGDT` | Check for Offensive Security SGDT method | Windows | 60% | | | 32-bit | |
474-
| `VM::OFFSEC_SLDT` | Check for Offensive Security SLDT method | Windows | 20% | | | 32-bit | |
475-
| `VM::VPC_SIDT` | Check for sidt method with VPC's 0xE8XXXXXX range | Windows | 15% | | | 32-bit | |
468+
| `VM::SIDT` | Check for uncommon IDT virtual addresses | Linux and Windows | 25% | | | | |
469+
| `VM::SGDT` | Check for uncommon GDT virtual addresses | Windows | 30% | | | | |
470+
| `VM::SLDT` | Check for uncommon LDT virtual addresses | Windows | 15% | | | 32-bit | |
476471
| `VM::VMWARE_IOMEM` | Check for VMware string in /proc/iomem | Linux | 65% | | | | |
477472
| `VM::VMWARE_IOPORTS` | Check for VMware string in /proc/ioports | Linux | 70% | | | | |
478473
| `VM::VMWARE_SCSI` | Check for VMware string in /proc/scsi/scsi | Linux | 40% | | | | |
@@ -488,8 +483,8 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
488483
| `VM::NETTITUDE_VM_MEMORY` | Check for memory regions to detect VM-specific brands | Windows | 100% | | | | |
489484
| `VM::CUCKOO_DIR` | Check for cuckoo directory using crt and WIN API directory functions | Windows | 30% | | | | |
490485
| `VM::CUCKOO_PIPE` | Check for Cuckoo specific piping mechanism | Windows | 30% | | | | |
491-
| `VM::HYPERV_HOSTNAME` | Check for default Azure hostname format regex (Azure uses Hyper-V as their base VM brand) | Windows, Linux | 30% | | | | |
492-
| `VM::GENERAL_HOSTNAME` | Check for commonly set hostnames by certain VM brands | Windows, Linux | 10% | | | | |
486+
| `VM::HYPERV_HOSTNAME` | Check for default Azure hostname format regex (Azure uses Hyper-V as their base VM brand) | Linux and Windows | 30% | | | | |
487+
| `VM::GENERAL_HOSTNAME` | Check for commonly set hostnames by certain VM brands | Linux and Windows | 10% | | | | |
493488
| `VM::SCREEN_RESOLUTION` | Check for pre-set screen resolutions commonly found in VMs | Windows | 20% | | | | |
494489
| `VM::DEVICE_STRING` | Check if bogus device string would be accepted | Windows | 25% | | | | |
495490
| `VM::BLUESTACKS_FOLDERS` | Check for the presence of BlueStacks-specific folders | Linux | 5% | | | | |
@@ -512,7 +507,6 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
512507
| `VM::ANYRUN_DRIVER` | Check for any.run driver presence | Windows | 65% | | | | | Removed from the lib, only available in the CLI |
513508
| `VM::ANYRUN_DIRECTORY` | Check for any.run directory and handle the status code | Windows | 35% | | | | | Removed from the lib, only available in the CLI |
514509
| `VM::DRIVER_NAMES` | Check for VM-specific names for drivers | Windows | 100% | | | | |
515-
| `VM::VM_SIDT` | Check for unknown IDT base address | Windows | 100% | | | | |
516510
| `VM::DISK_SERIAL` | Check for serial numbers of virtual disks | Windows | 100% | | | | |
517511
| `VM::PORT_CONNECTORS` | Check for physical connection ports | Windows | 25% | | | | This technique is known to false flag on devices like Surface Pro |
518512
| `VM::GPU_CAPABILITIES` | Check for GPU capabilities related to VMs | Windows | 100% | Admin | | | Admin only needed for some heuristics |
@@ -530,7 +524,7 @@ VMAware provides a convenient way to not only check for VMs, but also have the f
530524
| `VM::AMD_THREAD_MISMATCH` | Check for AMD CPU thread count database if it matches the system's thread count | | 95% | | | | |
531525
| `VM::NATIVE_VHD` | Check for OS being booted from a VHD container | Windows | 100% | | | | |
532526
| `VM::VIRTUAL_REGISTRY` | Check for particular object directory which is present in Sandboxie virtual environment but not in usual host systems | Windows | 65% | | | | Admin only needed for Linux |
533-
| `VM::FIRMWARE` | Check for VM signatures and patched strings by hardeners in firmware, while ensuring the BIOS serial is valid | Windows and Linux | 100% | | | | |
527+
| `VM::FIRMWARE` | Check for VM signatures and patched strings by hardeners in firmware, while ensuring the BIOS serial is valid | Linux and Windows | 100% | | | | |
534528
| `VM::FILE_ACCESS_HISTORY` | Check if the number of accessed files are too low for a human-managed environment | Linux | 15% | | | | |
535529
| `VM::AUDIO` | Check if any waveform-audio output devices are present in the system | Windows | 25% | | | | |
536530
| `VM::UNKNOWN_MANUFACTURER` | Check if the CPU manufacturer is not known | | 50% | | | | |

src/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
|------|---------|
33
| `cli.cpp` | Entire CLI tool code |
44
| `vmaware.hpp` | Official and original library header in GPL-3.0, most likely what you're looking for. |
5-
| `vmaware_MIT.hpp` | Same as above but in MIT. But this removes 7 techniques out of 115 |
5+
| `vmaware_MIT.hpp` | Same as above but in MIT. But this removes 7 techniques out of 109 |
66

77
<br>
88

src/cli.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ bool is_unsupported(VM::enum_flags flag) {
350350
case VM::DMIDECODE:
351351
case VM::DMESG:
352352
case VM::HWMON:
353-
case VM::SIDT5:
354353
case VM::DISK_SIZE:
355354
case VM::VBOX_DEFAULT:
356355
case VM::VM_PROCESSES:
@@ -427,10 +426,6 @@ bool is_unsupported(VM::enum_flags flag) {
427426
case VM::SIDT:
428427
case VM::SGDT:
429428
case VM::SLDT:
430-
case VM::OFFSEC_SIDT:
431-
case VM::OFFSEC_SGDT:
432-
case VM::OFFSEC_SLDT:
433-
case VM::VPC_SIDT:
434429
case VM::VMWARE_STR:
435430
case VM::VMWARE_BACKDOOR:
436431
case VM::VMWARE_PORT_MEM:
@@ -450,7 +445,6 @@ bool is_unsupported(VM::enum_flags flag) {
450445
case VM::KVM_BITMASK:
451446
case VM::KGT_SIGNATURE:
452447
case VM::DRIVER_NAMES:
453-
case VM::VM_SIDT:
454448
case VM::DISK_SERIAL:
455449
case VM::PORT_CONNECTORS:
456450
case VM::GPU_VM_STRINGS:
@@ -874,7 +868,6 @@ void general() {
874868
checker(VM::HYPERVISOR_BIT, "CPUID hypervisor bit");
875869
checker(VM::HYPERVISOR_STR, "hypervisor str");
876870
checker(VM::TIMER, "timing anomalies");
877-
checker(VM::SIDT5, "sidt null byte");
878871
checker(VM::THREADCOUNT, "processor count");
879872
checker(VM::MAC, "MAC address");
880873
checker(VM::TEMPERATURE, "temperature");
@@ -912,10 +905,6 @@ void general() {
912905
checker(VM::SIDT, "SIDT");
913906
checker(VM::SGDT, "SGDT");
914907
checker(VM::SLDT, "SLDT");
915-
checker(VM::OFFSEC_SIDT, "Offensive Security SIDT");
916-
checker(VM::OFFSEC_SGDT, "Offensive Security SGDT");
917-
checker(VM::OFFSEC_SLDT, "Offensive Security SLDT");
918-
checker(VM::VPC_SIDT, "VirtualPC SIDT");
919908
checker(VM::VMWARE_IOMEM, "/proc/iomem file");
920909
checker(VM::VMWARE_IOPORTS, "/proc/ioports file");
921910
checker(VM::VMWARE_SCSI, "/proc/scsi/scsi file");
@@ -955,7 +944,6 @@ void general() {
955944
checker(anyrun_driver, "ANY.RUN driver");
956945
checker(anyrun_directory, "ANY.RUN directory");
957946
checker(VM::DRIVER_NAMES, "driver names");
958-
checker(VM::VM_SIDT, "VM SIDT");
959947
checker(VM::DISK_SERIAL, "disk serial number");
960948
checker(VM::PORT_CONNECTORS, "physical connection ports");
961949
checker(VM::GPU_CAPABILITIES, "GPU capabilities");

0 commit comments

Comments
 (0)