From 718a4550e96a352e2572210e0c3ff33cc26e272e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20B=C3=BCchel?= Date: Thu, 23 Feb 2023 16:40:26 +0100 Subject: [PATCH] SEBWIN-648: Added VMware to PCI vendor blacklist. --- SafeExamBrowser.SystemComponents/VirtualMachineDetector.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/SafeExamBrowser.SystemComponents/VirtualMachineDetector.cs b/SafeExamBrowser.SystemComponents/VirtualMachineDetector.cs index 2cf3a4f7..c1bad51f 100644 --- a/SafeExamBrowser.SystemComponents/VirtualMachineDetector.cs +++ b/SafeExamBrowser.SystemComponents/VirtualMachineDetector.cs @@ -17,7 +17,10 @@ namespace SafeExamBrowser.SystemComponents /// /// Virtualbox: VBOX, 80EE / RedHat: QUEMU, 1AF4, 1B36 /// - private static readonly string[] PCI_VENDOR_BLACKLIST = { "vbox", "vid_80ee", "qemu", "ven_1af4", "ven_1b36", "subsys_11001af4" }; + private static readonly string[] PCI_VENDOR_BLACKLIST = + { + "vbox", "vid_80ee", "qemu", "ven_1af4", "ven_1b36", "subsys_11001af4", "PROD_VMWARE", "VEN_VMWARE", "VMWARE_IDE" + }; private static readonly string QEMU_MAC_PREFIX = "525400"; private static readonly string VIRTUALBOX_MAC_PREFIX = "080027"; @@ -54,7 +57,7 @@ namespace SafeExamBrowser.SystemComponents foreach (var device in plugAndPlayDeviceIds) { - isVirtualMachine |= PCI_VENDOR_BLACKLIST.Any(device.ToLower().Contains); + isVirtualMachine |= PCI_VENDOR_BLACKLIST.Any(v => device.ToLower().Contains(v.ToLower())); } logger.Debug($"Computer '{systemInfo.Name}' appears {(isVirtualMachine ? "" : "not ")}to be a virtual machine.");