{"id":1478,"date":"2012-11-25T05:13:06","date_gmt":"2012-11-25T05:13:06","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=1478"},"modified":"2012-11-25T05:15:43","modified_gmt":"2012-11-25T05:15:43","slug":"hiding-env-tools-from-malware-a-k-a-fight-fire-with-fire-but-only-inside-vm","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2012\/11\/25\/hiding-env-tools-from-malware-a-k-a-fight-fire-with-fire-but-only-inside-vm\/","title":{"rendered":"Hiding env.\/tools from malware a.k.a. fight fire with fire (but only inside VM)"},"content":{"rendered":"<p>Seasoned malware analysts\/reversers\/crackers move along &#8211; you already know this stuff \ud83d\ude42<\/p>\n<p>Analyzing malware is always challenging as there are a few dozen if not hundreds different ways to detect the virtual environment plus other tools used by reversers during dynamic or in-depth analysis &#8211; most of these can be easily picked up by malware looking for process names, registry keys, or using one of the undocumented, or semi-documented bugs\/features of VMs (usually snippets of code producing different results when executed on a real CPU vs. on a virtual CPU).<\/p>\n<p>This short post describes a few ways how to hide VM (main focus on VMWare) and tools &#8211; by hiding their files, processes, services + associated with them registry keys\/values.<\/p>\n<p><strong>Changing VM settings<\/strong><\/p>\n<p>It has has been described quite well <a href=\"http:\/\/www.gta.ufrj.br\/ensino\/CPE758\/artigos-basicos\/carpenter07.pdf\">here<\/a>.<\/p>\n<p><strong>Hiding Processes only<\/strong><\/p>\n<p>If you need to hide the process only, you can use <a href=\"http:\/\/fyyre.l2-fashion.de\/projects\/HideToolz.zip\">HideToolz<\/a> available for a download from <a href=\"http:\/\/fyyre.ivory-tower.de\/\">Fyyre&#8217;s<\/a> web site.<\/p>\n<p>When the HideToolz is active, the processes marked for hiding are not visible in a Task Manager and can&#8217;t be found by normal process enumeration functions.<\/p>\n<p>This is what HideToolz sees (processes marked with an asterisk are hidden)<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_1.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1479\" title=\"hide_1\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_1-300x169.png\" alt=\"\" width=\"300\" height=\"169\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_1-300x169.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_1.png 786w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>And this is what Task Manager can see (Process Explorer as well)<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_2.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1480\" title=\"hide_2\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_2-284x300.png\" alt=\"\" width=\"284\" height=\"300\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_2-284x300.png 284w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_2.png 431w\" sizes=\"(max-width: 284px) 100vw, 284px\" \/><\/a><\/p>\n<p><strong>Hiding Files, Folders, Processes, Services, Registry entries<\/strong><\/p>\n<p>When it comes to hiding more stuff, one can use help from the good ol&#8217; Hacker Defender rootkit by HolyFather.<\/p>\n<p>The rootkit uses a configuration file that allows to specify what we want hidden in the environment and that includes:<\/p>\n<ul>\n<li>files\/folders<\/li>\n<li>processes<\/li>\n<li>services and their associated registry entries<\/li>\n<li>registry keys\/names\/values<\/li>\n<\/ul>\n<p>To set up the Hacker Defender one needs to\u00a0 edit\/change the default configuration file into sth along these lines:<\/p>\n<pre style=\"padding-left: 30px;\">[Hidden Table]\r\nhxd*\r\nvmu*\r\nvmt*\r\nvmw*\r\ntools*\r\nprocexp*\r\nollydbg*\r\n\r\n[Root Processes]\r\nhxd*\r\nvmu*\r\nvmt*\r\nvmw*\r\ntools*\r\nprocexp*\r\nollydbg*\r\n\r\n[Hidden Services]\r\nHackerDefender100\r\nvmu*\r\nvmt*\r\nvmw*\r\nprocexp*\r\n\r\n[Hidden RegKeys]\r\nVMware, Inc.\r\nSysinternals\r\n\r\n[Hidden RegValues]\r\nvmu*\r\nvmt*\r\nvmw*\r\n\r\n[Startup Run]\r\n\r\n[Free Space]\r\n\r\n[Hidden Ports]\r\n\r\n[Settings]\r\nPassword=infected\r\nBackdoorShell=cmd.exe\r\nFileMappingName=_.-=[Hacker Defender]=-._\r\nServiceName=HackerDefender100\r\nServiceDisplayName=HXD Service 100\r\nServiceDescription=NT rootkit\r\nDriverName=HackerDefenderDrv100\r\nDriverFileName=hxdefdrv.sys\r\n\r\n[Comments]<\/pre>\n<p>The new configuration file can be now loaded:<\/p>\n<pre style=\"padding-left: 30px;\">hxdef100.exe hide.ini<\/pre>\n<p>And from now on browsing the folders, files, registry keys, names, values and processes, services lists will be available only to processes listed in\u00a0 &#8216;root processes&#8217; section.<\/p>\n<p>Example: what Regedit sees before installing the rootkit:<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1483\" title=\"hide_3\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3-300x202.png\" alt=\"\" width=\"300\" height=\"202\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3-300x202.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3.png 380w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>and after its installation<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3a.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1484\" title=\"hide_3a\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3a-300x202.png\" alt=\"\" width=\"300\" height=\"202\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3a-300x202.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_3a.png 380w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>What Task Manager sees before<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1485\" title=\"hide_4\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4-252x300.png\" alt=\"\" width=\"252\" height=\"300\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4-252x300.png 252w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4.png 404w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><\/a><\/p>\n<p>and after rootkit installation<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4b.png\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-medium wp-image-1486\" title=\"hide_4b\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4b-252x300.png\" alt=\"\" width=\"252\" height=\"300\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4b-252x300.png 252w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2012\/11\/hide_4b.png 404w\" sizes=\"(max-width: 252px) 100vw, 252px\" \/><\/a><\/p>\n<p>Obviously, the configuration I provided above is far from being perfect. The VM-specific strings are all over the place inside the registry, so we need to do a bit more of a home work. It is also more than likely that your environment uses different paths and tools.<\/p>\n<p>It would be ideal if VM product developers allowed to completely hide the tools and the environment from the guest OS by e.g. using simple randomization of names, windows titles, processes&#8217; names etc. &#8211;\u00a0 a simple technique used for years by many antirootkit tools e.g. XUETR and GMER.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Seasoned malware analysts\/reversers\/crackers move along &#8211; you already know this stuff \ud83d\ude42 Analyzing malware is always challenging as there are a few dozen if not hundreds different ways to detect the virtual environment plus other tools used by reversers during &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2012\/11\/25\/hiding-env-tools-from-malware-a-k-a-fight-fire-with-fire-but-only-inside-vm\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/1478"}],"collection":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/comments?post=1478"}],"version-history":[{"count":8,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/1478\/revisions"}],"predecessor-version":[{"id":1529,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/1478\/revisions\/1529"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=1478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=1478"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=1478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}