{"id":302599,"date":"2024-05-20T18:39:29","date_gmt":"2024-05-20T10:39:29","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/302599.html"},"modified":"2024-05-20T18:39:41","modified_gmt":"2024-05-20T10:39:41","slug":"%e6%98%93%e8%af%ad%e8%a8%80%e5%a6%82%e4%bd%95%e8%bf%9c%e7%a8%8b%e6%b3%a8%e5%85%a5%e4%b8%8e%e8%bf%9c%e7%a8%8b%e8%b0%83%e7%94%a8dll%e5%87%bd%e6%95%b0","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/302599.html","title":{"rendered":"\u6613\u8bed\u8a00\u5982\u4f55\u8fdc\u7a0b\u6ce8\u5165\u4e0e\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/26214909\/c39f067e-f540-426e-9140-8f96a850395b.webp\" alt=\"\u6613\u8bed\u8a00\u5982\u4f55\u8fdc\u7a0b\u6ce8\u5165\u4e0e\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\" \/><\/p>\n<p><p>\u6613\u8bed\u8a00\u662f\u4e00\u79cd\u4e2d\u6587\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b83\u652f\u6301\u8fdc\u7a0b\u6ce8\u5165\u548c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u7684\u529f\u80fd\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u6267\u884c\u9884\u5b9a\u7684\u4ee3\u7801\u3002<strong>\u8fdc\u7a0b\u6ce8\u5165DLL\u53ef\u4ee5\u901a\u8fc7\u521b\u5efa\u8fdc\u7a0b\u7ebf\u7a0b\u3001\u4fee\u6539\u8fdc\u7a0b\u8fdb\u7a0b\u7684\u5185\u5b58\u6765\u5b9e\u73b0\uff1b\u800c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u8981\u6d89\u53ca\u5230\u6b63\u786e\u5730\u8bbe\u7f6e\u53c2\u6570\u3001\u540c\u6b65\u6267\u884c\u73af\u5883\u7b49\u6280\u672f\u7ec6\u8282<\/strong>\u3002\u5728\u4f7f\u7528\u6613\u8bed\u8a00\u8fdb\u884c\u8fdc\u7a0b\u64cd\u4f5c\u65f6\uff0c\u9700\u8981\u7279\u522b\u6ce8\u610f\u5b89\u5168\u6027\u548c\u4f9d\u8d56\u5173\u7cfb\uff0c\u786e\u4fdd\u76ee\u6807\u73af\u5883\u517c\u5bb9\u5e76\u4e14\u4e0d\u8fdd\u53cd\u6cd5\u5f8b\u6cd5\u89c4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001DLL\u8fdc\u7a0b\u6ce8\u5165\u7684\u539f\u7406\u4e0e\u5b9e\u8df5<\/p>\n<\/p>\n<p><p>\u8fdc\u7a0b\u6ce8\u5165\u6280\u672f\u901a\u5e38\u5305\u62ec\u4ee5\u4e0b\u51e0\u4e2a\u6b65\u9aa4\uff1a\u83b7\u53d6\u76ee\u6807\u8fdb\u7a0b\u7684\u53e5\u67c4\u3001\u4e3aDLL\u8def\u5f84\u5206\u914d\u5185\u5b58\u3001\u5199\u5165DLL\u8def\u5f84\u3001\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u521b\u5efa\u7ebf\u7a0b\u6267\u884cDLL\u3002\u6613\u8bed\u8a00\u63d0\u4f9b\u4e86\u76f8\u5173\u7684\u7cfb\u7edf\u8c03\u7528\u6216API\u5305\u88c5\uff0c\u7b80\u5316\u4e86\u8fd9\u4e00\u6d41\u7a0b\u3002<\/p>\n<\/p>\n<p><p><strong>\u83b7\u53d6\u76ee\u6807\u8fdb\u7a0b\u53e5\u67c4\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u9996\u5148\uff0c\u9700\u8981\u83b7\u53d6\u8981\u6ce8\u5165DLL\u7684\u76ee\u6807\u8fdb\u7a0b\u53e5\u67c4\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7<code>OpenProcess<\/code>\u51fd\u6570\u5b9e\u73b0\uff0c\u9700\u8981\u63d0\u4f9b\u9002\u5f53\u7684\u6743\u9650\u4ee5\u4fbf\u540e\u7eed\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u53e5\u67c4 = \u6253\u5f00\u8fdb\u7a0b(\u8fdb\u7a0b\u8bbf\u95ee\u6743\u9650\u96c6\u5408_\u5b8c\u5168\u8bbf\u95ee, \u5047, \u8fdb\u7a0b\u6807\u8bc6\u7b26)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u4e3aDLL\u8def\u5f84\u5206\u914d\u5185\u5b58\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u83b7\u53d6\u8fdb\u7a0b\u53e5\u67c4\u540e\uff0c\u4e0b\u4e00\u6b65\u662f\u5728\u76ee\u6807\u8fdb\u7a0b\u5185\u5b58\u7a7a\u95f4\u4e2d\u4e3aDLL\u8def\u5f84\u5b57\u7b26\u4e32\u5206\u914d\u5185\u5b58\u3002\u8fd9\u901a\u5e38\u901a\u8fc7<code>VirtualAllocEx<\/code>\u51fd\u6570\u5b9e\u73b0\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u5185\u5b58\u5730\u5740 = \u865a\u62df\u5185\u5b58\u5206\u914d(\u53e5\u67c4, 0, \u5b57\u7b26\u4e32\u957f\u5ea6(DLL\u8def\u5f84), MEM_COMMIT, PAGE_READWRITE)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5199\u5165DLL\u8def\u5f84\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u5229\u7528<code>WriteProcessMemory<\/code>\u51fd\u6570\u5c06DLL\u8def\u5f84\u5199\u5165\u521a\u624d\u5206\u914d\u7684\u5185\u5b58\u7a7a\u95f4\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u5199\u8fdb\u7a0b\u5185\u5b58(\u53e5\u67c4, \u5185\u5b58\u5730\u5740, DLL\u8def\u5f84, \u5b57\u7b26\u4e32\u957f\u5ea6(DLL\u8def\u5f84), \u5df2\u5199\u5b57\u8282\u6570)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u521b\u5efa\u7ebf\u7a0b\u6267\u884cDLL\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u901a\u8fc7<code>CreateRemoteThread<\/code>\u51fd\u6570\u521b\u5efa\u65b0\u7ebf\u7a0b\uff0c\u76ee\u6807\u8fdb\u7a0b\u5c06\u52a0\u8f7d\u5e76\u6267\u884cDLL\u6587\u4ef6\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u7ebf\u7a0b\u53e5\u67c4 = \u521b\u5efa\u8fdc\u7a0b\u7ebf\u7a0b(\u53e5\u67c4, 0, 0, \u83b7\u53d6\u5e93\u51fd\u6570\u5730\u5740(&quot;Kernel32.dll&quot;, &quot;LoadLibraryA&quot;), \u5185\u5b58\u5730\u5740, 0, \u7ebf\u7a0b\u6807\u8bc6\u7b26)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e8c\u3001\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u7684\u5b9e\u73b0<\/p>\n<\/p>\n<p><p>\u5728DLL\u88ab\u8fdc\u7a0b\u6ce8\u5165\u76ee\u6807\u8fdb\u7a0b\u540e\uff0c\u53ef\u80fd\u9700\u8981\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u8c03\u7528\u7279\u5b9a\u7684\u51fd\u6570\u3002\u8fd9\u53c8\u6d89\u53ca\u5230\u4e00\u4e9b\u590d\u6742\u7684\u6b65\u9aa4\uff1a\u786e\u5b9a\u51fd\u6570\u5730\u5740\u3001\u8bbe\u7f6e\u6b63\u786e\u7684\u8c03\u7528\u7ea6\u5b9a\u548c\u53c2\u6570\u3002<\/p>\n<\/p>\n<p><p><strong>\u786e\u5b9a\u51fd\u6570\u5730\u5740\uff1a<\/strong><\/p>\n<\/p>\n<p><p>DLL\u6ce8\u5165\u540e\uff0c\u9700\u8981\u83b7\u5f97DLL\u6a21\u5757\u7684\u57fa\u5730\u5740\uff0c\u518d\u7ed3\u5408\u8be5DLL\u6240\u5bfc\u51fa\u51fd\u6570\u7684\u76f8\u5bf9\u5730\u5740\u8ba1\u7b97\u51fa\u51fd\u6570\u7684\u5b9e\u9645\u5730\u5740\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u57fa\u5740 = \u83b7\u53d6\u8fdc\u7a0b\u6a21\u5757\u53e5\u67c4(\u53e5\u67c4, &quot;DLL\u540d\u79f0&quot;)<\/p>\n<p>\u51fd\u6570\u5730\u5740 = \u57fa\u5740 + \u51fd\u6570\u504f\u79fb\u91cf<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p><strong>\u8bbe\u7f6e\u6b63\u786e\u7684\u8c03\u7528\u7ea6\u5b9a\u548c\u53c2\u6570\uff1a<\/strong><\/p>\n<\/p>\n<p><p>\u8c03\u7528\u8fdc\u7a0b\u51fd\u6570\u4e4b\u524d\uff0c\u5fc5\u987b\u786e\u4fdd\u9075\u5faa\u6b63\u786e\u7684\u8c03\u7528\u7ea6\u5b9a\uff0c\u5e76\u4e14\u5c06\u53c2\u6570\u6b63\u786e\u5730\u4f20\u9012\u7ed9\u76ee\u6807\u51fd\u6570\u3002\u53ef\u80fd\u9700\u8981\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u7684\u5185\u5b58\u7a7a\u95f4\u624b\u52a8\u5e03\u5c40\u53c2\u6570\uff0c\u5e76\u4e14\u5728\u521b\u5efa\u8fdc\u7a0b\u7ebf\u7a0b\u65f6\u4f20\u9012\u53c2\u6570\u6307\u9488\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-cpp\">\u53c2\u6570\u5185\u5b58\u5730\u5740 = \u865a\u62df\u5185\u5b58\u5206\u914d(\u53e5\u67c4, 0, \u53c2\u6570\u5c3a\u5bf8, MEM_COMMIT, PAGE_READWRITE)<\/p>\n<p>\u5199\u8fdb\u7a0b\u5185\u5b58(\u53e5\u67c4, \u53c2\u6570\u5185\u5b58\u5730\u5740, \u53c2\u6570\u6570\u636e, \u53c2\u6570\u5c3a\u5bf8, \u5df2\u5199\u5b57\u8282\u6570)<\/p>\n<p>\u7ebf\u7a0b\u53e5\u67c4 = \u521b\u5efa\u8fdc\u7a0b\u7ebf\u7a0b(\u53e5\u67c4, 0, 0, \u51fd\u6570\u5730\u5740, \u53c2\u6570\u5185\u5b58\u5730\u5740, 0, \u7ebf\u7a0b\u6807\u8bc6\u7b26)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u4e09\u3001\u5b89\u5168\u6027\u53ca\u6cd5\u5f8b\u98ce\u9669<\/p>\n<\/p>\n<p><p>\u5728\u8fdb\u884cDLL\u6ce8\u5165\u548c\u8fdc\u7a0b\u8c03\u7528\u64cd\u4f5c\u65f6\uff0c<strong>\u5f00\u53d1\u8005\u5e94\u8003\u8651\u5b89\u5168\u6027\u548c\u5408\u6cd5\u6027<\/strong>\u3002\u56e0\u6b64\uff0c\u53ea\u5728\u7528\u6237\u6388\u6743\u7684\u524d\u63d0\u4e0b\u64cd\u4f5c\uff0c\u5e76\u786e\u4fdd\u4e0d\u4fb5\u72af\u9690\u79c1\u3002<\/p>\n<\/p>\n<p><p>\u56db\u3001\u7ed3\u5408\u5b9e\u9645\u6848\u4f8b\u8bf4\u660e<\/p>\n<\/p>\n<p><p>\u4e3a\u4e86\u5b9e\u9645\u5e94\u7528\u4ee5\u4e0a\u6280\u672f\uff0c\u5c06\u4ee5\u4e0a\u6b65\u9aa4\u5e94\u7528\u4e8e\u4e00\u4e2a\u7b80\u5355\u7684\u6848\u4f8b\uff0c\u5982\u81ea\u52a8\u5316\u6d4b\u8bd5\u6216\u7cfb\u7edf\u7ef4\u62a4\u4efb\u52a1\uff0c\u5c55\u793a\u4ece\u6ce8\u5165\u5230\u51fd\u6570\u8c03\u7528\u7684\u5b8c\u6574\u6d41\u7a0b\u3002\u901a\u8fc7\u6848\u4f8b\u5206\u6790\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u66f4\u597d\u5730\u7406\u89e3\u6bcf\u4e2a\u6b65\u9aa4\u7684\u8fd0\u4f5c\u539f\u7406\uff0c\u5e76\u5728\u5b9e\u9645\u9879\u76ee\u4e2d\u8fd0\u7528\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>\u5982\u4f55\u4f7f\u7528\u6613\u8bed\u8a00\u8fdb\u884c\u8fdc\u7a0b\u6ce8\u5165DLL\u51fd\u6570\uff1f<\/strong><\/p>\n<p>\u8fdc\u7a0b\u6ce8\u5165DLL\u51fd\u6570\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5c06\u7279\u5b9a\u7684DLL\u6587\u4ef6\u52a0\u8f7d\u5230\u76ee\u6807\u8fdb\u7a0b\u4e2d\u5e76\u6267\u884c\u5176\u4e2d\u7684\u51fd\u6570\u3002\u5728\u6613\u8bed\u8a00\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u6765\u5b9e\u73b0\u8fdc\u7a0b\u6ce8\u5165DLL\u51fd\u6570\uff1a<\/p>\n<ol>\n<li>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2aDLL\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4f60\u60f3\u8981\u8fdc\u7a0b\u8c03\u7528\u7684\u51fd\u6570\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528\u6613\u8bed\u8a00\u6765\u7f16\u5199\u8fd9\u4e2aDLL\u6587\u4ef6\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u7f16\u5199\u4e00\u4e2a\u6ce8\u5165\u5668\u7a0b\u5e8f\uff0c\u5b83\u5c06\u8d1f\u8d23\u5c06DLL\u6587\u4ef6\u52a0\u8f7d\u5230\u76ee\u6807\u8fdb\u7a0b\u4e2d\u3002\u5728\u6613\u8bed\u8a00\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7cfb\u7edf\u51fd\u6570\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0c\u5982CreateRemoteThread\u548cLoadLibrary\u3002<\/p>\n<\/li>\n<li>\n<p>\u4f60\u9700\u8981\u9009\u62e9\u4e00\u4e2a\u76ee\u6807\u8fdb\u7a0b\uff0c\u5c06DLL\u6587\u4ef6\u6ce8\u5165\u5230\u8be5\u8fdb\u7a0b\u4e2d\u3002\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u5de5\u5177\u6765\u5217\u51fa\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\uff0c\u5e76\u9009\u62e9\u5176\u4e2d\u4e00\u4e2a\u4f5c\u4e3a\u6ce8\u5165\u76ee\u6807\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e00\u65e6\u9009\u62e9\u4e86\u76ee\u6807\u8fdb\u7a0b\uff0c\u4f60\u9700\u8981\u83b7\u53d6\u8be5\u8fdb\u7a0b\u7684\u53e5\u67c4\u4ee5\u4fbf\u8fdb\u884c\u8fdc\u7a0b\u64cd\u4f5c\u3002\u53ef\u4ee5\u4f7f\u7528OpenProcess\u51fd\u6570\u6765\u83b7\u53d6\u76ee\u6807\u8fdb\u7a0b\u7684\u53e5\u67c4\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u5728\u76ee\u6807\u8fdb\u7a0b\u4e2d\u5206\u914d\u4e00\u5757\u5185\u5b58\u7a7a\u95f4\uff0c\u7528\u4e8e\u5b58\u653eDLL\u6587\u4ef6\u7684\u8def\u5f84\u3002\u53ef\u4ee5\u4f7f\u7528VirtualAllocEx\u51fd\u6570\u6765\u5206\u914d\u5185\u5b58\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e00\u65e6\u5185\u5b58\u7a7a\u95f4\u5206\u914d\u5b8c\u6210\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528WriteProcessMemory\u51fd\u6570\u5c06DLL\u6587\u4ef6\u7684\u8def\u5f84\u5199\u5165\u5230\u76ee\u6807\u8fdb\u7a0b\u7684\u5185\u5b58\u4e2d\u3002<\/p>\n<\/li>\n<li>\n<p>\u6700\u540e\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528CreateRemoteThread\u51fd\u6570\u5728\u76ee\u6807\u8fdb\u7a0b\u4e2d\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\u6765\u52a0\u8f7dDLL\u6587\u4ef6\u3002\u8fd9\u6837\uff0c\u4f60\u5c31\u53ef\u4ee5\u8fdc\u7a0b\u6267\u884cDLL\u6587\u4ef6\u4e2d\u7684\u51fd\u6570\u4e86\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8fdc\u7a0b\u6ce8\u5165DLL\u51fd\u6570\u662f\u4e00\u79cd\u9ad8\u7ea7\u6280\u672f\uff0c\u9700\u8981\u8c28\u614e\u5904\u7406\uff0c\u786e\u4fdd\u64cd\u4f5c\u5408\u6cd5\u5408\u89c4\uff0c\u5e76\u9075\u5faa\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u3002\u6b64\u5916\uff0c\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u5168\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bf9\u8fdc\u7a0b\u6ce8\u5165\u4ea7\u751f\u5f71\u54cd\uff0c\u9700\u8981\u8c28\u614e\u8c03\u8bd5\u548c\u6d4b\u8bd5\u3002<\/p>\n<p><strong>\u6613\u8bed\u8a00\u5982\u4f55\u8fdb\u884c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\uff1f<\/strong><\/p>\n<p>\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u662f\u4e00\u79cd\u5e38\u89c1\u7684\u6280\u672f\uff0c\u5b83\u53ef\u4ee5\u5728\u4e00\u4e2a\u8fdb\u7a0b\u4e2d\u8c03\u7528\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u4e2d\u7684DLL\u51fd\u6570\u3002\u5728\u6613\u8bed\u8a00\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u6765\u5b9e\u73b0\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\uff1a<\/p>\n<ol>\n<li>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u83b7\u53d6DLL\u6587\u4ef6\u6240\u5728\u8fdb\u7a0b\u7684\u53e5\u67c4\u3002\u53ef\u4ee5\u4f7f\u7528OpenProcess\u51fd\u6570\u6765\u83b7\u53d6\u8fdb\u7a0b\u7684\u53e5\u67c4\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u9700\u8981\u83b7\u53d6DLL\u6587\u4ef6\u4e2d\u51fd\u6570\u7684\u5730\u5740\u3002\u53ef\u4ee5\u4f7f\u7528GetModuleHandle\u548cGetProcAdress\u51fd\u6570\u6765\u83b7\u53d6\u51fd\u6570\u7684\u5730\u5740\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e00\u65e6\u83b7\u53d6\u4e86\u51fd\u6570\u7684\u5730\u5740\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528CallRemoteProc\u51fd\u6570\u5728\u76ee\u6807\u8fdb\u7a0b\u4e2d\u8c03\u7528DLL\u51fd\u6570\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u5728\u8fdb\u884c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u65f6\uff0c\u5fc5\u987b\u786e\u4fdd\u76ee\u6807\u8fdb\u7a0b\u5df2\u7ecf\u52a0\u8f7d\u4e86\u76f8\u5e94\u7684DLL\uff0c\u5e76\u4e14\u76ee\u6807DLL\u6587\u4ef6\u4e2d\u7684\u51fd\u6570\u4e0e\u672c\u5730DLL\u6587\u4ef6\u4e2d\u7684\u51fd\u6570\u5177\u6709\u76f8\u540c\u7684\u7b7e\u540d\u548c\u53c2\u6570\u3002\u5426\u5219\uff0c\u5c06\u65e0\u6cd5\u6b63\u5e38\u8c03\u7528\u3002<\/p>\n<p>\u6b64\u5916\uff0c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u662f\u4e00\u79cd\u9ad8\u7ea7\u6280\u672f\uff0c\u9700\u8981\u8c28\u614e\u5904\u7406\uff0c\u786e\u4fdd\u64cd\u4f5c\u5408\u6cd5\u5408\u89c4\uff0c\u5e76\u9075\u5faa\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u3002\u540c\u65f6\uff0c\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\u548c\u5b89\u5168\u8bbe\u7f6e\u53ef\u80fd\u4f1a\u5bf9\u8fdc\u7a0b\u8c03\u7528\u4ea7\u751f\u5f71\u54cd\uff0c\u9700\u8981\u8c28\u614e\u8c03\u8bd5\u548c\u6d4b\u8bd5\u3002<\/p>\n<p><strong>\u5982\u4f55\u4f7f\u7528\u6613\u8bed\u8a00\u8fdb\u884c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u5b9e\u73b0\u8de8\u8fdb\u7a0b\u901a\u4fe1\uff1f<\/strong><\/p>\n<p>\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u662f\u5b9e\u73b0\u8de8\u8fdb\u7a0b\u901a\u4fe1\u7684\u5e38\u89c1\u65b9\u6cd5\u4e4b\u4e00\u3002\u5728\u6613\u8bed\u8a00\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4\u6765\u5b9e\u73b0\u8de8\u8fdb\u7a0b\u901a\u4fe1\uff1a<\/p>\n<ol>\n<li>\n<p>\u9996\u5148\uff0c\u4f60\u9700\u8981\u521b\u5efa\u4e00\u4e2aDLL\u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u4f60\u60f3\u8981\u8fdb\u884c\u8de8\u8fdb\u7a0b\u901a\u4fe1\u7684\u51fd\u6570\u3002\u8fd9\u4e9b\u51fd\u6570\u5e94\u8be5\u80fd\u591f\u63a5\u6536\u53c2\u6570\u5e76\u8fd4\u56de\u7ed3\u679c\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f60\u53ef\u4ee5\u9009\u62e9\u4e00\u4e2a\u8fdb\u7a0b\u4f5c\u4e3a\u670d\u52a1\u7aef\uff0c\u53e6\u4e00\u4e2a\u8fdb\u7a0b\u4f5c\u4e3a\u5ba2\u6237\u7aef\u3002\u670d\u52a1\u7aef\u8d1f\u8d23\u63d0\u4f9b\u8de8\u8fdb\u7a0b\u901a\u4fe1\u7684\u51fd\u6570\uff0c\u5ba2\u6237\u7aef\u8d1f\u8d23\u8c03\u7528\u670d\u52a1\u7aef\u7684\u51fd\u6570\u5e76\u83b7\u53d6\u7ed3\u679c\u3002<\/p>\n<\/li>\n<li>\n<p>\u670d\u52a1\u7aef\u9700\u8981\u5c06DLL\u6587\u4ef6\u52a0\u8f7d\u5230\u81ea\u5df1\u7684\u8fdb\u7a0b\u4e2d\uff0c\u5e76\u521b\u5efa\u4e00\u4e2a\u7ebf\u7a0b\u6765\u76d1\u542c\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u3002\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e9b\u7cfb\u7edf\u51fd\u6570\u6765\u5b9e\u73b0\u8fd9\u4e00\u70b9\uff0c\u5982CreateThread\u548cLoadLibrary\u3002<\/p>\n<\/li>\n<li>\n<p>\u5ba2\u6237\u7aef\u9996\u5148\u9700\u8981\u83b7\u53d6\u670d\u52a1\u7aef\u8fdb\u7a0b\u7684\u53e5\u67c4\uff0c\u53ef\u4ee5\u4f7f\u7528OpenProcess\u51fd\u6570\u6765\u83b7\u53d6\u8fdb\u7a0b\u7684\u53e5\u67c4\u3002<\/p>\n<\/li>\n<li>\n<p>\u63a5\u4e0b\u6765\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u4f7f\u7528GetModuleHandle\u548cGetProcAdress\u51fd\u6570\u6765\u83b7\u53d6\u670d\u52a1\u7aefDLL\u6587\u4ef6\u4e2d\u51fd\u6570\u7684\u5730\u5740\u3002<\/p>\n<\/li>\n<li>\n<p>\u4e00\u65e6\u83b7\u53d6\u4e86\u51fd\u6570\u7684\u5730\u5740\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u4f7f\u7528CallRemoteProc\u51fd\u6570\u5728\u670d\u52a1\u7aef\u8fdb\u7a0b\u4e2d\u8c03\u7528DLL\u51fd\u6570\uff0c\u5e76\u4f20\u9012\u53c2\u6570\u3002<\/p>\n<\/li>\n<li>\n<p>\u670d\u52a1\u7aef\u5728\u6536\u5230\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\u540e\uff0c\u6267\u884c\u76f8\u5e94\u7684\u51fd\u6570\u5e76\u8fd4\u56de\u7ed3\u679c\u3002\u5ba2\u6237\u7aef\u53ef\u4ee5\u901a\u8fc7\u4e00\u4e9b\u65b9\u5f0f\u83b7\u53d6\u5230\u670d\u52a1\u7aef\u8fd4\u56de\u7684\u7ed3\u679c\u3002<\/p>\n<\/li>\n<\/ol>\n<p>\u901a\u8fc7\u4e0a\u8ff0\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5b9e\u73b0\u6613\u8bed\u8a00\u4e2d\u7684\u8de8\u8fdb\u7a0b\u901a\u4fe1\uff0c\u5e76\u5728\u4e0d\u540c\u7684\u8fdb\u7a0b\u4e4b\u95f4\u8fdb\u884c\u6570\u636e\u4ea4\u4e92\u548c\u529f\u80fd\u8c03\u7528\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u8de8\u8fdb\u7a0b\u901a\u4fe1\u662f\u4e00\u79cd\u9ad8\u7ea7\u6280\u672f\uff0c\u9700\u8981\u8c28\u614e\u5904\u7406\uff0c\u786e\u4fdd\u64cd\u4f5c\u5408\u6cd5\u5408\u89c4\uff0c\u5e76\u9075\u5faa\u76f8\u5173\u6cd5\u5f8b\u6cd5\u89c4\u3002\u540c\u65f6\uff0c\u5728\u8fdb\u884c\u8de8\u8fdb\u7a0b\u901a\u4fe1\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u8fdb\u7a0b\u95f4\u7684\u5b89\u5168\u6027\u548c\u7a33\u5b9a\u6027\uff0c\u907f\u514d\u51fa\u73b0\u610f\u5916\u60c5\u51b5\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u6613\u8bed\u8a00\u662f\u4e00\u79cd\u4e2d\u6587\u7f16\u7a0b\u8bed\u8a00\uff0c\u5b83\u652f\u6301\u8fdc\u7a0b\u6ce8\u5165\u548c\u8fdc\u7a0b\u8c03\u7528DLL\u51fd\u6570\u7684\u529f\u80fd\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u5728\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u6267\u884c\u9884\u5b9a\u7684\u4ee3\u7801\u3002 [&hellip;]","protected":false},"author":3,"featured_media":302611,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/302599"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=302599"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/302599\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/302611"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=302599"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=302599"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=302599"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}