4747
4848#include " vmaware.hpp"
4949
50- constexpr const char * ver = " 2.5 .0" ;
51- constexpr const char * date = " December 2025" ;
50+ constexpr const char * ver = " 2.6 .0" ;
51+ constexpr const char * date = " January 2025" ;
5252
5353std::string bold = " \033 [1m" ;
5454std::string underline = " \033 [4m" ;
@@ -544,7 +544,7 @@ static const char* get_vm_description(const std::string& vm_brand) {
544544 using RtlInitUnicodeString_t = VOID (__stdcall*)(PUNICODE_STRING, PCWSTR);
545545
546546#pragma warning(push)
547- #pragma warning(disable:4191)
547+ #pragma warning(disable:4191)
548548 auto pRtlInitUnicodeString = reinterpret_cast <RtlInitUnicodeString_t>(
549549 GetProcAddress (ntdll, " RtlInitUnicodeString" ));
550550 auto pNtCreateFile = reinterpret_cast <NtCreateFile_t>(
@@ -561,7 +561,7 @@ static const char* get_vm_description(const std::string& vm_brand) {
561561 pRtlInitUnicodeString (&name, L" \\ ??\\ C:\\ Program Files\\ KernelLogger" );
562562
563563 HANDLE hFile;
564- IO_STATUS_BLOCK iosb = { { 0 } } ;
564+ IO_STATUS_BLOCK iosb;
565565 OBJECT_ATTRIBUTES attrs{};
566566 InitializeObjectAttributes (&attrs, &name, 0 , nullptr , nullptr );
567567
@@ -762,9 +762,7 @@ static void general(
762762 checker (VM::VMWARE_STR, " STR instruction" );
763763 checker (VM::VMWARE_BACKDOOR, " VMware IO port backdoor" );
764764 checker (VM::MUTEX, " mutex strings" );
765- checker (VM::INTEL_THREAD_MISMATCH, " Intel thread count mismatch" );
766- checker (VM::XEON_THREAD_MISMATCH, " Intel Xeon thread count mismatch" );
767- checker (VM::AMD_THREAD_MISMATCH, " AMD thread count mismatch" );
765+ checker (VM::THREAD_MISMATCH, " Thread count mismatch" );
768766 checker (VM::CUCKOO_DIR, " Cuckoo directory" );
769767 checker (VM::CUCKOO_PIPE, " Cuckoo pipe" );
770768 checker (VM::AZURE, " Azure Hyper-V" );
@@ -867,13 +865,13 @@ static void general(
867865
868866 // percentage manager
869867 {
870- const char * percent_color = " " ;
868+ const char * percent_color;
871869
872- if (vm.percentage == 0 ) { percent_color = red.c_str (); }
870+ if (vm.percentage == 0 ) { percent_color = red.c_str (); }
873871 else if (vm.percentage < 25 ) { percent_color = red_orange.c_str (); }
874872 else if (vm.percentage < 50 ) { percent_color = orange.c_str (); }
875873 else if (vm.percentage < 75 ) { percent_color = green_orange.c_str (); }
876- else { percent_color = green.c_str (); }
874+ else { percent_color = green.c_str (); }
877875
878876 std::cout << bold << " VM likeliness: " << ansi_exit << percent_color << static_cast <u32 >(vm.percentage ) << " %" << ansi_exit << " \n " ;
879877 }
@@ -887,27 +885,26 @@ static void general(
887885
888886 // detection count manager
889887 {
890- const char * count_color = " " ;
888+ const char * count_color;
891889
892890 switch (vm.detected_count ) {
893- case 0 : count_color = red.c_str (); break ;
894- case 1 : count_color = red_orange.c_str (); break ;
895- case 2 : count_color = orange.c_str (); break ;
896- case 3 : count_color = orange.c_str (); break ;
897- case 4 : count_color = green_orange.c_str (); break ;
898- default :
899- // anything over 4 is green
900- count_color = green.c_str ();
891+ case 0 : count_color = red.c_str (); break ;
892+ case 1 : count_color = red_orange.c_str (); break ;
893+ case 2 : count_color = orange.c_str (); break ;
894+ case 3 : count_color = orange.c_str (); break ;
895+ case 4 : count_color = green_orange.c_str (); break ;
896+ default :
897+ count_color = green.c_str ();
901898 }
902899
903- std::cout <<
900+ std::cout <<
904901 bold <<
905- " VM detections: " <<
902+ " VM detections: " <<
906903 ansi_exit <<
907- count_color <<
908- static_cast <u32 >(vm.detected_count ) <<
904+ count_color <<
905+ static_cast <u32 >(vm.detected_count ) <<
909906 " /" <<
910- static_cast <u32 >(vm.technique_count ) <<
907+ static_cast <u32 >(vm.technique_count ) <<
911908 ansi_exit <<
912909 " \n " ;
913910 }
0 commit comments