{"id":1660,"date":"2019-04-01T19:01:36","date_gmt":"2019-04-01T11:01:36","guid":{"rendered":"https:\/\/blog.dynox.cn\/?p=1660"},"modified":"2023-08-10T23:43:35","modified_gmt":"2023-08-10T15:43:35","slug":"windows%e8%bf%9b%e7%a8%8b%e6%b3%a8%e5%85%a5","status":"publish","type":"post","link":"https:\/\/blog.dynox.cn\/?p=1660","title":{"rendered":"Windows\u8fdb\u7a0b\u6ce8\u5165"},"content":{"rendered":"<div class=\"gruber-markdown\"><h1>0 \u524d\u8a00<\/h1>\n<p>\u5b89\u5168\u8f6f\u4ef6\u4e3a\u4e86\u8fbe\u6210\u8fdb\u7a0b\u5b89\u5168\u53ca\u884c\u4e3a\u5ba1\u8ba1\u7684\u76ee\u6807\u7ecf\u5e38\u4f1a\u91c7\u7528\u8fdb\u7a0b\u6ce8\u5165\u7684\u65b9\u5f0f\uff0c\u5373\u5c06\u81ea\u5df1\u7684DLL\u6ce8\u5165\u81f3\u7528\u6237\u8fdb\u7a0b\u4e2d\uff0c\u4ee5\u5bf9\u6076\u610f\u7684\u6ce8\u5165\u6a21\u5757\u8fdb\u884c\u5bf9\u6297\u3002\u5c31\u8fdb\u7a0b\u6ce8\u5165\u65b9\u6cd5\u6765\u8bf4\u6709\u591a\u79cd\u65b9\u5f0f\uff0c\u6728\u9a6c\u53ca\u653b\u51fb\u65b9\u53ef\u4f7f\u7528\u7684\u624b\u6bb5\u66f4\u591a\uff0c\u6bd5\u7adf\u653b\u51fb\u8005\u5bf9\u7a33\u5b9a\u6027\u53ca\u5584\u540e\u90e8\u5206\u4e0d\u7528\u505a\u8fc7\u591a\u8003\u8651\u3002\n\u672c\u6587\u5c06\u5bf9\u6ce8\u5165\u65b9\u5f0f\u505a\u4e00\u4e2a\u7b80\u5355\u7684\u6c47\u603b\u5bf9\u6bd4\uff0c\u4e0b\u9762\u5206\u522b\u4ece\u5e94\u7528\u5c42\u53ca\u5185\u6838\u5c42\u7684\u4e0d\u540c\u5b9e\u73b0\u65b9\u6848\u8fdb\u884c\u62c6\u89e3\uff1a<\/p>\n<h1>1 \u5e94\u7528\u5c42\u6ce8\u5165\u624b\u6bb5<\/h1>\n<p>\u672c\u7ae0\u8282\u5c06\u4e3b\u8981\u4ecb\u7ecd\u5b8c\u5168\u5e94\u7528\u5c42\u7684\u6ce8\u5165\u5b9e\u73b0\u3002<\/p>\n<h2>1.1 \u8fdc\u7a0b\u7ebf\u7a0b\u53caAPC\u6ce8\u5165\u3001SetThreadContext<\/h2>\n<p>\u8fd9\u4e24\u79cd\u65b9\u5f0f\u7684\u5b9e\u73b0\u673a\u5236\u662f\u4e0d\u540c\u7684\uff0c\u4f46\u601d\u8def\u662f\u4e00\u6837\u7684\uff0c\u90fd\u9700\u8981\u4e0a\u4f20\u8d1f\u8f7d\uff08Payload\uff09\u81f3\u8981\u6ce8\u5165\u7684\u8fdb\u7a0b\u7a7a\u95f4\uff0c\u4e00\u822c\u7684\u64cd\u4f5c\u8fc7\u7a0b\u5982\u4e0b\uff1a<\/p>\n<p>\u901a\u8fc7OpenProcess\u83b7\u53d6\u8fdb\u7a0b\u53e5\u67c4(HANDLE)\uff0c\u7136\u540e\u5728\u76ee\u6807\u8fdb\u7a0b\u7a7a\u95f4\u7533\u8bf7\u5185\u5b58\uff08VirtualAlloc\u6216VirtualAllocEx]\uff09\uff0c\u7136\u540e\u8c03\u7528WriteProcessMemory\u5c06shellcode\u8d1f\u8f7d\u5199\u5165\u76ee\u6807\u8fdb\u7a0b\u7a7a\u95f4\uff0c\u6700\u540e\u8c03\u7528CreateRemoteThread\u3001NtCreateThreadEx\u3001RtlCreateUserThread\u7b49\u521b\u5efa\u7528\u6237\u7ebf\u7a0b\uff0c\u6216\u8005\u6dfb\u52a0APC\uff08QueueUserApc\uff09\u81f3\u7528\u6237\u7ebf\u7a0b\u4ee5\u5b8c\u6210shellcode\u7684\u6267\u884c\u76ee\u7684\u3002<\/p>\n<p>SetThreadContxt\u673a\u5236\u662f\u5c06\u539f\u7ebf\u7a0b\u6302\u8d77\uff08SuspendThread\uff09\uff0c\u901a\u8fc7\u4fee\u6539\u7ebf\u7a0bContext\u4e2d\u7684eip\/rip\u6307\u9488\u81f3\u4e0a\u4f20\u7684shellcode\u5730\u5740\u3002<\/p>\n<p>Shellcode\u7684\u8bbe\u8ba1\u4e00\u822c\u53ea\u662f\u7b80\u5355\u7684LdrLoadDll\u7684\u8c03\u7528\uff0c\u590d\u6742\u7684\u6709\u5982DoublePulsar\u6728\u9a6c\u6240\u91c7\u7528\u7684\uff0c\u76f4\u63a5\u5c06Payload DLL\u8fdb\u884c\u5c55\u5f00\u5e76\u624b\u5de5\u52a0\u8f7d\u3002<\/p>\n<p>\u7528\u6237\u5c42\u6ce8\u5165\u7684\u95ee\u9898\u662f\u6743\u9650\u53d7\u9650\uff0c\u53e6\u5916\u5f88\u5bb9\u6613\u88ab\u68c0\u6d4b\u5230\uff0c\u73b0\u5728\u7684\u6740\u8f6f\u666e\u904d\u90fd\u4f1a\u7279\u6b8a\u5173\u7167\u4e0a\u8ff0\u7684\u8fd9\u4e9b\u7279\u5f81\u51fd\u6570\u3002<\/p>\n<h2>1.2 Win32\u6d88\u606f\u94a9\u5b50<\/h2>\n<p>\u901a\u8fc7Win32 API SetWindowsHookEx\u6ce8\u518c\u7cfb\u7edf\u7ea7\u6d88\u606f\u94a9\u5b50\uff0c\u4ee5\u622a\u83b7\u540c\u4e00\u684c\u9762\u4e0a\u6240\u6709\u7ebf\u7a0b\u7684\u6d88\u606f\u901a\u4fe1\uff0c\u4ece\u800c\u5b9e\u73b0\u4e86DLL\u6a21\u5757\u7684\u6ce8\u5165\u3002\u5f53\u7136\u6d88\u606f\u94a9\u5b50\u7684\u5c40\u9650\u4e5f\u5f88\u660e\u663e\uff1a<\/p>\n<ol>\n<li>\u88ab\u6ce8\u5165\u8fdb\u7a0b\u5fc5\u987b\u63a5\u53d7\u7528\u6237\u8f93\u5165\uff0c\u4f7f\u7528\u4e86\u6d88\u606f\u961f\u5217\uff0c\u5982\u5e26GUI\u754c\u9762\u7a0b\u5e8f\uff1b\u670d\u52a1\u8fdb\u7a0b\u4e00\u822c\u65e0\u9700\u7528\u6237\u8f93\u5165\uff0c\u6240\u4ee5\u6b64\u79cd\u6ce8\u5165\u65b9\u6cd5\u5bf9\u670d\u52a1\u8fdb\u7a0b\u65e0\u6548\n64\u4f4d\u7cfb\u7edf\u4e2d\uff0c64\u4f4d\u8fdb\u7a0b\u53ea\u80fd\u8bbe\u7f6e\u9488\u5bf964\u4f4d\u7a0b\u5e8f\u7684\u6d88\u606fHOOK\uff0c32\u4f4d\u8fdb\u7a0b\u53ea\u9488\u5bf932\u4f4d\u7a0b\u5e8f\uff0c\u4e0d\u53ef\u4ea4\u53c9\u6df7\u7528\u3002\u548cSetWindowsHookEx\u7c7b\u4f3c\u76842. SetWinEventHook \u867d\u7136\u540c\u6837\u53ef\u4ee5\u53d6\u5230\u6240\u6709\u8fdb\u7a0b\u7684\u6d88\u606f\uff0c\u4f46\u5e76\u4e0d\u80fd\u5bfc\u81f4DLL\u6ce8\u5165\u3002<\/li>\n<li>Windows Automation API\uff1aWindows Automation API\u63d0\u4f9b\u7ed9\u7a0b\u5e8f\u8bbf\u95ee\u5176\u5b83\u7a0b\u5e8f\u7a97\u53e3\u53ca\u7ec4\u4ef6\uff08UI elements\uff09\u7684\u80fd\u529b\uff0c\u4e00\u822c\u7528\u4e8e\u81ea\u52a8\u5316\u6d4b\u8bd5\u3002\u5229\u7528Windows Automation API\u5b9e\u73b0\u6ce8\u5165\u7684\u8fc7\u7a0b\uff0c\u548c\u6d88\u606f\u94a9\u5b50\u7684\u65b9\u5f0f\u6ca1\u6709\u672c\u8d28\u533a\u522b\uff0c\u4e5f\u6709\u7740\u540c\u6837\u7684\u9650\u5236\u3002\n<h2>1.3 \u7cfb\u7edf\u63d0\u4f9b\u673a\u5236\uff08\u6ce8\u518c\u8868\u9009\u9879\uff09<\/h2>\n<h3>1) App Init DLLs<\/h3>\n<p>\u6240\u6709\u52a0\u8f7dUser32.dll\u7684\u7a0b\u5e8f\u5747\u4f1a\u81ea\u52a8\u52a0\u8f7d\u6b64\u952e\u503c\u4e0b\u7684DLL\uff0c\u4e3b\u8981\u9488\u5bf9Win7\u53ca\u4e4b\u524d\u7684Windows\u7248\u672c\uff0c\u4eceWin8\u4e4b\u540e\u6b64\u673a\u5236\u4e0d\u88ab\u63a8\u8350\u4f7f\u7528\uff0c\u5728UEFI Secure Boot\u6a21\u5f0f\u4e0b\u6b64\u9879\u88ab\u9ed8\u8ba4\u5173\u95ed\u3002<\/p><\/li>\n<\/ol>\n<p>\u6240\u5728\u6ce8\u518c\u8868\u4f4d\u7f6e\uff1a<\/p>\n<ul>\n<li>HKEY_LOCAL_MACHINE\\Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows<\/li>\n<li>HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Windows\\AppInit_DLLs<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u6b64\u65b9\u5f0f\u7684\u6728\u9a6c\u53ca\u75c5\u6bd2\uff1a<a href=\"&lt;https:\/\/www.symantec.com\/security-center\/writeup\/2006-051914-5151-99>\">Ginwui<\/a>\u3001<a href=\"https:\/\/attack.mitre.org\/software\/S0107\">Cherry Picker<\/a>\u3001<a href=\"https:\/\/attack.mitre.org\/software\/S0098\">T9000<\/a><\/p>\n<h3>2) App Cert DLLs<\/h3>\n<p>\u6240\u6709\u8c03\u7528\u4e0b\u9762Win32 API\u7684\u7a0b\u5e8f\u5747\u4f1a\u81ea\u52a8\u52a0\u8f7d\u4e0a\u8ff0\u6ce8\u518c\u8868\u4e2d\u6240\u5217\u7684DLL\u6587\u4ef6\uff1a<\/p>\n<ul>\n<li>CreateProcess<\/li>\n<li>CreateProcessAsUser<\/li>\n<li>CreateProcessWithLoginW<\/li>\n<li>CreateProcessWithTokenW<\/li>\n<li>WinExec<\/li>\n<\/ul>\n<p>\u6240\u5728\u6ce8\u518c\u8868\u4f4d\u7f6e\uff1a<\/p>\n<ul>\n<li>HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u6b64\u65b9\u5f0f\u7684\u6728\u9a6c\u53ca\u75c5\u6bd2\uff1a<a href=\"https:\/\/attack.mitre.org\/groups\/G0072\">Honeybee<\/a>\u3001<a href=\"https:\/\/attack.mitre.org\/software\/S0196\">FIN8 PUNCHBUGGY<\/a><\/p>\n<h3>3) Image File Execution Options<\/h3>\n<p>\u8fd9\u662fWindows\u7cfb\u7edf\u63d0\u4f9b\u7684\u4e00\u4e2a\u8c03\u8bd5\u8f85\u52a9\u673a\u5236\uff0c\u7528\u4ee5\u5728\u7279\u5b9a\u8fdb\u7a0b\u542f\u52a8\u6216\u9000\u51fa\u65f6\u542f\u52a8\u6307\u5b9a\u7a0b\u5e8f\uff08\u5982\u8c03\u8bd5\u5668\u7b49\uff09\u3002\u7528\u6237\u901a\u8fc7\u66f4\u6539IFEO\u952e\u503c\u8fbe\u6210\u542f\u52a8\u4e0d\u540c\u8fdb\u7a0b\u7684\u76ee\u7684\uff0c\u4ece\u800c\u5bfc\u81f4\u539f\u8fdb\u7a0b\u52a0\u8f7d\u8bf7\u6c42\u5931\u8d25\u3002<\/p>\n<p>\u6240\u5728\u6ce8\u518c\u8868\u4f4d\u7f6e\uff1a<\/p>\n<ul>\n<li>HKLM\\SOFTWARE{\\Wow6432Node}\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\<\/li>\n<li>HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\<\/li>\n<\/ul>\n<h3>4) Shim Database (SDB)\u653b\u51fb<\/h3>\n<p>Windows\u7cfb\u7edf\u901a\u8fc7Shim\u6570\u636e\u5e93\uff08SDB\u6587\u4ef6\uff0c\u4f4d\u4e8e%windir%\\AppPatch\\sysmain.sdb\uff09\u4ee5\u63d0\u5347\u5e94\u7528\u7a0b\u5e8f\u7684\u5411\u540e\u517c\u5bb9\uff08backward compatibility\uff09\u3002SDB\u6570\u636e\u5e93\u4e2d\u5305\u542b\u9488\u5bf9\u4e0a\u5343\u4e2a\u7a0b\u5e8f\u7684\u4e0a\u767e\u79cd\u914d\u7f6e\uff0c\u53ea\u8981\u6709\u7ba1\u7406\u5458\u6743\u9650\u5c31\u53ef\u64cd\u7eb5\u6b64\u6570\u636e\u5e93\uff0c\u5c31\u53ef\u4ee5\u4fee\u6539\u4efb\u610f\u7a0b\u5e8f\u7684\u5404\u79cd\u5c5e\u6027\uff0c\u5982\u4ee5\u4e0b\u591a\u79cd\u5c5e\u6027\uff1a<\/p>\n<ul>\n<li>InjectDll<\/li>\n<li>LoadLibraryRedirectFlag<\/li>\n<li>ForceAdminAccess<\/li>\n<li>RelaunchElevated<\/li>\n<li>WrpMitigation<\/li>\n<li>DisableNX<\/li>\n<li>ModifyShellLinkPath<\/li>\n<li>VirtualRegistry<\/li>\n<li>DisableAdvancedRPCClientHardening<\/li>\n<li>CorrectFilePaths<\/li>\n<li>DisableSeh<\/li>\n<li>DisableWindowsDefender<\/li>\n<li>ShellExecuteXP<\/li>\n<\/ul>\n<p>\u6d89\u53ca\u6ce8\u518c\u8868\u9879\uff1a<\/p>\n<ul>\n<li>HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\Custom<\/li>\n<li>HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\AppCompatFlags\\InstalledSDB<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u6b64\u65b9\u5f0f\u7684\u6728\u9a6c\u53ca\u75c5\u6bd2\uff1aBlackEnergy, GooKit, Roaming Tiger,QianSet.exe,VzQqgi.dll\u6728\u9a6c<\/p>\n<h2>1.4 PE\u7a0b\u5e8fIAT\u8868\u9759\u6001\u4fee\u6539<\/h2>\n<p>\u65e9\u671f\u7684Win32\u75c5\u6bd2\u5e38\u91c7\u7528\u7684\u5c31\u662f\u9759\u6001\u611f\u67d3\u65b9\u5f0f\uff0c\u4f1a\u5c06\u81ea\u8eab\u7684\u4ee3\u7801\u5199\u5165\u88ab\u88ab\u611f\u67d3\u7a0b\u5e8f\uff0c\u7136\u540e\u4fee\u6539PE\u5165\u53e3\u51fd\u6570\u81f3\u75c5\u6bd2\u7684\u4ee3\u7801\u6bb5\uff1b\u540c\u6837\u7684\u65b9\u5f0f\uff0c\u9759\u6001\u4fee\u6539PE\u6587\u4ef6\u7684\u5bfc\u5165\u8868\u4ee5\u589e\u52a0\u65b0\u7684DLL\u6ce8\u5165\u4ea6\u4e0d\u662f\u96be\u4e8b\u3002<\/p>\n<p>\u9488\u5bf9\u6709\u7b7e\u540d\u7684PE\u7a0b\u5e8f\uff0c\u7c7b\u4f3c\u7684\u4fee\u6539\u4f1a\u5bfc\u81f4\u7b7e\u540d\u6821\u9a8c\u5931\u8d25\u3002<\/p>\n<h2>1.5 DLL\u66ff\u6362<\/h2>\n<p>\u521b\u5efa\u4e00\u4e2a\u5047\u4e2a\u4f46\u5bfc\u51fa\u4e00\u6a21\u4e00\u6837\u7684DLL\u6587\u4ef6\u7528\u4ee5\u66ff\u6362\u539f\u7cfb\u7edf\u7684\uff0c\u66ff\u6362\u529e\u6cd5\u4e00\u822c\u6709\u4e24\u79cd\u529e\u6cd5\uff1a<\/p>\n<ol>\n<li>\u7cfb\u7edf\u539fDLL\u6587\u4ef6\u6539\u540d\uff0c\u5e76\u66ff\u6362\u7cfb\u7edfDLL<\/li>\n<li>\u66f4\u6539DLL\u641c\u7d22\u8def\u5f84\uff08SetDLLDirectory\uff09<\/li>\n<\/ol>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u8981\u5904\u7406\u7684\u95ee\u9898\uff1a<\/p>\n<ol>\n<li>\u7cfb\u7edf\u6a21\u5757\u7b7e\u540d\u95ee\u9898\u65e0\u6cd5\u5904\u7406\uff1aPPL\u8fdb\u7a0b\u5c06\u65e0\u6cd5\u8fd0\u884c<\/li>\n<li>\u4e0d\u540c\u7248\u672c\u7684\u7cfb\u7edfDLL\u5904\u7406\u5806\u79ef<\/li>\n<\/ol>\n<h1>2 \u5185\u6838\u5c42\u6ce8\u5165\u624b\u6bb5<\/h1>\n<p>\u5185\u6838R0\u5c42\u6ce8\u5165\u8981\u6bd4\u5e94\u7528\u5c42R3\u7684\u624b\u6bb5\u5c11\u4e86\u5f88\u591a\uff0c\u5b9e\u73b0\u96be\u5ea6\u4f1a\u5927\u4e00\u4e9b\uff0c\u4f46\u5185\u6838\u5b9e\u73b0\u66f4\u52a0\u9690\u853d\uff0c\u96be\u4ee5\u88ab\u5c4f\u853d\u3002\u901a\u8fc7\u521b\u5efa\u7528\u6237\u5c42\u7ebf\u7a0b\u6216\u63d2\u5165APC\u4ee5\u5b9e\u73b0\u6ce8\u5165\u7684\u65b9\u5f0f\u88ab\u666e\u904d\u4f7f\u7528\uff0c\u539f\u7406\u4e0a\u540cR3\u7684\u8fdc\u7a0b\u7ebf\u7a0b\u53caAPC\u6ce8\u5165\u7684\u601d\u8def\u57fa\u672c\u4e00\u81f4\uff0c\u5747\u9700\u8981\u5411\u76ee\u6807\u8fdb\u7a0b\u7a7a\u95f4\u4e0a\u8f7d\u53c2\u6570\u53cashellcode\u4ee3\u7801\uff0c\u53ea\u662fR0\u53caR3\u5404\u81ea\u4f7f\u7528\u7684\u652f\u6301\u51fd\u6570\u4e0d\u540c\u3002<\/p>\n<h2>2.1 IAT\u8868\u6ce8\u5165<\/h2>\n<p>\u5728\u8fdb\u7a0b\u521b\u5efa\u8fc7\u7a0b\u4e2d\uff0c\u5185\u6838\u9a71\u52a8\u901a\u8fc7PsSetCreateProcessNotifyRoutine\u6216PsSetCreateProcessNotifyRoutineEx\u5f97\u5230\u901a\u77e5\uff0c\u6b64\u65f6\u7528\u6237\u8fdb\u7a0b\u7684\u521b\u5efa\u8fc7\u7a0b\u662f\u88ab\u963b\u585e\u7684\uff0c\u5728\u5904\u7406\u901a\u77e5\u7684\u56de\u8c03\u4e2d\uff0c\u5185\u6838\u9a71\u52a8\u53ef\u4ee5\u4fee\u6539\u8fdb\u7a0b\u7684\u5185\u5b58\u955c\u50cf\u4e2d\u7684\u5bfc\u5165\u8868\uff0c\u5c06\u8981\u6ce8\u5165\u7684\u9a71\u52a8\u52a0\u5165\u5176\u4e2d\u3002<\/p>\n<p>\u4ee5wermgr.exe\u8fdb\u7a0b\uff08PID: 0x6bc\uff09\u7684\u521b\u5efa\u4e3a\u4f8b\uff0c\u6b64\u8fdb\u7a0b\u7531services.exe\uff08PID: 0x2bc\uff09\u521b\u5efa\uff1a\n<img decoding=\"async\" src=\"https:\/\/blog.dynox.cn\/wp-content\/uploads\/2020\/08\/Windows-inject-IAT.jpg\" alt=\"Windows\u6ce8\u5165-IAT\u8868\" \/>\n\u540e\u7eed\u4f1a\u6536\u5230\u6a21\u5757\u52a0\u8f7d\u7684\u901a\u77e5\u56de\u8c03\uff0c\u52a0\u8f7d\u6a21\u5757\u7684\u987a\u5e8f\u4f9d\u6b21\u4e3awermgr.exe\u81ea\u8eab\u3001ntdll.dll\u3001kernel32.dll\u3001KernelBase.dll\u3001msvcrt.dll\u7b49\uff0c\u56de\u8c03\u65f6\u7684\u8c03\u7528\u6808\u4e3a\uff1a\n<img decoding=\"async\" src=\"https:\/\/blog.dynox.cn\/wp-content\/uploads\/2020\/08\/Windows-inject-IAT-stack.png\" alt=\"Windows IAT\u6ce8\u5165\" \/>\n\u5bfc\u5165\u8868\u4fee\u6539\u52a8\u4f5c\u662f\u5728\u8fdb\u7a0b\u955c\u50cf\u672c\u8eab\u7684\u6a21\u5757\u52a0\u8f7d\u56de\u8c03\u4e2d\u6267\u884c\u7684\uff0c\u5373\u7a0b\u5e8f\u672c\u8eab\u6a21\u5757\u52a0\u8f7d\u7684\u65f6\u673a\u3002<\/p>\n<p>IAT\u8868\u6ce8\u5165\u7684\u4e3b\u8981\u95ee\u9898\uff1a<\/p>\n<ol>\n<li>.NET\u7a0b\u5e8f\u7684\u517c\u5bb9\u6027\u95ee\u9898<\/li>\n<li>\u6258\u7ba1\u4ee3\u7801\u4e0e\u975e\u6258\u7ba1DLL\u4ee3\u7801\u7684\u6df7\u5408<\/li>\n<li>64\u4f4d.NET\u7a0b\u5e8f\u6ca1\u6709\u5bfc\u5165\u8868\u9879<\/li>\n<li>\u53d7\u4fdd\u62a4\u8fdb\u7a0b\u7684\u6ce8\u5165\u95ee\u9898\uff0c\u5fc5\u987b\u8981\u901a\u8fc7NTDLL HOOK\u6765\u89e3\u51b3\uff0c\u56e0\u4e3a\u521b\u5efaSection\u5bf9\u8c61\u65f6\u5185\u6838\u4f1a\u9a8c\u8bc1DLL\u7b7e\u540d\u7b49\uff0c\u5728IAT\u5df2\u6ce8\u5165\u7684\u60c5\u51b5\u4e0b\u7b7e\u540d\u53c8\u65e0\u6cd5\u7b7e\u8bc1\u901a\u8fc7\u65f6\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u52a0\u8f7d\u5931\u8d25<\/li>\n<\/ol>\n<h2>2.2 Shellcode\u6ce8\u5165<\/h2>\n<p>\u521b\u5efa\u7528\u6237\u7ebf\u7a0b\u53ca\u63d2\u5165APC\u7684\u6ce8\u5165\u624b\u6bb5\u5747\u9700\u8981\u4e0a\u8f7dshellcode\u4ee3\u7801\u81f3\u76ee\u6807\u8fdb\u7a0b\uff0cshellcode\u53ef\u4ee5\u53ea\u662f\u7b80\u5355\u7684LdrLoadDll\u8c03\u7528\u7528\u4ee5\u52a0\u8f7dHOOK\u5f15\u64ce\u53ca\u5de5\u4f5c\u6a21\u5757\uff0c\u590d\u6742\u4e00\u4e9b\u7684\u8bdd\u53ef\u4ee5\u5728\u5185\u6838\u5c42\u5c06DLL\u624b\u5de5\u52a0\u8f7d\u81f3\u76ee\u6807\u8fdb\u7a0b\u7a7a\u95f4\uff0c\u6b63\u5982\u6728\u9a6cDoublePulsar\u6240\u5b9e\u73b0\u7684\u52a0\u8f7d\u5668\u3010D23\u3011&quot;Generic Relective DLL Loader&quot;\u6216\u8005\u5185\u6838\u5c42Turla Driver Loader\uff08TDL\uff09\u9a71\u52a8\u52a0\u8f7d\u5668\u3010D18\u3011\u3002<\/p>\n<p>\u5e38\u7528shellcode\/payload\u6784\u9020\uff08BlackBone\u7684\u5b9e\u73b0\uff09\uff1a<\/p>\n<pre><code class=\"prettyprint\" class=\"language-c\">\/\/ shellcode for X64\nUCHAR code[] =\n{\n0x48, 0x83, 0xEC, 0x28,             \/\/ sub rsp, 0x28\n0x48, 0x31, 0xC9,                   \/\/ xor rcx, rcx\n0x48, 0x31, 0xD2,                   \/\/ xor rdx, rdx\n0x49, 0xB8, 0, 0, 0, 0, 0, 0, 0, 0, \/\/ mov r8, ModuleFileName   offset+12\n0x49, 0xB9, 0, 0, 0, 0, 0, 0, 0, 0, \/\/ mov r9, ModuleHandle     offset+28\n0x48, 0xB8, 0, 0, 0, 0, 0, 0, 0, 0, \/\/ mov rax, LdrLoadDll      offset+32\n0xFF, 0xD0,                         \/\/ call rax\n0x48, 0xBA, 0, 0, 0, 0, 0, 0, 0, 0, \/\/ mov rdx, COMPLETE_OFFSET offset+44\n0xC7, 0x02, 0x7E, 0x1E, 0x37, 0xC0, \/\/ mov [rdx], CALL_COMPLETE\n0x48, 0x83, 0xC4, 0x28,             \/\/ add rsp, 0x28\n0xC3                                \/\/ ret\n};\n\n\/\/ shellcode for X86\nUCHAR code[] =\n{\n0x68, 0, 0, 0, 0,                   \/\/ push ModuleHandle        offset+01\n0x68, 0, 0, 0, 0,                   \/\/ push ModuleFileName      offset+06\n0x6A, 0,                            \/\/ push Flags\n0x6A, 0,                            \/\/ push PathToFile\n0xE8, 0, 0, 0, 0,                   \/\/ call LdrLoadDll          offset+15\n0xBA, 0, 0, 0, 0,                   \/\/ mov edx, COMPLETE_OFFSET offset+20\n0xC7, 0x02, 0x7E, 0x1E, 0x37, 0xC0, \/\/ mov [edx], CALL_COMPLETE\n0xC2, 0x04, 0x00                    \/\/ ret 4\n};<\/code><\/pre>\n<h3>1) \u521b\u5efa\u7528\u6237\u7ebf\u7a0b<\/h3>\n<p>\u521b\u5efa\u7528\u6237\u7ebf\u7a0b\u4e00\u822c\u901a\u8fc7NtCreateThreadEx\uff08Visata\u53ca\u4ee5\u540eOS\uff09\u6216NtCreateThread\uff08XP\uff09\uff0c\u8fd9\u4e24\u4e2a\u51fd\u6570\u5728\u5185\u6838\u4e2d\u5747\u672a\u5bfc\u51fa\u4e14\u662f\u672a\u516c\u5f00\u7684\uff0c\u5176\u5730\u5740\u83b7\u53d6\u53ef\u4ee5\u901a\u8fc7SSDT\u6216\u8005ntoskrnl\u955c\u50cf\u89e3\u6790\u5b8c\u6210\u3002<\/p>\n<pre><code class=\"prettyprint\" class=\"language-c\">NTKERNELAPI NTSTATUS NTAPI\nNtCreateThread(\n__out PHANDLE ThreadHandle,\n__in ACCESS_MASK DesiredAccess,\n__in_opt POBJECT_ATTRIBUTES ObjectAttributes,\n__in HANDLE ProcessHandle,\n__out PCLIENT_ID ClientId,\n__in PCONTEXT ThreadContext,\n__in PINITIAL_TEB InitialTeb,\n__in BOOLEAN CreateSuspended\n);\n\nNTKERNELAPI NTSTATUS NTAPI\nNtCreateThreadEx(\nOUT PHANDLE hThread,\nIN ACCESS_MASK DesiredAccess,\nIN PVOID ObjectAttributes,\nIN HANDLE ProcessHandle,\nIN PVOID lpStartAddress,\nIN PVOID lpParameter,\nIN ULONG Flags,\nIN SIZE_T StackZeroBits,\nIN SIZE_T SizeOfStackCommit,\nIN SIZE_T SizeOfStackReserve,\nOUT PVOID lpBytesBuffer\n);<\/code><\/pre>\n<h3>2) APC\u6ce8\u5165<\/h3>\n<p>\u5728\u5185\u6838\u4e2d\u6784\u9020\u4e00\u4e2aAPC\u7ed3\u6784\u5e76\u6dfb\u52a0\u81f3\u7528\u6237\u7ebf\u7a0b\u7684APC\u961f\u5217\uff0c\u7b49\u6761\u4ef6\u6ee1\u8db3\u65f6\u7cfb\u7edf\u4f1a\u6267\u884cAPC\u4e2d\u8bbe\u5b9a\u7684callback\uff0c\u4ece\u800c\u8fbe\u6210\u8fdb\u7a0bDLL\u6ce8\u5165\u7684\u76ee\u7684\u3002<\/p>\n<p>\u76f8\u5173\u51fd\u6570\u539f\u578b\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"prettyprint\" class=\"language-c\">NTKERNELAPI VOID NTAPI\nKeInitializeApc (\n__out PRKAPC    Apc,\n__in PRKTHREAD  Thread,\n__in KAPC_ENVIRONMENT   Environment,\n__in PKKERNEL_ROUTINE   KernelRoutine,\n__in_opt PKRUNDOWN_ROUTINE  RundownRoutine,\n__in_opt PKNORMAL_ROUTINE   NormalRoutine,\n__in_opt KPROCESSOR_MODE    ProcessorMode,\n__in_opt PVOID  NormalContext\n);\n\nNTKERNELAPI BOOLEAN NTAPI\nKeInsertQueueApc    (\n__inout PRKAPC  Apc,\n__in_opt PVOID  SystemArgument1,\n__in_opt PVOID  SystemArgument2,\n__in KPRIORITY  Increment\n);<\/code><\/pre>\n<p>360\u5b89\u5168\u536b\u58eb\u7684\u9a71\u52a8360fsflt.sys\u3001\u6728\u9a6cDoublePulsar\u3010D22\u3011\u7b49\u6240\u91c7\u7528\u7684\u65b9\u5f0f\u5c31\u662fKernel APC\u6ce8\u5165\uff0c\u8fd9\u79cd\u65b9\u5f0f\u88ab\u666e\u904d\u4f7f\u7528\u3002\u4f46APC\u6ce8\u5165\u8981\u6ce8\u610f\u4ee5\u4e0b\u95ee\u9898\uff1a<\/p>\n<ol>\n<li>\u65f6\u673a\u95ee\u9898\uff1a\u8981\u6c42\u6240\u6ce8\u5165\u8fdb\u7a0b\u5df2\u7ecf\u521b\u5efa\u4e86\u7ebf\u7a0b\u5e76\u4e14\u5df2\u7ecf\u6267\u884c\uff08\u4e3b\u7ebf\u7a0b\u90fd\u662f\u7d27\u968f\u8fdb\u7a0b\u521b\u5efa\u7684\uff09<\/li>\n<li>\u4f9d\u8d56\u7ebf\u7a0b\u72b6\u6001\uff1aAPC\u7684\u6267\u884c\u4f9d\u8d56\u4e8e\u6240\u6ce8\u5165\u7ebf\u7a0b\u7684\u72b6\u6001\uff1a\u4e00\u822c\u662f\u4ece\u5185\u6838\u6001\u5207\u6362\u56de\u7528\u6237\u6001\u65f6\u6267\u884c<\/li>\n<li>\u5fc5\u987b\u4e0e\u6ce8\u5165\u7ebf\u7a0b\u505a\u540c\u6b65\uff0c\u6216\u8005\u5728\u6240\u6ce8\u5165\u7ebf\u7a0b\u73af\u5883\u4e2d\u63d2\u5165APC\uff0c\u4e0d\u7136\u53ef\u80fd\u4f1a\u6ce8\u5165\u81f3\u9519\u8bef\u8fdb\u7a0b\uff0c\u53e6\u5916\u4e0e\u7b2c\u4e09\u65b9\u9a71\u52a8\u540c\u65f6\u6ce8\u5165APC\u5b58\u5728\u7ade\u4e89\u53ca\u4e00\u81f4\u6027\u95ee\u9898\uff0c\u5f53\u7136\u7ade\u4e89\u7a97\u53e3\u6781\u5c0f; \u6bcf\u4e2a\u7ebf\u7a0b\u5747\u6709\u4e24\u4e2aAPC\u961f\u5217\uff0c\u5f53\u7ebf\u7a0b\u5728\u5185\u6838\u6001\u4e0b\u8c03\u7528KeAttachProcess\u65f6\u4f1a\u505a\u5207\u6362\uff0c\u5207\u6362\u8fc7\u7a0b\u4e2d\u6ca1\u6709\u4efb\u4f55\u4fdd\u62a4<\/li>\n<\/ol>\n<h3>3) HOOK NTDLL\u65b9\u5f0f<\/h3>\n<p>\u5185\u6838\u9a71\u52a8\u53ef\u4ee5\u901a\u8fc7\u5185\u6838\u7684\u56de\u8c03\u673a\u5236\u622a\u83b7\u7528\u6237\u8fdb\u7a0b\u521b\u5efa\u53caPE\u52a0\u8f7d\u5668\u52a0\u8f7d\u5e76\u521d\u59cb\u5316DLL\u94fe\u7684\u6bcf\u4e2a\u73af\u8282\uff0c\u53ef\u4ee5\u76d1\u63a7\u5230\u6307\u5b9a\u6a21\u5757\u52a0\u8f7d\u65f6\u540c\u6b65\u8fdb\u884cinline hook\uff0c\u5e76\u5c06\u5173\u6ce8\u70b9\u7684\u6267\u884c\u6d41\u7a0b\u5bfc\u5411\u81f3\u5df2\u4e0a\u8f7d\u7684shellcode\u8d1f\u8f7d\u3002<\/p>\n<p>\u56de\u8c03\u672c\u8eab\u662f\u4e32\u884c\u5728\u7a0b\u5e8f\u7684\u52a0\u8f7d\u6d41\u7a0b\u4e2d\u7684\uff0c\u5373\u56de\u8c03\u4e0d\u8fd4\u56de\uff0c\u8fdb\u7a0b\u7684\u521b\u5efa\u53caDLL\u7684\u52a0\u8f7d\u8fc7\u7a0b\u662f\u88ab\u963b\u585e\u7684\uff0c\u7701\u5374\u4e86\u540c\u6b65\u4e0e\u4e0d\u4e00\u81f4\u6027\u7684\u95ee\u9898\u7684\u5904\u7406\u3002<\/p>\n<p>\u4e4b\u6240\u4ee5\u8981\u9009\u62e9ntdll.dll\u7684\u539f\u56e0\u662f\uff0cntdll.dll\u662f\u6240\u6709\u7684Win32\u7a0b\u5e8f\u5fc5\u987b\u52a0\u8f7d\u7684\uff0c\u5e76\u4e14\u5176\u6267\u884c\u8fc7\u7a0b\u6bd4\u7a0b\u5e8f\u672c\u8eab\u7684\u5165\u53e3\u6267\u884c\u8981\u65e9\uff1b\u53e6\u5916\u9009\u62e9ntdll.dll\u800c\u4e0d\u662fKernel32.dll\u7b49\u6a21\u5757\u7684\u539f\u56e0\u662f\uff0cKernel32.dll\u7b49\u6a21\u5757\u5e76\u4e0d\u662f\u5fc5\u987b\u7684\uff0c\u6bd4\u5982Native\u7a0b\u5e8f\u5982csrss,exe\u3001autochk.exe\u7b49\uff0c\u8fd8\u6709\u4e00\u4e9b\u7a0b\u5e8f\u5c06Kernel32.dll\u7b49\u6a21\u5757\u8bbe\u7f6e\u4e3aDelay-Loading-DLL\uff0c\u5e76\u4e0d\u4f1a\u5728\u7a0b\u5e8f\u542f\u52a8\u4e4b\u521d\u5c31\u7acb\u5373\u52a0\u8f7d\u5e76\u6267\u884c\u3002<\/p>\n<p>\u4e3a\u4e86\u5c3d\u65e9\u5730\u83b7\u53d6\u63a7\u5236\u6743\uff0c\u5e38\u7528\u7684HOOK\u70b9\u4e00\u822c\u653e\u5728ntdll!LdrInitializeThunk\u3001ntdll!NtOpenDirectoryObject\u6216\u8005ntdll!LdrLoadDLL\u7b49\u5173\u952e\u51fd\u6570\u70b9\u3002Haiheiwang\u6728\u9a6c\u3010D16\u3011\u5c31\u662f\u901a\u8fc7\u4fee\u6539ntdll!NtTestAlert\u7684\u6d41\u7a0b\u5c06\u81ea\u5df1\u7684\u5de5\u4f5c\u6a21\u5757\u52a0\u5165\u88ab\u611f\u67d3\u8fdb\u7a0b\u7684\uff0c\u5f53\u7136ntdll!NtTestAlert\u4e5f\u5b58\u5728\u65f6\u673a\u8f83\u665a\u7684\u95ee\u9898\uff0c\u5e76\u4e0d\u80fd\u6ee1\u8db3\u54b1\u4eec\u7684\u9700\u6c42\u3002<\/p>\n<p>\u8fd9\u79cd\u65b9\u5f0f\u5728\u5b89\u5168\u8f6f\u4ef6\u4e2d\u4e5f\u5e7f\u6cdb\u4f7f\u7528\uff0c\u7279\u522b\u662f\u5bf9\u9488\u5bf9Win8\u7cfb\u7edf\u5e74\u5f15\u5165\u7684\u53d7\u4fdd\u62a4\u8fdb\u7a0b\u7684\u6ce8\u5165\u95ee\u9898\uff0c\u7531\u5185\u6838\u6ce8\u5165Shellcode\u5e76\u901a\u8fc7HOOK ntdll!NtCreateSection\u6765\u52a0\u8f7d\u975e\u7cfb\u7edf\u6a21\u5757\u662f\u6700\u5b9e\u7528\u4e14\u6709\u6548\u65b9\u5f0f\uff0c\u76ee\u524d360\u5b89\u5168\u536b\u58eb\u7684\u6ce8\u5165\u4ea6\u662f\u91c7\u7528\u6b64\u65b9\u5f0f\u3002\u53d7\u4fdd\u62a4PPL\u8fdb\u7a0b\u53ea\u5bf9\u7528\u6237\u5c42\u7684Section\u5bf9\u8c61\u521b\u5efa\u6709\u7b7e\u540d\u9a8c\u8bc1\uff0c\u6211\u4eec\u901a\u8fc7\u5c06\u5185\u6838\u5c42\u521b\u5efaSection\u5bf9\u8c61\u6620\u5c04\u81f3\u7528\u6237\u7a7a\u95f4\u7684\u65b9\u5f0f\u8fbe\u6210\u5411\u53d7\u4fdd\u62a4PPL\u8fdb\u7a0b\u6ce8\u5165\u7684\u76ee\u7684\u3002<\/p>\n<p>\u5176\u5b83\u7684\u66ff\u4ee3\u65b9\u6848\u4f1a\u5bfc\u81f4\u53d7\u4fdd\u62a4\u8fdb\u884c\u5b89\u5168\u6027\u7684\u59a5\u534f\u7b49\uff0c\u6bd4\u5982\u77ed\u6682\u53d6\u6d88\u53d7\u4fdd\u62a4\u8fdb\u884c\u7684\u4fdd\u62a4\u72b6\u6001\u4ee5\u8fbe\u6210\u6ce8\u5165\u76ee\u7684\uff0c\u6b64\u79cd\u65b9\u5f0f\u6709\u53ef\u80fd\u4f1a\u89e6\u53d1KPP\/PG\u68c0\u6d4b\u5931\u6548\uff0c\u53e6\u5916\u4e5f\u5f88\u5bb9\u6613\u88ab\u7b2c\u4e09\u65b9\u6076\u610f\u5229\u7528\uff0c\u6bd4\u5982MalwareFox AntiMalware\u7684\u4e00\u4e2a\u88ab\u66dd\u5149\u7684\u6f0f\u6d1e\u3010D24: MalwareFox AntiMalware 2.74.0.150 LPE\u3011\u3002<\/p>\n<p>Shellcode\u5185\u5b58\u6620\u5c04\u53ef\u4ee5\u5728HOOK\u5f15\u64ce\u6a21\u5757\u52a0\u8f7d\u4e4b\u540e\u8fdb\u884c\u9500\u6bc1\uff0c\u5b58\u5728\u7a97\u53e3\u65f6\u95f4\u975e\u5e38\u77ed\uff0c\u88ab\u5176\u5b83\u5b89\u5168\u8f6f\u4ef6\u67e5\u5230\u6216\u88ab\u5176\u5b83\u6076\u610f\u7a0b\u5e8f\u6240\u5229\u7528\u7684\u53ef\u80fd\u6bd4\u8f83\u5c0f\u3002<\/p>\n<h1>3 \u53c2\u8003\u8d44\u6599<\/h1>\n<h3>3.1 \u6d4f\u89c8\u5668\u81ea\u8eab\u9632\u62a4\u8d44\u8baf<\/h3>\n<p><a href=\"https:\/\/www.ghacks.net\/2018\/08\/20\/about-google-chromes-incompatible-applications-warning\/\">B1: About Google Chrome's incompatible applications warning<\/a><\/p>\n<p><a href=\"https:\/\/www.ghacks.net\/2019\/01\/21\/firefox-will-block-dll-injections\/\">B2: Firefox will block DLL Injections<\/a><\/p>\n<p><a href=\"https:\/\/blogs.windows.com\/msedgedev\/2015\/11\/17\/microsoft-edge-module-code-integrity\">B3: Protecting Microsoft Edge against binary injection<\/a><\/p>\n<h3>3.2 \u8fdb\u7a0bDLL\u6ce8\u5165\u8d44\u6599<\/h3>\n<p><a href=\"http:\/\/blogs.microsoft.co.il\/pavely\/2017\/09\/05\/dll-injection-with-setthreadcontext\/\">D1: DLL Injection with SetThreadContext<\/a><\/p>\n<p><a href=\"&lt;http:\/\/deniable.org\/misc\/inject-all-the-things>\">D2: R3 DLL Injection: Inject All The Things<\/a><\/p>\n<p><a href=\"https:\/\/www.countercept.com\/blog\/analyzing-the-doublepulsar-kernel-dll-injection-technique\/\">D3: COUNTERCEPT: Analyzing the DOUBLEPULSAR Kernel DLL Injection Technique<\/a><\/p>\n<p><a href=\"https:\/\/www.countercept.com\/blog\/dynamic-shellcode-execution\/\">D4: COUNTERCEPT: Dynamic Shellcode Execution<\/a><\/p>\n<p><a href=\"https:\/\/www.endgame.com\/blog\/technical-blog\/ten-process-injection-techniques-technical-survey-common-and-trending-process\">D5: Ten Process Injection Techniques<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/dennisfischer\/dll-injector-sample\">D6: DLL Injector via Windows Automation API<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/dlls\/secure-boot-and-appinit-dlls\">D7: Microsoft: AppInit DLLs and Secure Boot<\/a><\/p>\n<p><a href=\"https:\/\/www.blackhat.com\/docs\/eu-15\/materials\/eu-15-Pierce-Defending-Against-Malicious-Application-Compatibility-Shims-wp.pdf\">D8: BlackHat: Malicious Application Compatibility Shims<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.fireeye.com\/blog\/threat-research\/2017\/05\/fin7-shim-databases-persistence.html>\">D9: To SDB, Or Not To SDB: FIN7 Leveraging Shim Databases for Persistence<\/a><\/p>\n<p><a href=\"https:\/\/www.freebuf.com\/news\/48878.html\">D10: FreeBuf: \u8d70\u8fd1\u5fae\u8f6f\u5b89\u5168\u6280\u672fShim<\/a><\/p>\n<p><a href=\"https:\/\/abi-laboratory.pro\/index.php?view=windows\">D11: ABICC: Windows API\/ABI Changes Analysis<\/a><\/p>\n<p><a href=\"https:\/\/attack.mitre.org\/techniques\/T1138\/\">D12: MITRE ATT&amp;CK: Application Shimming<\/a><\/p>\n<p><a href=\"&lt;http:\/\/files.brucon.org\/2015\/Tomczak_and_Ballenthin_Shims_for_the_Win.pdf>\">D13: FireEye: The Real Shim Shady<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.syscan360.org\/slides\/2014_ZH_UsingandAbusingMicrosoftsFixItPatches_JonErickson.pdf>\">D14: iSIGHTPARTNERS: \u56fa\u5b88: \u5fae\u8f6fFix It\u8865\u4e01\u673a\u5236\u539f\u7406\u53ca\u653b\u51fb\u5229\u7528<\/a><\/p>\n<p><a href=\"&lt;https:\/\/4hou.win\/wordpress\/?p=16225>\">D15: \u817e\u8baf\uff1a\u6728\u9a6c\u725f\u5229\u518d\u51fa\u65b0\u62db-\u6076\u610f\u5229\u7528Windows shim\u6280\u672f\u9501\u4e3b\u9875<\/a><\/p>\n<p><a href=\"https:\/\/slab.qq.com\/news\/tech\/1338.html\">D16: \u817e\u8baf\uff1aHaiheiwang\u6728\u9a6c\u5206\u6790<\/a><\/p>\n<p><a href=\"&lt;http:\/\/www.opening-windows.com\/techart_windows_vista_apc_internals2.htm>\">D17: Windows Vista APC Internals<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/hfiref0x\/TDL\">D18: TDL: Turla Driver Loader<\/a><\/p>\n<p><a href=\"https:\/\/ntquery.wordpress.com\/2014\/03\/31\/scylla-and-api-set-map\/\">D19: Scylla and API Set Map<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/apiindex\/windows-apisets\">D20: Microsoft Docs: Windows API Sets<\/a><\/p>\n<p><a href=\"http:\/\/www.nirsoft.net\/articles\/windows_7_kernel_architecture_changes.html\">D21: Windows_7_Kernel_Changes: api-ms-win-core DLLs<\/a><\/p>\n<p><a href=\"https:\/\/www.countercept.com\/blog\/analyzing-the-doublepulsar-kernel-dll-injection-technique\/\">D22: DOUBLEPULSAR Kernel DLL Injection Technique<\/a><\/p>\n<p><a href=\"https:\/\/www.countercept.com\/blog\/doublepulsar-usermode-analysis-generic-reflective-dll-loader\/\">D23: DOUBLEPULSAR: Generic Reflective DLL Loader<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.exploit-db.com\/exploits\/43987>\">D24: MalwareFox AntiMalware 2.74.0.150 - LPE<\/a> <\/p>\n<p><a href=\"https:\/\/www.mdsec.co.uk\/2018\/10\/cisco-amp-bypassing-self-protection\/\">D25\uff1aDLL Injection via SetDLLDirectory<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.codeproject.com\/Articles\/16541\/Create-your-Proxy-DLLs-automatically>\">D26: CodeProject: Create your Proxy DLLs automatically<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.codeproject.com\/Articles\/18888\/Proxy-WS2-32-DLL-to-create-your-own-firewall>\">D27: Proxy WS2_32.DLL to create your own firewall<\/a><\/p>\n<p><a href=\"&lt;https:\/\/www.codeproject.com\/Articles\/2082\/API-hooking-revealed?msg=2932507>\">D28: CodeProject: API hooking revealed<\/a><\/p>\n<h3>3.3 DLL\u6ce8\u5165\u5546\u4e1a\u65b9\u6848<\/h3>\n<p><a href=\"https:\/\/www.shellterproject.com\/exclusive-features\/\">D30: Shellter Pro: DLL Injection Kit<\/a><\/p>\n<p><a href=\"&lt;http:\/\/help.madshi.net\/DllInjecting.htm>\">D31: madCodeHook: DLL Injection Kit<\/a><\/p>\n<h3>3.4 \u5f00\u6e90HOOK\u5f15\u64ce<\/h3>\n<p><a href=\"&lt;https:\/\/github.com\/Microsoft\/Detours>\">H1: Microsoft Detours<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/wbenny\/DetoursNT\">H2: Detours NT<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/TsudaKageyu\/minhook\">H3: minhook<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/martona\/mhook\">H4: mhook<\/a><\/p>\n<p><a href=\"http:\/\/easyhook.github.io\/index.html\">H5: EasyHook<\/a><\/p>\n<p><a href=\"https:\/\/www.nektra.com\/products\/deviare-api-hook-windows\/\">H6: Deviare Hook Engine<\/a><\/p>\n<h3>3.5 Instrumentation Callback<\/h3>\n<p><a href=\"https:\/\/bbs.pediy.com\/thread-223285.htm\">I1: \u5229\u7528KPROCESS\u7ed3\u6784\u7684InstrumentationCallback\u57df\u5b9e\u73b0Hook<\/a><\/p>\n<p><a href=\"&lt;https:\/\/github.com\/secrary\/Hooking-via-InstrumentationCallback\/tree\/master\/instrumentationcallback>\">I2: Hooking-via-InstrumentationCallback<\/a><\/p>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/Estoteric%20Hooks.pdf\">I3: Alex Ionescu: Hooking Nirvana<\/a><\/p>\n<h3>3.6 PPL (Protected Process Light)<\/h3>\n<p><a href=\"&lt;https:\/\/googleprojectzero.blogspot.com\/2018\/10\/injecting-code-into-windows-protected.html>\">P1: Injecting Code into Windows Protected Processes using COM - Part 1<\/a><\/p>\n<p><a href=\"&lt;https:\/\/googleprojectzero.blogspot.com\/2018\/11\/injecting-code-into-windows-protected.html>\">P2: Injecting Code into Windows Protected Processes using COM - Part 2<\/a><\/p>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/?p=97\">P3: The Evolution of Protected Processes Part 1: Pass-the-Hash Mitigations in Windows 8.1<\/a><\/p>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/?p=116\">P4: The Evolution of Protected Processes Part 2: Exploit\/Jailbreak Mitigations, Unkillable Processes and Protected Services<\/a><\/p>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/?p=146\">P5: Protected Processes Part 3 : Windows PKI Internals (Signing Levels, Scenarios, Root Keys, EKUs &amp; Runtime Signers)<\/a><\/p>\n<p><a href=\"&lt;https:\/\/github.com\/Mattiwatti\/PPLKiller>\">P6: Protected Processes Light killer<\/a><\/p>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/?p=34\">P7: Why Protected Processes Are A Bad Idea<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/services\/protecting-anti-malware-services-\">P8: Micorosft: Protecting Anti-Malware Services<\/a><\/p>\n<p><a href=\"&lt;https:\/\/docs.microsoft.com\/en-us\/windows\/desktop\/w8cookbook\/secured-boot>\">P9: Microsoft: Early launch antimalware<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/security\/threat-protection\/intelligence\/virus-initiative-criteria\">P10: Microsoft Virus Initiative<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/Microsoft\/Windows-driver-samples\/tree\/master\/security\/elam\">P11: Early Launch Anti-Malware Driver<\/a><\/p>\n<h3>3.7 WSL (Windows Subsystem for Linux)<\/h3>\n<p><a href=\"http:\/\/www.alex-ionescu.com\/publications\/blackhat\/blackhat2016.pdf\">W1: The Linux kernel hidden inside Windows 10<\/a><\/p>\n<p><a href=\"https:\/\/github.com\/ionescu007\/lxss\">W2: Fun with the Windows Subsystem for Linux (WSL\/LXSS)<\/a><\/p>\n<p><a href=\"https:\/\/www.countercept.com\/blog\/hunting-for-windows-subsystem-for-linux\/\">W3: Hunting for Windows Subsystem for Linux<\/a><\/p>\n<p><a href=\"https:\/\/labs.portcullis.co.uk\/blog\/exploring-windows-subsystem-for-linux\/\">W4: Exploring Windows Subsystem for Linux<\/a><\/p>\n<p><a href=\"https:\/\/www.virusbulletin.com\/uploads\/pdf\/conference_slides\/2015\/Batchelder-VB2015.pdf\">W5: Windows 10 and the Anti-malware Ecosystem<\/a><\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/wsl\/2016\/05\/23\/pico-process-overview\/\">W6: Pico Process Overview<\/a><\/p>\n<p><a href=\"https:\/\/blogs.msdn.microsoft.com\/wsl\/2016\/06\/08\/wsl-system-calls\/\">W7: WSL System Calls<\/a><\/p>\n<p>--- END ---<\/p><\/div>","protected":false},"excerpt":{"rendered":"<p>0 \u524d\u8a00 \u5b89\u5168\u8f6f\u4ef6\u4e3a\u4e86\u8fbe\u6210\u8fdb\u7a0b\u5b89\u5168\u53ca\u884c\u4e3a\u5ba1\u8ba1\u7684\u76ee\u6807\u7ecf\u5e38\u4f1a\u91c7\u7528\u8fdb\u7a0b\u6ce8\u5165\u7684\u65b9\u5f0f\uff0c\u5373\u5c06\u81ea\u5df1\u7684DLL\u6ce8\u5165\u81f3\u7528\u6237\u8fdb\u7a0b\u4e2d\uff0c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[9,1],"tags":[612,615,510,448,621,394,613,614],"views":1450,"_links":{"self":[{"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/posts\/1660"}],"collection":[{"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1660"}],"version-history":[{"count":5,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/posts\/1660\/revisions"}],"predecessor-version":[{"id":1732,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=\/wp\/v2\/posts\/1660\/revisions\/1732"}],"wp:attachment":[{"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1660"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1660"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.dynox.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1660"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}