{"id":133,"date":"2022-04-10T21:45:56","date_gmt":"2022-04-10T13:45:56","guid":{"rendered":"http:\/\/www.aqwu.net\/wp\/?p=133"},"modified":"2022-04-10T21:53:50","modified_gmt":"2022-04-10T13:53:50","slug":"hacking-windows-%e7%ac%ac1%e7%ab%a0-hello-world","status":"publish","type":"post","link":"https:\/\/www.aqwu.net\/wp\/?p=133","title":{"rendered":"Hacking Windows &#8211; \u7b2c1\u7ae0: Hello World"},"content":{"rendered":"\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/github.com\/mytechnotalent\/Hacking-Windows<\/p>\n\n\n\n<p>\u6211\u4eec\u4ece\u7528 Windows \u6c47\u7f16\u8bed\u8a00\u7f16\u5199\u4e00\u4e2a\u975e\u5e38\u7b80\u5355\u7684 hello world \u7a0b\u5e8f\u5f00\u59cb\u6211\u4eec\u7684\u65c5\u7a0b\u3002\u6211\u4eec\u5c06\u5728\u672c\u7ae0\u4e2d\u4ec5\u4f7f\u7528\u7eaf\u6c47\u7f16\u8bed\u8a00\u7f16\u5199\uff0c\u56e0\u4e3a\u6211\u4eec\u5c06\u4e13\u6ce8\u4e8e C \u8bed\u8a00\u7684\u6f14\u53d8\uff0c\u51e0\u4e4e\u6240\u6709 Windows \u5f00\u53d1\u90fd\u53d1\u751f\uff0c\u56e0\u6b64\u60a8\u53ef\u4ee5\u66f4\u597d\u5730\u4e86\u89e3\u8fd9\u4e9b\u5e94\u7528\u7a0b\u5e8f\u662f\u5982\u4f55\u7ec4\u5408\u5728\u4e00\u8d77\u7684\uff0c\u5305\u542b\u5728 x86 \u548cx64\u3002<\/p>\n\n\n\n<p>\u8ba9\u6211\u4eec\u9996\u5148\u4e0b\u8f7d\u6211\u4eec\u5c06\u7528\u4f5c\u96c6\u6210\u5f00\u53d1\u73af\u5883\u7684 Visual Studio\u3002\u5728\u4e0b\u9762\u7684\u94fe\u63a5\u4e2d\u9009\u62e9 Visual Studio 2019 \u793e\u533a\u7248\u3002\u786e\u4fdd\u5728\u8bbe\u7f6e\u8fc7\u7a0b\u4e2d\u9009\u62e9\u4e86\u6240\u6709 C++ \u548c Windows \u9009\u9879\uff0c\u4ee5\u786e\u4fdd\u6784\u5efa\u73af\u5883\u5177\u6709\u6240\u6709\u5fc5\u8981\u7684\u5de5\u5177\u3002\u5982\u6709\u7591\u95ee\uff0c\u8bf7\u9009\u4e2d\u8be5\u6846\u4ee5\u5728\u5b89\u88c5\u671f\u95f4\u5c06\u5176\u5305\u62ec\u5728\u5185\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/visualstudio.microsoft.com\/downloads\">https:\/\/visualstudio.microsoft.com\/downloads<\/a><\/p>\n\n\n\n<p>\u5b89\u88c5\u540e\uff0c\u8ba9\u6211\u4eec\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee\uff0c\u5e76\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u5f00\u59cb\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee<\/li><li>Empty Projec\uff08\u7a7a\u9879\u76ee\uff09<\/li><li>Next\uff08\u4e0b\u4e00\u6b65\uff09<\/li><li>Project name\uff08\u9879\u76ee\u540d\u79f0\uff09\uff1a0x0001-hello_world-x86<\/li><li>\u9009\u4e2d\u201cPlace solution and project in the same directory\u201d\uff08\u5c06\u89e3\u51b3\u65b9\u6848\u548c\u9879\u76ee\u653e\u5728\u540c\u4e00\u76ee\u5f55\u4e2d\uff09<\/li><li>Create\uff08\u521b\u5efa\uff09<\/li><li>\u5728\u89e3\u51b3\u65b9\u6848\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u53f3\u952e\u5355\u51fb0x0001-hello_world-x86<\/li><li>Add\uff08\u6dfb\u52a0\uff09<\/li><li>New Item\u2026\uff08\u65b0\u5efa\u9879\uff09<\/li><li>main.asm<\/li><li>\u53f3\u952e\u5355\u51fb 0x0001-hello_world-x86<\/li><li>Build Dependencies\uff08\u751f\u6210\u4f9d\u8d56\u9879\uff09<\/li><li>Build Customizations\uff08\u751f\u6210\u81ea\u5b9a\u4e49\uff09<\/li><li>\u9009\u62e9masm<\/li><li>OK\uff08\u786e\u5b9a\uff09<\/li><li>\u53f3\u952e\u5355\u51fb main.asm<\/li><li>Properties\uff08\u5c5e\u6027\uff09<\/li><li>Configuration Properties\uff08\u914d\u7f6e\u5c5e\u6027\uff09<\/li><li>General\uff08\u5e38\u89c4\uff09<\/li><li>Item Type\uff08\u9879\u7c7b\u578b\uff09: Microsoft Macro Assembler<\/li><li>OK\uff08\u786e\u5b9a\uff09<\/li><\/ol>\n\n\n\n<p>\u73b0\u5728\u8ba9\u6211\u4eec\u6765\u586b\u5145\u6211\u4eec\u7684main.asm\u6587\u4ef6\u5305\u542b\u4ee5\u4e0b<a>\u5185\u5bb9<\/a>&nbsp;\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.686\n.model flat, stdcall\n.stack 4096\n\nextrn ExitProcess@4: proc\t\t;1 param 1x4\nextrn MessageBoxA@16: proc\t\t;4 params 4x4\n.data\n\tmsg_txt db \"Hello World\", 0\n\tmsg_caption db \"Hello World App\", 0\n.code\n\tmain:\n\t\tpush 0 ;UINT uType\n\t\tlea eax, msg_caption\t;LPCSTR lpCaption\n\t\tpush eax\n\t\tlea eax, msg_txt\t\t;LPCSTR lpText\n\t\tpush eax\n\t\tpush 0 ;HWND hWnd\n\t\tcall MessageBoxA@16\n \n\t\tpush 0\t\t\t\t;UINT uExitCode\n\t\tcall ExitProcess@4\n\tend main<\/code><\/pre>\n\n\n\n<p>\u795d\u8d3a\u60a8\u521a\u521a\u5728x86 Windows\u7a0b\u5e8f\u96c6\u4e2d\u521b\u5efa\u4e86\u7b2c\u4e00\u4e2ahello world\u4ee3\u7801\u3002\u8be5\u5403\u86cb\u7cd5\u4e86\uff01<\/p>\n\n\n\n<p>\u5728\u672c\u8bfe\u7a0b\u4e2d\uff0c\u6211\u4eec\u5c06\u82b1\u8d39\u5927\u90e8\u5206\u65f6\u95f4\u5b66\u4e60Win32API\u6587\u6863\u3002<\/p>\n\n\n\n<p>\u8ba9\u6211\u4eec\u82b1\u70b9\u65f6\u95f4\u56de\u987e\u4e00\u4e0b\u3002\u9996\u5148\uff0c\u6211\u4eec\u6307\u5b9a\u4e00\u4e2a.686\uff0c\u8fd9\u610f\u5473\u7740\u53ef\u4ee5\u572832\u4f4dMASM\u4e2d\u4e3a\u5954\u817ePro+\u98ce\u683c\u7684\u4f53\u7cfb\u7ed3\u6784\u7ec4\u88c5\u975e\u7279\u6743\u6307\u4ee4\u3002<\/p>\n\n\n\n<p>(VISIT <a href=\"https:\/\/docs.microsoft.com\/en-us\/cpp\/assembler\/masm\/dot-686?view=msvc-160\">https:\/\/docs.microsoft.com\/en-us\/cpp\/assembler\/masm\/dot-686?view=msvc-160<\/a>)<\/p>\n\n\n\n<p>\u6211\u4eec\u8c03\u7528\u7684\u7b2c\u4e00\u4e2aWin32API\u662fMessageBoxA\uff0c\u5b83\u63d0\u4f9b\u4e86\u4e00\u4e2aWindows\u6d88\u606f\u6846\u6765\u663e\u793a\u3002\u7136\u540e\uff0c\u6211\u4eec\u5efa\u7acb\u4e86\u4e00\u4e2a\u5e73\u9762\u5185\u5b58\u6a21\u578b\uff0c\u5b83\u4e0d\u4f7f\u7528\u7ec4\u5408\u6bb5\u6216\u504f\u79fb\u5bfb\u5740\u3002\u6211\u4eec\u8fd8\u4f7f\u7528stdcall Win32\u8c03\u7528\u7ea6\u5b9a\uff0c\u5c06\u53c2\u6570\u6309\u76f8\u53cd\u987a\u5e8f\u63a8\u9001\u5230\u5806\u6808\u4e0a\uff0c\u7136\u540e\u8c03\u7528\u8fc7\u7a0b\u3002\u88ab\u8c03\u7528\u65b9\u5728\u8c03\u7528\u540e\u6e05\u9664\u5806\u6808\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5c06\u8c03\u7528\u7684\u7b2c\u4e8c\u4e2aWin32API\u662fExitProcess\uff0c\u5b83\u7b80\u5355\u5730\u9000\u51fa\u5e94\u7528\u7a0b\u5e8f\uff0c\u5e76\u5c06\u64cd\u4f5c\u91ca\u653e\u5230Windows\u64cd\u4f5c\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>(VISIT <a href=\"https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/processthreadsapi\/nf-processthreadsapi-exitprocess\">https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/processthreadsapi\/nf-processthreadsapi-exitprocess<\/a>)<\/p>\n\n\n\n<p>\u6211\u4eec\u770b\u5230\uff0c\u8be5\u51fd\u6570\u662f\u4e00\u4e2avoid\u51fd\u6570\uff0c\u5b83\u4e0d\u8fd4\u56de\u4efb\u4f55\u5185\u5bb9\uff0c\u53ea\u6709\u4e00\u4e2a\u53c2\u6570UINT uExitCode\uff0c\u5b83\u53ea\u68c0\u7d22\u8fdb\u7a0b\u7684\u9000\u51fa\u503c\u3002<\/p>\n\n\n\n<p>\u4f60\u53ef\u80fd\u5df2\u7ecf\u6ce8\u610f\u5230\u51fd\u6570\u540e\u9762\u6709\u4e00\u4e2a\u975e\u5e38\u5947\u602a\u7684@4\u3002\u8fd9\u662f\u4e3a\u4e86\u6307\u5b9a\u8be5\u51fd\u6570\u67091\u4e2a\u53c2\u6570\u3002\u6211\u4eec\u5c06\u6bcf\u4e2a\u53c2\u6570\u4e58\u4ee54\u5f97\u5230\u8fd9\u4e2a\u540d\u79f0\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u7684\u4e0b\u4e00\u4e2aWin32API\u662fMessageBoxA\u51fd\u6570\uff0c\u5b83\u53ea\u663e\u793a\u4e00\u4e2a\u5e26\u6709\u6807\u9898\u548c\u6d88\u606f\u7684\u6a21\u5f0f\u5bf9\u8bdd\u6846\u3002<\/p>\n\n\n\n<p>(VISIT https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/winuser\/nf-winusermessageboxa)<\/p>\n\n\n\n<p>\u6211\u4eec\u8fd9\u91cc\u67094\u4e2a\u53c2\u6570\uff0c\u6240\u4ee5\u6211\u4eec\u77e5\u9053\u5728\u51fd\u6570\u7684\u672b\u5c3e\u4f1a\u6709\u4e00\u4e2a@16\u3002<\/p>\n\n\n\n<p>\u7b2c\u4e00\u4e2a\u53c2\u6570\u662fHWND HWND\uff0c\u5b83\u662f\u8981\u521b\u5efa\u7684\u6d88\u606f\u6846\u7a97\u53e3\u7684\u6240\u6709\u8005\u7684\u53e5\u67c4\uff0c\u5728\u6211\u4eec\u7684\u4f8b\u5b50\u4e2d\uff0c\u5b83\u4e3aNULL\u610f\u5473\u7740\u6d88\u606f\u6846\u6ca1\u6709\u6240\u6709\u8005\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u6211\u4eec\u6709\u4e86LPCSTR lpText\uff0c\u5b83\u5c06\u5728\u6d88\u606f\u6846\u4e2d\u663e\u793a\u6211\u4eec\u7684\u6587\u672c\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u6211\u4eec\u6709\u4e86LPCSTR lpCaption\uff0c\u5b83\u5c06\u662f\u6d88\u606f\u6846\u4e0a\u7684\u6807\u9898\u6587\u672c\u3002<\/p>\n\n\n\n<p>\u6700\u540e\u662fUINT uType\uff0c\u5b83\u53ea\u662f\u6587\u6863\u4e2d\u8868\u683c\u4e2d\u7684\u6807\u5fd7\u7ec4\u5408\u3002\u5728\u6211\u4eec\u7684\u60c5\u51b5\u4e0b\uff0c\u5b83\u5c06\u662f\u7a7a\u7684\u3002<\/p>\n\n\n\n<p>\u8bf7\u8bb0\u4f4f\uff0c\u5728stdcall\u4e2d\uff0c\u6211\u4eec\u6309\u76f8\u53cd\u7684\u987a\u5e8f\u5c06\u53c2\u6570\u63a8\u9001\u5230\u5806\u6808\u4e0a\uff0c\u6b63\u5982\u60a8\u5728\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\u770b\u5230\u7684\u90a3\u6837\u3002<\/p>\n\n\n\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5355\u51fb\u672c\u5730Windows\u8c03\u8bd5\u5668\u65c1\u8fb9\u7684\u7eff\u8272\u7bad\u5934\u6765\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u4e07\u5c81\uff0c\u6211\u4eec\u7684hello world\u6a21\u5f0f\u5bf9\u8bdd\u6846\u5f39\u51fa\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u8ba9\u6211\u4eec\u521b\u5efa\u8fd9\u6bb5\u4ee3\u7801\u7684x64\u7248\u672c\u3002<\/p>\n\n\n\n<ol class=\"wp-block-list\" type=\"1\"><li>\u521b\u5efa\u4e00\u4e2a\u65b0\u9879\u76ee<\/li><li>Empty Projec\uff08\u7a7a\u9879\u76ee\uff09<\/li><li>Next\uff08\u4e0b\u4e00\u6b65\uff09<\/li><li>Project name\uff08\u9879\u76ee\u540d\u79f0\uff09\uff1a0x0001-hello_world-x64<\/li><li>\u9009\u4e2d\u201cPlace solution and project in the same directory\u201d\uff08\u5c06\u89e3\u51b3\u65b9\u6848\u548c\u9879\u76ee\u653e\u5728\u540c\u4e00\u76ee\u5f55\u4e2d\uff09<\/li><li>Create\uff08\u521b\u5efa\uff09<\/li><li>\u5728\u89e3\u51b3\u65b9\u6848\u8d44\u6e90\u7ba1\u7406\u5668\u4e2d\u53f3\u952e\u5355\u51fb0x0001-hello_world-x64<\/li><li>Add\uff08\u6dfb\u52a0\uff09<\/li><li>New Item\u2026\uff08\u65b0\u5efa\u9879\uff09<\/li><li>main.asm<\/li><li>\u53f3\u952e\u5355\u51fb 0x0001-hello_world-x64<\/li><li>Build Dependencies\uff08\u751f\u6210\u4f9d\u8d56\u9879\uff09<\/li><li>Build Customizations\uff08\u751f\u6210\u81ea\u5b9a\u4e49\uff09<\/li><li>\u9009\u62e9masm<\/li><li>OK\uff08\u786e\u5b9a\uff09<\/li><li>\u5728\u89e3\u51b3\u65b9\u6848\u6d4f\u89c8\u5668\u4e2d\u53f3\u952e\u5355\u51fb0x0001-hello_world-x64<\/li><li>\/\/ \u53f3\u952e\u5355\u51fb main.asm<\/li><li>Properties\uff08\u5c5e\u6027\uff09<\/li><li>Configuration Properties\uff08\u914d\u7f6e\u5c5e\u6027\uff09<\/li><li>Linker\uff08\u94fe\u63a5\u5668\uff09<\/li><li>Advanced\uff08\u9ad8\u7ea7\uff09<\/li><li>Entry Point\uff08\u5165\u53e3\u70b9\uff09: main<\/li><li>OK\uff08\u786e\u5b9a\uff09<\/li><\/ol>\n\n\n\n<p>\u9009\u62e9\u201c\u8c03\u8bd5\u201d\u83dc\u5355\u680f\u53f3\u4fa7\u548c\u672c\u5730Windows\u8c03\u8bd5\u5668\u83dc\u5355\u680f\u5de6\u4fa7\u7684x64<\/p>\n\n\n\n<p>\u73b0\u5728\u8ba9\u6211\u4eec\u6765\u586b\u5145\u6211\u4eec\u7684main.asm\u6587\u4ef6\u5305\u542b\u4ee5\u4e0b\u5185\u5bb9\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>extrn MessageBoxA: proc\nextrn PostQuitMessage: proc\n.data\n\tmsg_txt db 'Hello World', 0\n\tmsg_caption db 'Hello World App', 0\n.code\n\tmain proc\n\t\tsub rsp, 20h\t\t\t;shadow stack\n\t\tmov r9, rax\t\t\t\t;UINT uType\n\t\tlea r8, msg_caption\t\t;LPCSTR lpCaption\n\t\tlea rdx, msg_txt\t\t;LPCSTR lpText\n\t\txor rcx, rcx\t\t\t;HWND hWnd\n\t\tcall MessageBoxA\n\t\tadd rsp, 20h\t\t\t;restore shadow stack\n\t\txor rcx, rcx\t\t\t;int nExitCode\n\t\tcall PostQuitMessage\n\t\tret\n\tmain endp\nend<\/code><\/pre>\n\n\n\n<p>\u6211\u4eec\u8fd8\u770b\u5230\u4e00\u4e2a\u5bf9PostQuitMessage\u7684\u8c03\u7528\uff0c\u8be5\u8c03\u7528\u4ee5int-nExitCode\u4f5c\u4e3a\u53c2\u6570\u3002<\/p>\n\n\n\n<p>&nbsp;(VISIT https:\/\/docs.microsoft.com\/en-us\/windows\/win32\/api\/winuser\/nf-winuserpostquitmessage<\/p>\n\n\n\n<p>\u795d\u8d3a\u60a8\u521a\u521a\u5728x64 Windows\u7a0b\u5e8f\u96c6\u4e2d\u521b\u5efa\u4e86\u7b2c\u4e00\u4e2ahello world\u4ee3\u7801\u3002\u53c8\u5230\u5403\u86cb\u7cd5\u7684\u65f6\u95f4\u4e86\uff01<\/p>\n\n\n\n<p>\u8ba9\u6211\u4eec\u82b1\u70b9\u65f6\u95f4\u56de\u987e\u4e00\u4e0b\u3002\u6211\u4eec\u9996\u5148\u9700\u8981\u4e86\u89e3x64\u547c\u53eb\u7ea6\u5b9a\u3002<\/p>\n\n\n\n<p>VISIT https:\/\/docs.microsoft.com\/en-us\/cpp\/build\/x64-calling-convention?view=msvc160)<\/p>\n\n\n\n<p>\u6211\u4eec\u5728x64\u4e2d\u4f7f\u7528\u7684\u662fMicrosoft x64\u547c\u53eb\u7ea6\u5b9afastcall\u3002\u6211\u4eec\u5728\u53c2\u6570\u4f20\u9012\u90e8\u5206\u770b\u5230\u7684\u662f\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cx64\u8c03\u7528\u7ea6\u5b9a\u5c06\u524d\u56db\u4e2a\u53c2\u6570\u4f20\u9012\u7ed9\u5bc4\u5b58\u5668\u4e2d\u7684\u51fd\u6570\u3002\u7528\u4e8e\u8fd9\u4e9b\u53c2\u6570\u7684\u5bc4\u5b58\u5668\u53d6\u51b3\u4e8e\u53c2\u6570\u7684\u4f4d\u7f6e\u548c\u7c7b\u578b\u3002\u5269\u4f59\u7684\u53c2\u6570\u5c06\u6309\u4ece\u53f3\u5230\u5de6\u7684\u987a\u5e8f\u63a8\u9001\u5230\u5806\u6808\u4e0a\u3002\u8c03\u7528\u65b9\u5728\u8c03\u7528\u540e\u6e05\u7406\u5806\u6808\u3002<\/p>\n\n\n\n<p>\u6700\u5de6\u8fb9\u56db\u4e2a\u4f4d\u7f6e\u7684\u6574\u6570\u503c\u53c2\u6570\u5206\u522b\u6309RCX\u3001RDX\u3001R8\u548cR9\u7684\u4ece\u5de6\u5230\u53f3\u987a\u5e8f\u4f20\u9012\u3002\u5982\u524d\u6240\u8ff0\uff0c\u7b2c\u4e94\u4e2a\u53ca\u4ee5\u4e0a\u53c2\u6570\u5728\u5806\u6808\u4e0a\u4f20\u9012\u3002\u5bc4\u5b58\u5668\u4e2d\u7684\u6240\u6709\u6574\u6570\u53c2\u6570\u90fd\u662f\u53f3\u5bf9\u9f50\u7684\uff0c\u56e0\u6b64\u88ab\u8c03\u7528\u65b9\u53ef\u4ee5\u5ffd\u7565\u5bc4\u5b58\u5668\u7684\u9ad8\u4f4d\uff0c\u53ea\u8bbf\u95ee\u5bc4\u5b58\u5668\u4e2d\u5fc5\u8981\u7684\u90e8\u5206\u3002<\/p>\n\n\n\n<p>\u524d\u56db\u4e2a\u53c2\u6570\u4e2d\u7684\u4efb\u4f55\u6d6e\u70b9\u548c\u53cc\u7cbe\u5ea6\u53c2\u6570\u90fd\u4f1a\u5728XMM0-XMM3\u4e2d\u4f20\u9012\uff0c\u5177\u4f53\u53d6\u51b3\u4e8e\u4f4d\u7f6e\u3002\u53ea\u6709\u5f53\u5b58\u5728varargs\u53c2\u6570\u65f6\uff0c\u6d6e\u70b9\u503c\u624d\u4f1a\u88ab\u653e\u5165\u6574\u6570\u5bc4\u5b58\u5668RCX\u3001RDX\u3001R8\u548cR9\u4e2d\u3002\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605Varargs\u3002\u7c7b\u4f3c\u5730\uff0c\u5f53\u76f8\u5e94\u7684\u53c2\u6570\u662f\u6574\u6570\u6216\u6307\u9488\u7c7b\u578b\u65f6\uff0cXMM0-XMM3\u5bc4\u5b58\u5668\u5c06\u88ab\u5ffd\u7565\u3002<\/p>\n\n\n\n<p>\u6839\u636ex64\u8c03\u7528\u7ea6\u5b9a\uff0c\u6211\u4eec\u9700\u8981\u4e3a\u6bcf\u4e2aQWORD\u7684\u5185\u5b58\u5355\u5143\u63d0\u4f9b\u4e00\u4e2a\u9634\u5f71\u5806\u6808\uff0c\u5e76\u4e14\u5806\u6808\u5fc5\u987b\u4e0e\u4e0b\u4e00\u6761\u6307\u4ee4\u768416\u5b57\u8282\u5bf9\u9f50\u3002<\/p>\n\n\n\n<p>\u9634\u5f71\u7a7a\u95f4\u662f\u6211\u4eec\u5fc5\u987b\u4e3a\u88ab\u8c03\u7528\u7684\u8fc7\u7a0b\u4fdd\u7559\u7684\u5f3a\u523632\u5b57\u8282\uff084&#215;8\u5b57\u8282\uff09\u3002\u5728\u8c03\u7528\u4e4b\u524d\uff0c\u6211\u4eec\u5728\u5806\u6808\u4e0a\u63d0\u4f9b32\u4e2a\u5b57\u8282\u3002\u8fd9\u4e2a\u7a7a\u95f4\u53ef\u4ee5\u4e0d\u521d\u59cb\u5316\u3002<\/p>\n\n\n\n<p>\u5728\u8fd9\u4e2a\u8c03\u7528\u7ea6\u5b9a\u4e2d\uff0c\u7b2c\u56db\u4e2a\u4e4b\u540e\u7684\u53c2\u6570\u88ab\u63a8\u9001\u5230\u5806\u6808\u4e0a\uff0c\u5806\u6808\u4f4d\u4e8e\u8fd9\u4e2a\u9634\u5f71\u7a7a\u95f4\u7684\u9876\u90e8\uff08\u63a8\u523032\u5b57\u8282\u4e4b\u524d\uff09\u3002<\/p>\n\n\n\n<p>\u7136\u540e\uff0c\u6211\u4eec\u8bbe\u7f6e\u5e76\u518d\u6b21\u8c03\u7528MessageBoxA Win32API\u3002\u6211\u4eec\u4e0d\u9700\u8981\u67e5\u770b\u53c2\u6570\uff0c\u56e0\u4e3a\u6211\u4eec\u5728x86\u793a\u4f8b\u4e2d\u5df2\u7ecf\u5904\u7406\u8fc7\u8fd9\u4e2a\u95ee\u9898\u3002<\/p>\n\n\n\n<p>\u7136\u540e\u6211\u4eec\u6062\u590d\u9634\u5f71\u5806\u6808\uff0c\u7136\u540e\u8c03\u7528ExitProcess\u3002<\/p>\n\n\n\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u5355\u51fb\u672c\u5730Windows\u8c03\u8bd5\u5668\u65c1\u8fb9\u7684\u7eff\u8272\u7bad\u5934\u6765\u8fd0\u884c\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u4e07\u5c81\uff0c\u6211\u4eec\u7684hello world\u6a21\u5f0f\u5bf9\u8bdd\u6846\u5f39\u51fa\u3002<\/p>\n\n\n\n<p>\u8fd9\u5c06\u662f\u6211\u4eec\u5728\u6240\u6709\u6c47\u7f16\u4e2d\u7f16\u5199\u4ee3\u7801\u7684\u552f\u4e00\u4f8b\u5b50\uff0c\u6211\u60f3\u4f7f\u7528\u5b98\u65b9\u7684Win32API\u8fdb\u884c\u6559\u5b66\uff0cWin32API\u672c\u673a\u662fC\u8bed\u8a00\uff0c\u4f46\u662f\u6211\u60f3\u9996\u5148\u5411\u60a8\u5c55\u793a\u5728\u5b9e\u9645\u7f16\u8bd1\u65f6\uff0c\u5b83\u5230\u5e95\u5728\u505a\u4ec0\u4e48\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/github.com\/mytechnotalent\/Hacking-Windows  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[44,43],"tags":[42],"class_list":["post-133","post","type-post","status-publish","format-standard","hentry","category-hacking_windows","category-infoarticle","tag-hacking-windows"],"views":1486,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=133"}],"version-history":[{"count":4,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions"}],"predecessor-version":[{"id":140,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/133\/revisions\/140"}],"wp:attachment":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}