┌──(i3eg1nner㉿minilite)-[~] └─$ sudo nmap --min-rate 10000 -p- 10.10.11.196 [sudo] password for i3eg1nner: Starting Nmap 7.93 ( https://nmap.org ) at 2023-06-07 21:34 EDT Warning: 10.10.11.196 giving up on port because retransmission cap hit (10). Nmap scan report for stocker.htb (10.10.11.196) Host is up (0.037s latency). Not shown: 64550 closed tcp ports (reset), 983 filtered tcp ports (no-response) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 30.17 seconds
┌──(i3eg1nner㉿minilite)-[~] └─$ sudo nmap -sT -sV -sC -p22,80 10.10.11.196 Starting Nmap 7.93 ( https://nmap.org ) at 2023-06-07 21:36 EDT Nmap scan report for stocker.htb (10.10.11.196) Host is up (0.0044s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 8.2p1 Ubuntu 4ubuntu0.5 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 3072 3d12971d86bc161683608f4f06e6d54e (RSA) | 256 7c4d1a7868ce1200df491037f9ad174f (ECDSA) |_ 256 dd978050a5bacd7d55e827ed28fdaa3b (ED25519) 80/tcp open http nginx 1.18.0 (Ubuntu) |_http-title: Stock - Coming Soon! |_http-generator: Eleventy v2.0.0 |_http-server-header: nginx/1.18.0 (Ubuntu) Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 7.01 seconds
┌──(i3eg1nner㉿minilite)-[~] └─$ sudo nmap --script=vuln -p22,80 10.10.11.196 Starting Nmap 7.93 ( https://nmap.org ) at 2023-06-07 21:37 EDT Nmap scan report for stocker.htb (10.10.11.196) Host is up (0.0036s latency).
PORT STATE SERVICE 22/tcp open ssh 80/tcp open http | http-vuln-cve2011-3192: | VULNERABLE: | Apache byterange filter DoS | State: VULNERABLE | IDs: BID:49303 CVE:CVE-2011-3192 | The Apache web server is vulnerable to a denial of service attack when numerous | overlapping byte ranges are requested. | Disclosure date: 2011-08-19 | References: | https://www.securityfocus.com/bid/49303 | https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2011-3192 | https://seclists.org/fulldisclosure/2011/Aug/175 |_ https://www.tenable.com/plugins/nessus/55976 |_http-dombased-xss: Couldn't find any DOM based XSS. |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. |_http-csrf: Couldn't find any CSRF vulnerabilities.
Nmap done: 1 IP address (1 host up) scanned in 76.35 seconds
获得的信息:开放了 22 和 80 端口,没有明显的漏洞信息,大概率是 Linux 服务系统,实际上 nmap 扫描 80 端口时会获得的 title 是被重定向到了 stocker.htb 域名,修改 hosts 文件后,访问才会正常(之所以有这种设置,是因为一个 IP 可能绑定了多个域名)
┌──(i3eg1nner㉿minilite)-[~] └─$ wfuzz --hc 301 -c -w /usr/share/seclists/Discovery/DNS/subdomains-top1million-5000.txt -H "HOST: FUZZ.stocker.htb" http://stocker.htb/ /usr/lib/python3/dist-packages/wfuzz/__init__.py:34: UserWarning:Pycurl is not compiled against Openssl. Wfuzz might not work correctly when fuzzing SSL sites. Check Wfuzz\'s documentation for more information. ******************************************************** * Wfuzz 3.1.0 - The Web Fuzzer * ********************************************************
Target: http://stocker.htb/ Total requests: 4989
===================================================================== ID Response Lines Word Chars Payload =====================================================================
有一串特殊的字符串,给出了 dev 用户的密码 dev:IHeardPassphrasesArePrettySecure,尝试是否可以通过这个密码进行 ssh 登录
1 2 3 4 5 6 7 8 9 10 11 12 13 14
┌──(i3eg1nner㉿minilite)-[~] └─$ ssh angoose@10.10.11.196 The authenticity of host '10.10.11.196 (10.10.11.196)' can't be established. ED25519 key fingerprint is SHA256:jqYjSiavS/WjCMCrDzjEo7AcpCFS07X3OLtbGHo/7LQ. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added '10.10.11.196' (ED25519) to the list of known hosts. angoose@10.10.11.196's password: Last login: Wed Jun 7 12:32:14 2023 from 10.10.16.30 angoose@stocker:~$ pwd /home/angoose angoose@stocker:~$ ls user.txt angoose@stocker:~$ cat user.txt
SyntaxError: Invalid regular expression flags at Object.compileFunction (node:vm:360:18) at wrapSafe (node:internal/modules/cjs/loader:1088:15) at Module._compile (node:internal/modules/cjs/loader:1123:27) at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) at Module.load (node:internal/modules/cjs/loader:1037:32) at Module._load (node:internal/modules/cjs/loader:878:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47