{"id":7036,"date":"2020-03-20T22:09:54","date_gmt":"2020-03-20T22:09:54","guid":{"rendered":"http:\/\/www.hexacorn.com\/blog\/?p=7036"},"modified":"2020-03-20T22:17:19","modified_gmt":"2020-03-20T22:17:19","slug":"shimbad-the-sailor-part-2","status":"publish","type":"post","link":"https:\/\/www.hexacorn.com\/blog\/2020\/03\/20\/shimbad-the-sailor-part-2\/","title":{"rendered":"ShimBad the Sailor, Part 2"},"content":{"rendered":"\n<p>This part is more about archaeology than anything else.<\/p>\n\n\n\n<p>The built-in SHIM database includes a number of test shims, which I will cover below.<\/p>\n\n\n\n<p>On Windows XP, you will find these two:<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"696\" height=\"367\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_1.png\" alt=\"\" class=\"wp-image-7037\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_1.png 696w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_1-300x158.png 300w\" sizes=\"(max-width: 696px) 100vw, 696px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>So, if you happen to name your executable one of these:<\/p>\n\n\n\n<ul><li>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/li><li>WindowsXPAppsHelpMechanismTestApp.exe<\/li><\/ul>\n\n\n\n<p>you can immediately see their effect after you try to run them on XP:<\/p>\n\n\n\n<p><strong> WindowsXPAppsHelpMechanismBlockedTestApp.exe <\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"417\" height=\"268\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_2.png\" alt=\"\" class=\"wp-image-7038\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_2.png 417w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_2-300x193.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_2-80x50.png 80w\" sizes=\"(max-width: 417px) 100vw, 417px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><strong>WindowsXPAppsHelpMechanismTestApp.exe<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"417\" height=\"268\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_3.png\" alt=\"\" class=\"wp-image-7039\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_3.png 417w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_3-300x193.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_xp_3-80x50.png 80w\" sizes=\"(max-width: 417px) 100vw, 417px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>On Win7 we got a few more:<\/p>\n\n\n\n<ul><li>AppsHelpMechanismTestAppBadMsg.exe<\/li><li>AppsHelpMechanismTestAppBadMsgBlocked.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/li><li>WindowsXPAppsHelpMechanismTestApp.exe<\/li><\/ul>\n\n\n\n<p>The first one runs with no issues.<\/p>\n\n\n\n<p>The second one is blocked without any indication.<\/p>\n\n\n\n<p>The visible messages are as follows:<\/p>\n\n\n\n<p><strong>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_3.png\"><img decoding=\"async\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_3.png\" alt=\"\" class=\"wp-image-7040\" width=\"500\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_3.png 572w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_3-300x147.png 300w\" sizes=\"(max-width: 572px) 100vw, 572px\" \/><\/a><\/figure><\/div>\n\n\n\n<p><strong>WindowsXPAppsHelpMechanismTestApp.exe <\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_4.png\"><img decoding=\"async\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_4.png\" alt=\"\" class=\"wp-image-7041\" width=\"500\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_4.png 602w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_7_4-300x141.png 300w\" sizes=\"(max-width: 602px) 100vw, 602px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Finally, on Win10 it goes as follows:<\/p>\n\n\n\n<ul><li>AppsHelpMechanismTestAppBadMsg.exe<\/li><li>AppsHelpMechanismTestAppBadMsgBlocked.exe<\/li><li>BlockedTestApp_AMD64.exe<\/li><li>BlockedTestApp_AMD64_ANY.exe<\/li><li>BlockedTestApp_WOW64.exe<\/li><li>BlockedTestApp_X86_AMD64.exe<\/li><li>BlockedTestApp_X86_ANY.exe<\/li><li>BlockedTestApp_X86_WOW.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestApp2.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestAppSpecific.exe<\/li><\/ul>\n\n\n\n<p>and visible outputs are:<\/p>\n\n\n\n<p><strong>AppsHelpMechanismTestAppBadMsgBlocked.exe <\/strong>\/<br><strong>BlockedTestApp_WOW64.exe \/  <\/strong><br><strong>BlockedTestApp_X86_AMD64.exe <\/strong>\/<br><strong>BlockedTestApp_X86_ANY.exe<\/strong> \/ <br><strong>BlockedTestApp_X86_WOW.exe<\/strong> \/ <br><strong>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/strong> \/ <br><strong>WindowsXPAppsHelpMechanismBlockedTestApp2.exe<\/strong> \/  <br><strong>WindowsXPAppsHelpMechanismBlockedTestAppSpecific.exe<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_10_5.png\"><img decoding=\"async\" loading=\"lazy\" width=\"356\" height=\"222\" src=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_10_5.png\" alt=\"\" class=\"wp-image-7042\" srcset=\"https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_10_5.png 356w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_10_5-300x187.png 300w, https:\/\/www.hexacorn.com\/blog\/wp-content\/uploads\/2020\/03\/shim_10_5-80x50.png 80w\" sizes=\"(max-width: 356px) 100vw, 356px\" \/><\/a><\/figure><\/div>\n\n\n\n<p>Okay. That&#8217;s it.<\/p>\n\n\n\n<p>Hmm not really&#8230; digging through internals of SDB on Windows 10 one more time I gathered the following (and hopefully complete) list of all the the test suite items:<\/p>\n\n\n\n<ul><li>AppsHelpMechanismTestAppBadMsg.exe<\/li><li>AppsHelpMechanismTestAppBadMsgBlocked.exe<\/li><li>BlockedTestApp_AMD64.exe<\/li><li>BlockedTestApp_AMD64_ANY.exe<\/li><li>BlockedTestApp_WOW64.exe<\/li><li>BlockedTestApp_X86_AMD64.exe<\/li><li>BlockedTestApp_X86_ANY.exe<\/li><li>BlockedTestApp_X86_WOW.exe<\/li><li>WICAMockAppReinstallUpgrade.exe<\/li><li>WICAMockAppReinstallUpgrade2.exe<\/li><li>WICAMockAppReinstallUpgrade3.exe<\/li><li>WICAMockAppReinstallUpgradeInfo.exe<\/li><li>WICAMockAppReinstallUpgradeWarn.exe<\/li><li>WICAMockAppReinstallUpgradeWarnBackup.exe<\/li><li>WindowsTH_BlockedSetupTestApp.exe<\/li><li>WindowsTH_TestApp_HardBlock_FWLink.exe<\/li><li>WindowsTH_TestApp_HardBlock_KBArticle.exe<\/li><li>WindowsTH_TestApp_HardBlock_NoInfo.exe<\/li><li>WindowsTH_TestApp_HardBlock_StoreId.exe<\/li><li>WindowsTH_TestApp_HardBlock_Wildcard1.exe<\/li><li>WindowsTH_TestApp_HardBlock_Wildcard2.exe<\/li><li>WindowsTH_TestApp_SoftBlock_FWLink.exe<\/li><li>WindowsTH_TestApp_SoftBlock_KBArticle.exe<\/li><li>WindowsTH_TestApp_SoftBlock_NoInfo.exe<\/li><li>WindowsTH_TestApp_SoftBlock_StoreId.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestApp.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestApp2.exe<\/li><li>WindowsXPAppsHelpMechanismBlockedTestAppSpecific.exe<\/li><li>WindowsXPAppsHelpMechanismTestApp.exe<\/li><li>WindowsXPAppsHelpMechanismTestApp2.exe<\/li><li>WindowsXPAppsHelpMechanismTestAppSpecific.exe<\/li><\/ul>\n\n\n\n<p>So, how could you use it for malicious purposes? I dunno&#8230; One thought I have is about emulators. If you created a child process using one of these names (creation of such process should fail by SHIM design), could you use the successful exitcode from that process to detect an emulator?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This part is more about archaeology than anything else. The built-in SHIM database includes a number of test shims, which I will cover below. On Windows XP, you will find these two: So, if you happen to name your executable &hellip; <a href=\"https:\/\/www.hexacorn.com\/blog\/2020\/03\/20\/shimbad-the-sailor-part-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,44,41],"tags":[],"_links":{"self":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/7036"}],"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=7036"}],"version-history":[{"count":2,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/7036\/revisions"}],"predecessor-version":[{"id":7044,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/posts\/7036\/revisions\/7044"}],"wp:attachment":[{"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/media?parent=7036"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/categories?post=7036"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hexacorn.com\/blog\/wp-json\/wp\/v2\/tags?post=7036"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}