{"id":1430,"date":"2017-08-08T09:42:49","date_gmt":"2017-08-08T09:42:49","guid":{"rendered":"http:\/\/www.gironsec.com\/blog\/?p=1430"},"modified":"2017-08-08T09:42:49","modified_gmt":"2017-08-08T09:42:49","slug":"more-vm-detection","status":"publish","type":"post","link":"https:\/\/www.gironsec.com\/blog\/2017\/08\/more-vm-detection\/","title":{"rendered":"More VM Detection!"},"content":{"rendered":"<p>Hiyo!<\/p>\n<p>Defcon was awesome this year. It always gives me inspiration for things to blog about. That said, I want to go over something simple today &#8211; more VM detection.<\/p>\n<p>I&#8217;ll be hitting vmware because I have it, also OpenVZ and KVM because that&#8217;s what my old hosts worked on.<\/p>\n<p>In my humble opinion, the best way to determine if you&#8217;re running on a VM is to read the <a href=\"https:\/\/en.wikipedia.org\/wiki\/System_Management_BIOS\" target=\"_blank\">SMBios<\/a> information. Doing this on Linux is easy-peasy. Just use <a href=\"http:\/\/www.nongnu.org\/dmidecode\/\" target=\"_blank\">dmidecode<\/a>. It works great.<\/p>\n<p><a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/dmidecode.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/dmidecode.png\" alt=\"\" width=\"651\" height=\"1004\" class=\"alignnone size-full wp-image-1472\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/dmidecode.png 651w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/dmidecode-195x300.png 195w\" sizes=\"(max-width: 651px) 100vw, 651px\" \/><\/a><\/p>\n<p>Here we see KVM listed under &#8216;Product Info&#8217;. <\/p>\n<p>This is fine and all for Linux, but the main focus of this blog post is on Windows and the VM&#8217;s employed by anti-malware appliances which run Windows for behavior analysis. How the hell do we read SMBios information on Windows? <\/p>\n<p>Well, <a href=\"http:\/\/gnuwin32.sourceforge.net\/packages\/dmidecode.htm\" target=\"_blank\">DMIDecode does exist for windows<\/a>. How would we go about this programatically though? The <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/windows\/desktop\/ms724379(v=vs.85).aspx\" target=\"_blank\">GetSystemFirmwareTable<\/a> API allows us to read the bios table. DmiDecode&#8217;s source tells me it does pretty much the same thing. I had to clean it up a little because GNU code is cray&#8230;<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008080\">#include &lt;windows.h&gt;<\/span>\r\n<span style=\"color: #008080\">#include &lt;stdio.h&gt;<\/span>\r\n\r\n<span style=\"color: #000080; font-weight: bold\">int<\/span> num_structures = <span style=\"color: #0000FF\">0<\/span>;\r\n<span style=\"color: #000080; font-weight: bold\">typedef<\/span> <span style=\"color: #000080; font-weight: bold\">struct<\/span> RawSMBIOSData\r\n{\r\n    BYTE    Used20CallingMethod;\r\n    BYTE    SMBIOSMajorVersion;\r\n    BYTE    SMBIOSMinorVersion;\r\n    BYTE    DmiRevision;\r\n    DWORD    Length;\r\n    BYTE    SMBIOSTableData[];\r\n} RawSMBIOSData, *PRawSMBIOSData;\r\n\r\nPRawSMBIOSData get_raw_smbios_table(<span style=\"color: #000080; font-weight: bold\">void<\/span>){\r\n\r\n    <span style=\"color: #000080; font-weight: bold\">void<\/span> *buf = NULL;\r\n    DWORD size = <span style=\"color: #0000FF\">0<\/span>;\r\n    size = GetSystemFirmwareTable(<span style=\"color: #a61717; background-color: #e3d2d2\">&#39;<\/span>RSMB<span style=\"color: #a61717; background-color: #e3d2d2\">&#39;<\/span>, <span style=\"color: #0000FF\">0<\/span>, buf, size);\r\n    buf = (<span style=\"color: #000080; font-weight: bold\">void<\/span> *)malloc(size);\r\n    GetSystemFirmwareTable(<span style=\"color: #a61717; background-color: #e3d2d2\">&#39;<\/span>RSMB<span style=\"color: #a61717; background-color: #e3d2d2\">&#39;<\/span>, <span style=\"color: #0000FF\">0<\/span>, buf, size);        \r\n    <span style=\"color: #000080; font-weight: bold\">return<\/span> buf;\r\n}\r\n\r\n<span style=\"color: #000080; font-weight: bold\">int<\/span> main(<span style=\"color: #000080; font-weight: bold\">void<\/span>)\r\n{\r\nPRawSMBIOSData smb = NULL;\r\nsmb=get_raw_smbios_table();\r\nprintf(<span style=\"color: #0000FF\">&quot;SMBIOS %u.%u present.\\r\\n&quot;<\/span>, smb-&gt;SMBIOSMajorVersion, smb-&gt;SMBIOSMinorVersion);\r\ngetchar();\r\n<span style=\"color: #000080; font-weight: bold\">return<\/span> <span style=\"color: #0000FF\">1<\/span>;\r\n}\r\n<\/pre>\n<\/div>\n<p>Does malwr.com flag this query information as suspicious? See for yourself:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios-1024x823.png\" alt=\"\" width=\"640\" height=\"514\" class=\"alignnone size-large wp-image-1480\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios-1024x823.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios-300x241.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios-768x618.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/read_bios.png 1200w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>There&#8217;s more than 1 way to query this information. This means we don&#8217;t have to rely on 1 thing (which might be spoofed or used as a behavior indicator).<\/p>\n<p>The registry (command is <i>reg query HKEY_LOCAL_MACHINE\\Hardware\\Description\\System \/v SystemBiosVersion<\/i>):<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg.png\" alt=\"\" width=\"893\" height=\"350\" class=\"alignnone size-full wp-image-1473\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg.png 893w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg-300x118.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg-768x301.png 768w\" sizes=\"(max-width: 893px) 100vw, 893px\" \/><\/a><br \/>\nThe other key worth noting is HKEY_LOCAL_MACHINE\\HARDWARE\\DESCRIPTION\\System\\BIOS seen here:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2.png\" alt=\"\" width=\"1059\" height=\"510\" class=\"alignnone size-full wp-image-1474\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2.png 1059w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2-300x144.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2-768x370.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/reg2-1024x493.png 1024w\" sizes=\"(max-width: 1059px) 100vw, 1059px\" \/><\/a><\/p>\n<p>This info can be gleaned with PowerShell via the command <i>Get-WmiObject win32_bios<\/i><br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_bios.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_bios.png\" alt=\"\" width=\"771\" height=\"386\" class=\"alignnone size-full wp-image-1491\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_bios.png 771w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_bios-300x150.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_bios-768x384.png 768w\" sizes=\"(max-width: 771px) 100vw, 771px\" \/><\/a><br \/>\nThere are a shitload of other win32 classes with tons of info to sift through in powershell. Too much info, not enough time. <a href=\"https:\/\/msdn.microsoft.com\/en-us\/library\/aa394077(v=vs.85).aspx\" target=\"_blank\">Take a peek<\/a> if you have infinite resolve.<\/p>\n<p>System Info pane (msinfo32 in run box) will tell you bios info:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/systeminfo.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/systeminfo.png\" alt=\"\" width=\"892\" height=\"731\" class=\"alignnone size-full wp-image-1476\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/systeminfo.png 892w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/systeminfo-300x246.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/systeminfo-768x629.png 768w\" sizes=\"(max-width: 892px) 100vw, 892px\" \/><\/a><\/p>\n<p>Finally you can grab this info from the command line again running either the systeminfo command or the wmi command line client.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/command-line.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/command-line.png\" alt=\"\" width=\"703\" height=\"323\" class=\"alignnone size-full wp-image-1477\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/command-line.png 703w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/command-line-300x138.png 300w\" sizes=\"(max-width: 703px) 100vw, 703px\" \/><\/a><\/p>\n<p>But Joe, what if I&#8217;m a sadist, and want to use WMI in plain old C? I got your back:<\/p>\n<p><!-- HTML generated using hilite.me --><\/p>\n<div style=\"background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;\">\n<pre style=\"margin: 0; line-height: 125%\"><span style=\"color: #008080\">#include &lt;stdio.h&gt;<\/span>\r\n<span style=\"color: #008080\">#include &lt;windows.h&gt;<\/span>\r\n<span style=\"color: #008080\">#include &lt;wbemidl.h&gt;<\/span>\r\n<span style=\"color: #008080\">#include &lt;Objbase.h&gt;<\/span>\r\n\r\n<span style=\"color: #000080; font-weight: bold\">int<\/span> main(<span style=\"color: #000080; font-weight: bold\">int<\/span> argc, <span style=\"color: #000080; font-weight: bold\">char<\/span>* argv[])\r\n{\r\n    HRESULT hr = <span style=\"color: #0000FF\">0<\/span>;\r\n    IWbemLocator         *locator  = NULL;\r\n    IWbemServices        *services = NULL;\r\n    IEnumWbemClassObject *results  = NULL;\r\n    BSTR resource = SysAllocString(<span style=\"color: #0000FF\">L&quot;ROOT\\\\CIMV2&quot;<\/span>);\r\n    BSTR language = SysAllocString(<span style=\"color: #0000FF\">L&quot;WQL&quot;<\/span>);\r\n    BSTR query    = SysAllocString(<span style=\"color: #0000FF\">L&quot;SELECT * FROM Win32_BIOS&quot;<\/span>);\r\n\r\n    hr = CoInitializeEx(<span style=\"color: #0000FF\">0<\/span>, COINIT_MULTITHREADED);\r\n    hr = CoInitializeSecurity(NULL, -<span style=\"color: #0000FF\">1<\/span>, NULL, NULL, RPC_C_AUTHN_LEVEL_DEFAULT, RPC_C_IMP_LEVEL_IMPERSONATE, NULL, EOAC_NONE, NULL);\r\n    hr = CoCreateInstance(&amp;CLSID_WbemLocator, <span style=\"color: #0000FF\">0<\/span>, CLSCTX_INPROC_SERVER, &amp;IID_IWbemLocator, (LPVOID *) &amp;locator);\r\n    hr = locator-&gt;lpVtbl-&gt;ConnectServer(locator, resource, NULL, NULL, NULL, <span style=\"color: #0000FF\">0<\/span>, NULL, NULL, &amp;services);\r\n    hr = services-&gt;lpVtbl-&gt;ExecQuery(services, language, query, WBEM_FLAG_BIDIRECTIONAL, NULL, &amp;results);\r\n    <span style=\"color: #000080; font-weight: bold\">if<\/span> (results != NULL) \r\n\t{\r\n        IWbemClassObject *result = NULL;\r\n        ULONG returnedCount = <span style=\"color: #0000FF\">0<\/span>;\r\n        <span style=\"color: #000080; font-weight: bold\">while<\/span>((hr = results-&gt;lpVtbl-&gt;Next(results, WBEM_INFINITE, <span style=\"color: #0000FF\">1<\/span>, &amp;result, &amp;returnedCount)) == S_OK) \r\n\t\t{\r\n            VARIANT Manufacturer;\r\n            hr = result-&gt;lpVtbl-&gt;Get(result, <span style=\"color: #0000FF\">L&quot;Manufacturer&quot;<\/span>, <span style=\"color: #0000FF\">0<\/span>, &amp;Manufacturer, <span style=\"color: #0000FF\">0<\/span>, <span style=\"color: #0000FF\">0<\/span>);\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">char<\/span> prop[<span style=\"color: #0000FF\">128<\/span>];\r\n\t\t\twcstombs(prop,Manufacturer.bstrVal,SysStringByteLen(Manufacturer.bstrVal));\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">char<\/span> *vm1 = <span style=\"color: #0000FF\">&quot;QEMU&quot;<\/span>;\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">char<\/span> *vm2 = <span style=\"color: #0000FF\">&quot;VMware&quot;<\/span>;\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">char<\/span> *vm3 = <span style=\"color: #0000FF\">&quot;vbox&quot;<\/span>;\r\n\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">if<\/span>(strstr(prop,vm1))\r\n\t\t\t{\r\n\t\t\t\tprintf(<span style=\"color: #0000FF\">&quot;I see qemu!\\r\\n&quot;<\/span>);\r\n\t\t\t}\r\n\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">if<\/span>(strstr(prop,vm2))\r\n\t\t\t{\r\n\t\t\t\tprintf(<span style=\"color: #0000FF\">&quot;I see vmware!\\r\\n&quot;<\/span>);\r\n\t\t\t}\r\n\r\n\t\t\t<span style=\"color: #000080; font-weight: bold\">if<\/span>(strstr(prop,vm3))\r\n\t\t\t{\r\n\t\t\t\tprintf(<span style=\"color: #0000FF\">&quot;I see virtualbox!\\r\\n&quot;<\/span>);\r\n\t\t\t}\r\n\r\n            printf(<span style=\"color: #0000FF\">&quot;%s \\r\\n&quot;<\/span>, prop);\r\n            result-&gt;lpVtbl-&gt;Release(result);\r\n        }\r\n    }\r\n\r\n    results-&gt;lpVtbl-&gt;Release(results);\r\n    services-&gt;lpVtbl-&gt;Release(services);\r\n    locator-&gt;lpVtbl-&gt;Release(locator);\r\n    CoUninitialize();\r\n    SysFreeString(query);\r\n    SysFreeString(language);\r\n    SysFreeString(resource);\r\n}\r\n<\/pre>\n<\/div>\n<p>Looks familiar, right? I borrowed some of the code from my <a href=\"https:\/\/www.gironsec.com\/blog\/2017\/03\/joecrypter-update-and-more\/\" target=\"_blank\">Crypter<\/a>. This is just for bios info though. <\/p>\n<p>I dug deeper and looked using an amazing tool called <a href=\"https:\/\/rweverything.com\/\" target=\"_blank\">RW-Everything<\/a> on both VMWare and OpenVZ to try and find other ways to reveal if I&#8217;m in a VM besides the BIOS info. The result? Let&#8217;s take a look&#8230;<\/p>\n<p>First up is Windows 7 on VMWare. The tool does a pretty good job at identifying VMWare off the bat via the <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows-hardware\/drivers\/bringup\/acpi-system-description-tables\" target=\"_blank\">Extended System Description Table<\/>. This part of ACPI (Advanced Configuration and Power Interface) and used in BIOS and hardware shit. If you really want to know more, <a href=\"https:\/\/github.com\/Bumblebee-Project\/Bumblebee\/wiki\/ACPI-for-Developers\" target=\"_blank\">knock yourself out<\/a>.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/Capture.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/Capture.png\" alt=\"\" width=\"697\" height=\"792\" class=\"alignnone size-full wp-image-1482\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/Capture.png 697w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/Capture-264x300.png 264w\" sizes=\"(max-width: 697px) 100vw, 697px\" \/><\/a><br \/>\nNote the &#8216;Creator ID&#8217; specifies VMW. Is this the only reference in the ACPI table for VMWare? Fuck no. We can dump the whole thing with our little tool to a file and peek for ourselves:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-vmware.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-vmware.png\" alt=\"\" width=\"858\" height=\"967\" class=\"alignnone size-full wp-image-1483\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-vmware.png 858w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-vmware-266x300.png 266w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-vmware-768x866.png 768w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a><br \/>\n23 hits! Not bad.  <\/p>\n<p>What about for KVM? Let&#8217;s take a peek:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-KVM.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-KVM.png\" alt=\"\" width=\"858\" height=\"967\" class=\"alignnone size-full wp-image-1484\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-KVM.png 858w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-KVM-266x300.png 266w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/acpi-table-KVM-768x866.png 768w\" sizes=\"(max-width: 858px) 100vw, 858px\" \/><\/a><br \/>\nSeems to list Bochs and Qemu. Makes sense since KVM is a fork of Qemu and Bochs comes with KVM. <\/p>\n<p>One more part to check out is the USB information window. This proves quite fruitful for determining if we&#8217;re in a VM.<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture-1024x766.png\" alt=\"\" width=\"640\" height=\"479\" class=\"alignnone size-large wp-image-1485\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture-1024x766.png 1024w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture-300x224.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture-768x575.png 768w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/4Capture.png 1282w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nHere we see multiple instances of &#8216;Vmware&#8217; devices in the list of USB devices. Dumping the file and taking a peek, we again see multiple instances for VMWare:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_vmware.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_vmware.png\" alt=\"\" width=\"733\" height=\"967\" class=\"alignnone size-full wp-image-1486\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_vmware.png 733w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_vmware-227x300.png 227w\" sizes=\"(max-width: 733px) 100vw, 733px\" \/><\/a><br \/>\n10 hits. The mouse, the hub, vendor and product info. Not a bad haul.<\/p>\n<p>How about KVM?<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_KVM.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_KVM.png\" alt=\"\" width=\"733\" height=\"967\" class=\"alignnone size-full wp-image-1487\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_KVM.png 733w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/usb_info_KVM-227x300.png 227w\" sizes=\"(max-width: 733px) 100vw, 733px\" \/><\/a><br \/>\nOnly 2 hits, but better than none. <\/p>\n<p>I&#8217;m trailing off here, so let&#8217;s go over one more example via WMI that we can use to determine if we&#8217;re in a VM:<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_onboarxd_device.png\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_onboarxd_device.png\" alt=\"\" width=\"911\" height=\"376\" class=\"alignnone size-full wp-image-1492\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_onboarxd_device.png 911w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_onboarxd_device-300x124.png 300w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/powershell_onboarxd_device-768x317.png 768w\" sizes=\"(max-width: 911px) 100vw, 911px\" \/><\/a><br \/>\nBy querying the win32_OnboardDevice class, we get a hit. <\/p>\n<p>Are there more ways? You betcha. I&#8217;m always looking for new ways to detect VM&#8217;s on Windows and I&#8217;m certain I&#8217;ll think of more in the future.<\/p>\n<p>For now though, It&#8217;s like 3 am and I&#8217;m in need of sleep.<\/p>\n<p>Until next time,<\/p>\n<p>Happy cracking!<br \/>\n<a href=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/1500444736122.jpg\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/1500444736122.jpg\" alt=\"\" width=\"640\" height=\"480\" class=\"alignnone size-full wp-image-1493\" srcset=\"https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/1500444736122.jpg 640w, https:\/\/www.gironsec.com\/blog\/wp-content\/uploads\/2017\/08\/1500444736122-300x225.jpg 300w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hiyo! Defcon was awesome this year. It always gives me inspiration for things to blog about. That said, I want to go over something simple today &#8211; more VM detection. I&#8217;ll be hitting vmware because I have it, also OpenVZ and KVM because that&#8217;s what my old hosts worked on. In my humble opinion, the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,7],"tags":[103],"_links":{"self":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1430"}],"collection":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/comments?post=1430"}],"version-history":[{"count":7,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1430\/revisions"}],"predecessor-version":[{"id":1494,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/posts\/1430\/revisions\/1494"}],"wp:attachment":[{"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/media?parent=1430"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/categories?post=1430"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.gironsec.com\/blog\/wp-json\/wp\/v2\/tags?post=1430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}