{"id":6522,"date":"2019-07-11T19:03:12","date_gmt":"2019-07-11T19:03:12","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=6522"},"modified":"2019-07-12T13:05:31","modified_gmt":"2019-07-12T13:05:31","slug":"beyond-good-ol-run-key-part-108-2","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2019\/07\/11\/beyond-good-ol-run-key-part-108-2\/","title":{"rendered":"Beyond good ol\u2019 Run key, Part 108"},"content":{"rendered":"\n<p>This is my favorite persistence trick of 2019 so far.<\/p>\n\n\n\n<p>64-bit WOW layer got <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/winprog64\/wow64-implementation-details\">changed<\/a> a lot in Windows 10, and <a href=\"https:\/\/wbenny.github.io\/2018\/11\/04\/wow64-internals.html\">this<\/a> article covers it in-crazy-depth. <\/p>\n\n\n\n<p>An interesting feature that comes as a result of these changes is a functionality provided by OS when the following value exists:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>HKLM\\SOFTWARE\\Microsoft\\Wow64\\x86\\<\/p><cite> processname = &lt;your DLL&gt;<\/cite><\/blockquote>\n\n\n\n<p>One can create e.g. :<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>HKLM\\SOFTWARE\\Microsoft\\Wow64\\x86\\<\/p><cite> notepad.exe = c:\\test\\malware.dll<\/cite><\/blockquote>\n\n\n\n<p>And this DLL will be loaded anytime a 32-bit Notepad is executed.<\/p>\n\n\n\n<p>Since this is a WOW key, only 32-bit programs are affected.<\/p>\n\n\n\n<p>Now for the reason why this is my favorite persistence trick of 2019 so far? There are at least two:<\/p>\n\n\n\n<ul><li>The DLL is actually 64-bit (it replaces wow64cpu.dll) so you are basically injecting a 64-bit DLL into a 32-bit process (while this comes with limitations &#8211; no access to many APIs as the process is only about to get started &#8211; it&#8217;s a pretty cool anti-trick)<\/li><li>The DLL can be loaded from a UNC path, so it can be both a persistence and lateral movement trick<\/li><\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is my favorite persistence trick of 2019 so far. 64-bit WOW layer got changed a lot in Windows 10, and this article covers it in-crazy-depth. An interesting feature that comes as a result of these changes is a functionality &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2019\/07\/11\/beyond-good-ol-run-key-part-108-2\/\">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":[13,35],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6522"}],"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=6522"}],"version-history":[{"count":7,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6522\/revisions"}],"predecessor-version":[{"id":6544,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6522\/revisions\/6544"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=6522"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=6522"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=6522"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}