Skip to content

Commit 3e3486b

Browse files
authored
Merge branch 'kernelwernel:main' into main
2 parents 70dd81a + 11cc5a6 commit 3e3486b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/cli.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ static void general(
10381038
type = "Sandbox";
10391039
}
10401040

1041-
if (type == VM::brands::NULL_BRAND) {
1041+
if (type == VM::brands::NULL_BRAND || type == VM::brands::HYPERV_ROOT) {
10421042
current_color = red;
10431043
} else {
10441044
current_color = green;

src/vmaware.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,7 @@ struct VM {
664664
};
665665

666666
enum class brand_enum : u8 {
667-
UNKNOWN,
667+
INVALID,
668668
VBOX,
669669
VMWARE,
670670
VMWARE_EXPRESS,
@@ -4514,7 +4514,7 @@ struct VM {
45144514
// but we must also nullify the result if the score is above 0,
45154515
// which would most likely indicate a hardened VM instead and return "Unknown".
45164516
if (active_count == 1) {
4517-
enum brand_enum initial_brand = brand_enum::UNKNOWN;
4517+
enum brand_enum initial_brand = brand_enum::INVALID;
45184518

45194519
for (const auto brand : active_brands) {
45204520
if (brand.second == 0) {
@@ -4540,7 +4540,7 @@ struct VM {
45404540
if (active_count > 1) {
45414541
remove(brand_enum::HYPERV_ROOT);
45424542
remove(brand_enum::NULL_BRAND);
4543-
remove(brand_enum::UNKNOWN);
4543+
remove(brand_enum::INVALID);
45444544
}
45454545

45464546
// this bitset acts as an abstraction layer for the merging stage of this function.
@@ -4643,7 +4643,7 @@ struct VM {
46434643

46444644
static const char* brand_enum_to_string(const brand_enum brand) {
46454645
switch (brand) {
4646-
case brand_enum::UNKNOWN: return "Invalid";
4646+
case brand_enum::INVALID: return "Invalid";
46474647
case brand_enum::VBOX: return VM::brands::VBOX;
46484648
case brand_enum::VMWARE: return VM::brands::VMWARE;
46494649
case brand_enum::VMWARE_EXPRESS: return VM::brands::VMWARE_EXPRESS;
@@ -12523,7 +12523,7 @@ struct VM {
1252312523
case brand_enum::MINIVISOR: return "Hypervisor (type 1)";
1252412524
case brand_enum::HYPERV_ROOT: return "Host machine"; // This refers to the type 1 hypervisor where Windows normally runs under, we put "Unknown" to clarify you're not running under a VM if this is detected
1252512525
case brand_enum::NULL_BRAND: return "Unknown";
12526-
case brand_enum::UNKNOWN: return "Invalid";
12526+
case brand_enum::INVALID: return "Invalid";
1252712527
}
1252812528

1252912529
return "Invalid";

0 commit comments

Comments
 (0)