{"id":24,"date":"2022-04-22T02:20:51","date_gmt":"2022-04-22T02:20:51","guid":{"rendered":"https:\/\/blogs.oregonstate.edu\/glennf\/?p=24"},"modified":"2022-04-22T02:20:51","modified_gmt":"2022-04-22T02:20:51","slug":"precautions-for-malware-analysis","status":"publish","type":"post","link":"https:\/\/blogs.oregonstate.edu\/glennf\/2022\/04\/22\/precautions-for-malware-analysis\/","title":{"rendered":"Precautions for Malware Analysis"},"content":{"rendered":"\n<p>Last week I demonstrated how to setup a basic virtual network consisting of two windows virtual machines. For this week&#8217;s blog I will share some tips I found&nbsp; to prevent malware from escaping your virtual machine and infecting your physical machine. Disclaimer: this list is not an exhaustive list of precautions to take as our team is starting our malware analysis journey with this project.<\/p>\n\n\n\n<p><strong>Take a snapshot of the system<\/strong><\/p>\n\n\n\n<p>Snapshots are points in the history of the virtual machine. It is necessary to take a snapshot of the system prior to unleashing the malware. You can access this feature in VMware Workstation by clicking on VM &gt; Snapshot &gt; Take Snapshot<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/d2ELuADkKzFyI0mOAg1LphdqlaEWNQLmvAZ_CivLMnMxH-s-0Kg31TPsMDap-73SA2SZx4dOs-Wd30GO-pJQFdA2ia31A4F-Oayc0GvHyY530_YC4bNALxVm00x9FW-RDziHHxh7\" alt=\"\" \/><\/figure>\n\n\n\n<p>After you unleash the malware and perform analysis we can revert by clicking on VM &gt; Snapshot &gt; and choosing either Snapshot Manager or clicking on desired snapshot.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/2QFW61lgdr2fy4xMncpoOgO3pj71CCefBj71vIMx31TeNnJdGlDZ3ndMA6orKHZXMBm5NWuOXsZXmii83GrkV_uYAz7-ZzB_jnHEsSCXQ13cZcPIK_FV7bt_u_bxV1ppRp97FL59\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Setting up host-only networking<\/strong><\/p>\n\n\n\n<p>Host-only networking sets up an isolated virtual network within the host system. By default this configuration cannot connect to the internet.&nbsp;<\/p>\n\n\n\n<p>To set this up we have to either create a virtual network or use an existing one in the Virtual Network Editor.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/o74s6h2VGC7zuK2Zprp56BUHBt78Kr6sutApla3BkXHLsQiL6RisDFiOMZbWqbgrUOz12wDxqXWi_GKbpcokdTKeTmZ7OJ0DgXZTgAcooazO_ahXqYTgXzRW3KO5GKVpPqpgRCBA\" alt=\"\" \/><\/figure>\n\n\n\n<p>By default there is already a virtual network named VMnet1. The screenshot below shows VMnet0 was created after we clicked on \u201cAdd Network\u201d. We enabled Host-only configuration as well.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh5.googleusercontent.com\/HnBeStRlI3pYcs1euRB2BSKbcP1wJE2FZHJQkMjIV1cBP_x0NKLIm7iu0e2NP_tbD3LZ55yderMuCRhuzn5XpOWiR7g4JvcMjU68pYIAcuTf0l66dAdzCscd9PqQiABvoqkK11V5\" alt=\"\" \/><\/figure>\n\n\n\n<p>Afterwards we need to set our virtual machines network adapter to the host-only network. Access the settings for your particular virtual machine through VM &gt;Settings.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/u08pfvUajZPPq967kOXbaHinwq6EywTwFk3PlcNbxZjcTW9CnV2zwmcWKpH49LepDKi_AlOej5SO7KGmwrH7ArDcKit7A3D63ODbiCvxq-74jMyhNp8Yz70o4Hshm4zpEUl2akyX\" width=\"348\" height=\"244\"><strong><\/strong><\/li><\/ol>\n\n\n\n<p>In the image below you can choose the default Host-only network VMnet1 or the custom network we created. Make sure your virtual machine is not started when you change this or you would need to restart for the change to take effect.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/vHW-gimrEkRDl_-7gpUsQhlvx3tvqYkBY5qWcpYY22WDtKPL087wYs0famcMZn-7Ns-U3cvC4OnqUTHqSBkya4F3rnCA8_CxeMuQTgyvVdCAgq6Rnqe145WM6DnaFVrLV78GRoqq\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Ensure your Hypervisor is up to date<\/strong><\/p>\n\n\n\n<p>A hypervisor is the software where you are creating, running, and managing your virtual machines from. Some malware have been known to have the ability to recognize they are inside a virtual machine and will modify their behavior or even escape. Software updates will help prevent this. For this project our group used VMware Workstation 16 and you can check for updates through Help &gt; Software Updates.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/yDSf-AiBaFizlBHvDengOKXvVSRijTsfvSzLcWWfiuDcLh7V8-Hb9feIopHYY_nXHrkW6VroOEdTix5jySW-qa-KjobMwLOrQCiovj6P3vA6bkMePE0e4xN0TtW7NnoLKiR1bsz1\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Do not connect the laboratory system to the production network<\/strong><\/p>\n\n\n\n<p>Earlier we took care of this by enabling host-only networking.<\/p>\n\n\n\n<p>An additional precaution we can take is disabling \u201cConnect a host virtual adapter to the network\u201d. Per the vmware documentation, if this is enabled then we will connect a physical network on the host system to the virtual network.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/pypEoKhsk8fKFEF01CA63Qn72GV49KxDwTVJiNV1lPSJganvUSxL8FGF2WMEWA0nPGolsdwBKr2V3xyRt8VZJj-YaWczS3HLtCs8FJssGAyxgfGBg482zNAwlUJ_BYDd9Sdp4KTj\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Make it harder for the Malware to realize it is in a VM<\/strong><\/p>\n\n\n\n<p>A malware may be able to recognize it is in a virtual machine by the presence of virtual machine related software within the VM. For our configuration we would remove VMWare tools which allows us to copy and paste text or drag and drop files into the VM.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/-riEiRMmEd5UER2LUn_gm7bTdIXipZcsGJJX59TzAmw5pb-bqAoKuOAuw3TRL2bNeIVcHD0PGOSzjC6yQFixrQzTpVK1q7w0N-uXmiOFevKk51Tdccc7kfgUg1_0Bf7SMqH63tKs\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Disable Shared Folders and facilitate Guest Isolation<\/strong><\/p>\n\n\n\n<p>Access the settings for a particular VM through VM&nbsp; &gt; Settings.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh3.googleusercontent.com\/u08pfvUajZPPq967kOXbaHinwq6EywTwFk3PlcNbxZjcTW9CnV2zwmcWKpH49LepDKi_AlOej5SO7KGmwrH7ArDcKit7A3D63ODbiCvxq-74jMyhNp8Yz70o4Hshm4zpEUl2akyX\" alt=\"\" \/><\/figure>\n\n\n\n<p>Shared Folders facilitate the transfer of files between the physical and virtual machine. However as shown by the warning in settings, this added point of contact could be exploited by malware.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/kqIUqEiRS2EWLGvzg7zPDR90LDIznDZEfFFbOFtsRWcZREfUas3LtTPvTJcBMNlE8sbdt7fSCb03KWv8vUCKGLt2ucgKUIxc47Gf2YkuQ7EMk89RngjYakxJOQWw0pbfzXEBQfr0\" alt=\"\" \/><\/figure>\n\n\n\n<p>Similarly we can decrease additional points of contact by disabling \u201cdrag and drop\u201d and \u201ccopy and paste\u201d<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh6.googleusercontent.com\/FIQzWZZO6UCINx1YTCuPGWGGMsrcq-ADQ7fHfbtixgJhSPEN6697-Kqza6BMPICZsN2K8F681eqe34Mv2A3IT-nj43REOBZ9PnS7yh4dD_vt8HPd0TFzSskNH6MZSSfW_PzFaCzF\" alt=\"\" \/><\/figure>\n\n\n\n<p><strong>Sources Cited<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/zeltser.com\/vmware-malware-analysis\/\">https:\/\/zeltser.com\/vmware-malware-analysis\/<\/a><\/li><li><a href=\"https:\/\/docs.vmware.com\/en\/VMware-Workstation-Pro\/15.0\/com.vmware.ws.using.doc\/GUID-E08995A9-7DE6-4D92-8C6F-4F737C3A8AB3.html\">https:\/\/docs.vmware.com\/en\/VMware-Workstation-Pro\/15.0\/com.vmware.ws.using.doc\/GUID-E08995A9-7DE6-4D92-8C6F-4F737C3A8AB3.html<\/a><\/li><li><a href=\"https:\/\/www.geeksforgeeks.org\/virtual-machine-for-malware-analysis\/\">https:\/\/www.geeksforgeeks.org\/virtual-machine-for-malware-analysis\/<\/a><\/li><li><a href=\"https:\/\/docs.vmware.com\/en\/VMware-Workstation-Player-for-Linux\/16.0\/com.vmware.player.linux.using.doc\/GUID-93BDF7F1-D2E4-42CE-80EA-4E305337D2FC.html\">https:\/\/docs.vmware.com\/en\/VMware-Workstation-Player-for-Linux\/16.0\/com.vmware.player.linux.using.doc\/GUID-93BDF7F1-D2E4-42CE-80EA-4E305337D2FC.html<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Last week I demonstrated how to setup a basic virtual network consisting of two windows virtual machines. For this week&#8217;s blog I will share some tips I found&nbsp; to prevent malware from escaping your virtual machine and infecting your physical machine. Disclaimer: this list is not an exhaustive list of precautions to take as our [&hellip;]<\/p>\n","protected":false},"author":12309,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-24","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/users\/12309"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":1,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":25,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/posts\/24\/revisions\/25"}],"wp:attachment":[{"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.oregonstate.edu\/glennf\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}