{"id":881,"date":"2020-08-04T12:11:31","date_gmt":"2020-08-04T16:11:31","guid":{"rendered":"https:\/\/increasec.com\/?p=881"},"modified":"2020-08-05T15:17:34","modified_gmt":"2020-08-05T19:17:34","slug":"preventing-file-less-malware-the-cheap-and-hacky-way","status":"publish","type":"post","link":"https:\/\/increasec.com\/?p=881","title":{"rendered":"Preventing file-less malware the cheap and hacky way"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">create a .bat or .cmd script with the following lines in it.  I called mine PowershellPS1-Disassociate.cmd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">: This script prevents file-less malware from running by associating <br>:        powershell and visual basic extensions with notepad<br>: original associations in comments<br>: assoc .ps1=Microsoft.PowerShellScript.1<br>: assoc .VBE=VBEFile<br>: assoc .vbs=VBSFile<br>assoc .ps1=txtfile<br>assoc .VBE=txtfile<br>assoc .vbs=txtfile<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">after you create the script, save and run it.  If you need to reverse this operation do the same with the following script.  I called mine PowershellPS1-Associate.cmd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">assoc .ps1=Microsoft.PowerShellScript.1<br>assoc .VBE=VBEFile<br>assoc .vbs=VBSFile<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This works well for Personal users, Small-Med Business and Work-from-home users.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unregister; prevents social engineer from tricking users into running scripts<br>.ps1 .vbs .vbe .js .wsh .reg<br>Execute restrictions: prevents selected software from running permissions PowerUser+<br>C:\\Windows\\System32\\WindowsPowerShell*<br>C:\\Windows\\System32\\cmd.exe<br>C:\\Windows\\System32\\cscript.exe<br>C:\\Windows\\System32\\reg.exe<br>C:\\Windows\\System32\\runas.exe<br>C:\\Windows\\System32\\wscript.exe<br>wmic.exe<br>wbemtest.exe<br>winrm.exe<br>dcomcnfg.exe<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Firewall 10.x.x.x only: 135, 445, 5985, 5986<\/p>\n","protected":false},"excerpt":{"rendered":"<p>create a .bat or .cmd script with the following lines in it. I called mine PowershellPS1-Disassociate.cmd : This script prevents file-less malware from running by associating : powershell and visual&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[138,139,21],"class_list":["post-881","post","type-post","status-publish","format-standard","hentry","category-uncategorised","tag-blueteam","tag-malware","tag-windows"],"_links":{"self":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/881","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=881"}],"version-history":[{"count":5,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions"}],"predecessor-version":[{"id":888,"href":"https:\/\/increasec.com\/index.php?rest_route=\/wp\/v2\/posts\/881\/revisions\/888"}],"wp:attachment":[{"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=881"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=881"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/increasec.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=881"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}