HackTheBox靶机:Sightless
靶机介绍
Sightless 是一台难度较低的 Linux 机器,包含一个为公司提供各种服务的网页。对该网页的枚举发现了一个含模板注入漏洞 CVE-2022-0944 的SQLPad实例,利用该漏洞成功进入 Docker 容器。进一步枚举发现 /etc/shadow 文件,其中包含一个密码哈希,经过破解得到密码,从而获得了主机的 SSH 访问权限。在后续的攻击过程中,枚举发现一个受盲目 XSS 漏洞 CVE-2024-34070影响的 Froxlor 实例。利用该漏洞攻击成功后,获取了 FTP 服务的访问权限,该服务包含一个 KeePass 数据库。访问数据库后,发现了 root 用户的 SSH 密钥,从而获得了主机的特权 shell 权限。
相关漏洞
- 模板注入
CVE-2022-0944 - XSS 漏洞
CVE-2024-34070
渗透过程
1. 信息收集
常规探测
探测开放端口
nmap -p- --min-rate 10000 10.10.11.32
...
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-08 14:51 EDT
Nmap scan report for 10.10.11.32 Host is up (0.023s latency).
Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE
21/tcp open ftp
22/tcp open ssh
80/tcp open http
服务详细信息探测
nmap -p 21,22,80 -sCV 10.10.11.32
Starting Nmap 7.94SVN ( https://nmap.org ) at 2024-09-08 14:54 EDT
Nmap scan report for 10.10.11.32
Host is up (0.024s latency).
PORT STATE SERVICE VERSION
21/tcp open ftp
| fingerprint-strings:
| GenericLines:
| 220 ProFTPD Server (sightless.htb FTP Server) [::ffff:10.10.11.32]
| Invalid command: try being more creative
|_ Invalid command: try being more creative
22/tcp open ssh OpenSSH 8.9p1 Ubuntu 3ubuntu0.10 (Ubuntu Linux; protocol 2.0)
| ssh-hostkey:
| 256 c9:6e:3b:8f:c6:03:29:05:e5:a0:ca:00:90:c9:5c:52 (ECDSA)
|_ 256 9b:de:3a:27:77:3b:1b:e1:19:5f:16:11:be:70:e0:56 (ED25519)
80/tcp open http nginx 1.18.0 (Ubuntu)
|_http-title: Did not follow redirect to http://sightless.htb/
|_http-server-header: nginx/1.18.0 (Ubuntu)
1 service unrecognized despite returning data. If you know the service/version, please submit the following fingerprint at https://nmap.org/cgi-bin/submit.cgi?new-service :
SF-Port21-TCP:V=7.94SVN%I=7%D=9/8%Time=66DDF2FD%P=x86_64-pc-linux-gnu%r(Ge
SF:nericLines,A0,"220\x20ProFTPD\x20Server\x20\(sightless\.htb\x20FTP\x20S
SF:erver\)\x20\[::ffff:10\.10\.11\.32\]\r\n500\x20Invalid\x20command:\x20t
SF:ry


4582

被折叠的 条评论
为什么被折叠?



