{"id":1195,"date":"2012-02-18T21:04:36","date_gmt":"2012-02-18T13:04:36","guid":{"rendered":"http:\/\/115.29.108.60\/?p=1195"},"modified":"2012-02-18T21:12:25","modified_gmt":"2012-02-18T13:12:25","slug":"%e8%8e%b7%e5%8f%96%e7%b3%bb%e7%bb%9f%e8%b0%83%e7%94%a8%e5%8f%b7","status":"publish","type":"post","link":"http:\/\/115.29.108.60\/?p=1195","title":{"rendered":"\u83b7\u53d6\u7cfb\u7edf\u8c03\u7528\u53f7"},"content":{"rendered":"<pre name=\"code\" class=\"cpp\">ULONG GetSyscallId(char *pszSyscallName)\r\n{\r\n\u00a0if(NULL == pszSyscallName || '\\0' == pszSyscallName[0])\r\n\u00a0{\r\n\u00a0\u00a0return 0;\r\n\u00a0}\r\n\r\n\u00a0HMODULE hMod = GetModuleHandle(_T(\"ntdll.dll\"));\r\n\u00a0if(NULL == hMod)\r\n\u00a0{\r\n\u00a0\u00a0return 0;\r\n\u00a0}\r\n\r\n\u00a0unsigned char *pByte = (unsigned char *)GetProcAddress(hMod, pszSyscallName);\r\n\u00a0if(NULL == pByte)\r\n\u00a0{\r\n\u00a0\u00a0return 0;\r\n\u00a0}\r\n\r\n\u00a0if(0xB8 == pByte[0] &amp;&amp; 0xBA == pByte[5])\r\n\u00a0{\r\n\u00a0\u00a0return *(ULONG *)(pByte + 1);\r\n\u00a0}\r\n\u00a0else\r\n\u00a0{\r\n\u00a0\u00a0return 0;\r\n\u00a0}\r\n}<\/pre>\n<p>\u8fd9\u4e2a\u65b9\u6cd5\u7684\u539f\u7406\u5f88\u65e9\u5c31\u77e5\u9053\u4e86\uff0c\u7cfb\u7edf\u8c03\u7528\u65f6\u4f1a\u7528eax\u4fdd\u5b58\u7cfb\u7edf\u8c03\u7528\u53f7\uff1a<br \/>\n0: kd> u ntdll!NtCreateProcessEx<br \/>\nntdll!NtCreateProcessEx:<br \/>\n7c92d15e b830000000      mov     eax,30h<br \/>\n7c92d163 ba0003fe7f      mov     edx,offset SharedUserData!SystemCallStub (7ffe0300)<br \/>\n7c92d168 ff12            call    dword ptr [edx]<br \/>\n7c92d16a c22400          ret     24h<br \/>\n7c92d16d 90              nop<br \/>\n\u4e00\u76f4\u6ca1\u5b9e\u73b0\uff0c\u4eca\u5929\u5b9e\u73b0\u4e86\u4e00\u4e0b\u3002<\/p>\n<p>\u5b9e\u73b0\u8fc7\u7a0b\u4e2d\u9047\u5230\u4e86\u4e00\u4e2achar\u6bd4\u8f83\u7684\u95ee\u9898\uff0c\u4e0a\u9762\u7684\u4ee3\u7801\u4e2d\u4e00\u5f00\u59cbpByte\u6211\u4f7f\u7528\u7684\u662fchar*\uff0c\u7ed3\u679c\u8fdb\u884cchar\u6bd4\u8f83\u65f6\u53d1\u73b0char\u4e3a0xB8\u548c0xBA\u65f6\u5374\u4e0e\u5b83\u4eec\u4e0d\u76f8\u7b49\u3002\u770b\u4e86\u6c47\u7f16\u4ee3\u7801\u624d\u77e5\u9053\u662f\u5c06char movsx\u7b26\u53f7\u6269\u5c55\u540e\u518d\u8fdb\u884cdwrod\u7684cmp\u4e86\u3002\u7528unsigned char*\u5373\u53ef\u89e3\u51b3\u95ee\u9898\u3002\u7f16\u8bd1\u5668\u5e94\u8be5\u662f\u56e0\u5bf9\u9f50\u8fdb\u884c\u4e86\u4f18\u5316\u3002<\/p>\n<p>\u53c2\u8003\u8d44\u6599\uff1a<a href=\"http:\/\/www.3600safe.com\/?post=59\" target=\"_blank\">\u5728Windows 2003\u4e2dHOOK ZwCreateProcessEx<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>ULONG GetSyscallId(char *pszSyscallName) { \u00a0if(NULL ==  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19,20,23],"tags":[],"class_list":["post-1195","post","type-post","status-publish","format-standard","hentry","category-assembly","category-cplusplus","category-windows"],"_links":{"self":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/1195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1195"}],"version-history":[{"count":4,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions"}],"predecessor-version":[{"id":1199,"href":"http:\/\/115.29.108.60\/index.php?rest_route=\/wp\/v2\/posts\/1195\/revisions\/1199"}],"wp:attachment":[{"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1195"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/115.29.108.60\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}