{"id":6710,"date":"2019-08-26T22:34:48","date_gmt":"2019-08-26T22:34:48","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=6710"},"modified":"2019-08-26T22:34:50","modified_gmt":"2019-08-26T22:34:50","slug":"beyond-good-ol-run-key-part-113","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2019\/08\/26\/beyond-good-ol-run-key-part-113\/","title":{"rendered":"Beyond good ol\u2019 Run key, Part 113"},"content":{"rendered":"\n<p>This is another one where I just document things that are not commonly known, but _are_ very well documented for years, and defo still worth describing in this series.<\/p>\n\n\n\n<p>While looking at the well-known <em>dbghelp.dll<\/em> library I noticed that it looks for entries under:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>HKLM\\Software\\Microsoft\\Windows NT\\CurrentVersion\\KnownManagedDebuggingDlls<\/p><\/blockquote>\n\n\n\n<p>These entries are enumerated and then loaded via <em>LoadLibrary<\/em><\/p>\n\n\n\n<p>Quick google session followed and I found this awesome <a href=\"https:\/\/blogs.msdn.microsoft.com\/junfeng\/2007\/08\/20\/minidumpauxiliarydlls-and-knownmanageddebuggingdlls\/\">post<\/a> from 2007.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote\"><p>&#8212;&#8211;Original Message&#8212;&#8211;<br> From:<br> Subject: RE: managed minidump<br> Auxiliary DLLs are loaded inside of MiniDumpWriteDump when it finds a registered auxiliary DLL for a module in the target process. The lookup is to take the full path of the module and see if there&#8217;s a registered auxiliary DLL. You can&#8217;t have multiple aux DLLs for a single module path.<br> &#8212;&#8211;Original Message&#8212;&#8211;<br> From: Junfeng Zhang<br> Subject: RE: managed minidump<br> When are auxiliary dlls loaded?<br> What is the behavior when there are multiple entries under each key?<br> &#8212;&#8211;Original Message&#8212;&#8211;<br> From:<br> Subject: RE: managed minidump<br> Both are filled with string values of the form  = . MiniDumpAuxiliaryDlls lists helper DLLs that the minidump code can use to get additional data during dump generation. For example, mscorwks.dll has a registered auxiliary of mscordacwks.dll, which provides extra CLR memory data for a minidump.<br> KnownManagedDebuggingDlls is a security measure so that a debugger, when attempting to load extra support DLLs for managed debugging, can know what DLLs are approved for use on the system. The CLR registers mscordacwks.dll here, for example.<br> Both are kept in HKLM so that they can only be written by an admin.<br> &#8212;&#8211;Original Message&#8212;&#8211;<br> From: Junfeng Zhang<br> Subject: managed minidump<br> How does OS use the following two registry keys?<br> HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\MiniDumpAuxiliaryDlls<br> HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\KnownManagedDebuggingDlls<\/p><\/blockquote>\n\n\n\n<p>As you see, not only <em>KnownManagedDebuggingDlls<\/em>, but also  <em>MiniDumpAuxiliaryDlls<\/em> branch is of value for threat hunters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is another one where I just document things that are not commonly known, but _are_ very well documented for years, and defo still worth describing in this series. While looking at the well-known dbghelp.dll library I noticed that it &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2019\/08\/26\/beyond-good-ol-run-key-part-113\/\">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\/6710"}],"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=6710"}],"version-history":[{"count":1,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6710\/revisions"}],"predecessor-version":[{"id":6711,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/6710\/revisions\/6711"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=6710"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=6710"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=6710"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}