{"id":2322,"date":"2014-04-16T15:36:54","date_gmt":"2014-04-16T15:36:54","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=2322"},"modified":"2016-11-16T16:48:01","modified_gmt":"2016-11-16T16:48:01","slug":"beyond-good-ol-run-key-part-10","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2014\/04\/16\/beyond-good-ol-run-key-part-10\/","title":{"rendered":"Beyond good ol\u2019 Run key, Part 10"},"content":{"rendered":"<p>There is no doubt that Microsoft products are a subject to a lot of testing &#8211; this is understandable as it&#8217;s undeniably the most used office software in the world. It&#8217;s hard to imagine software packages that complex to be completely separated from the platform\/modules that are used to testing them &#8211; it&#8217;s not a surprise then that references to various Microsoft testing platforms or modules can be found in strings or Process Monitor logs. One of them is called Oasys (Office Automation System) and I discussed it in the <a title=\"Beyond good ol\u2019 Run key, Part 7\" href=\"https:\/\/www.hexacorn.com\/blog\/2014\/02\/09\/beyond-good-ol-run-key-part-7\/\">7th part of the series<\/a>. This is not the only one though and this short post will talk about yet another trick (or two) that are most-likely side-effects of deep integration with testing platforms &#8211; they can be both used to load a phantom DLL anytime Office programs start, and in some cases when other programs do as well.<\/p>\n<p><strong>Office 2007, 2010 and 2013<\/strong><\/p>\n<p>Adding a key\/value pair shown below to the Registry will guarantee that the <strong>test.dll<\/strong> will load anytime Office 2007, 2010 or 2013 programs are started (e.g. WinWord, Excel):<\/p>\n<pre style=\"padding-left: 30px;\">[HKEY_CURRENT_USER\\Software\\Microsoft\\Office Test\\Special\\Perf]\r\n@=\"C:\\\\test\\\\test.dll\"<\/pre>\n<p>Interestingly, sometimes the DLL will be also loaded when e.g. Internet Explorer launches &#8211; as long as one of the office plugins is loaded into IE (and the plugin&#8217;s code or its libraries refer to the aforementioned Office Test value). There are most likely other cases since Office COM objects can be easily instantiated from other software.<\/p>\n<p>The respective global key exists under the HKLM branch i.e. HKLM\\SOFTWARE\\Microsoft\\Office Test\\Special\\Perf.<\/p>\n<p><strong>Office 2010 and WinWord<br \/>\n<\/strong><\/p>\n<p>Adding a key\/value pair shown below to Registry will guarantee that instead of a <strong>WWLIB.DLL<\/strong> that is distributed with Office 2010 a different DLL will be loaded instead anytime WinWord starts &#8211; a DLL named <strong>WWLIBcxm.DLL<\/strong>.<\/p>\n<pre style=\"padding-left: 30px;\">[HKEY_CURRENT_USER\\Software\\Microsoft\\Office\\14.0\\Word]\r\n\"CxmDll\"=dword:00000001<\/pre>\n<p>In other words, placing a custom WWLIBcxm.DLL in the Office directory (or any listed under PATH) will do the trick. Note that such DLL will need to act as a proxy for WWLIB.DLL &#8211; otherwise the WinWord won&#8217;t load (it requires WWLIB.DLL to work).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There is no doubt that Microsoft products are a subject to a lot of testing &#8211; this is understandable as it&#8217;s undeniably the most used office software in the world. It&#8217;s hard to imagine software packages that complex to be &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2014\/04\/16\/beyond-good-ol-run-key-part-10\/\">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,15,19,9],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/2322"}],"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=2322"}],"version-history":[{"count":12,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/2322\/revisions"}],"predecessor-version":[{"id":3933,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/2322\/revisions\/3933"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=2322"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=2322"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=2322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}