┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ sudo nmap -sn 192.168.2.0/24 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-18 09:46 CST Nmap scan report for 192.168.2.1 Host is up (0.00018s latency). MAC Address: 0A:00:27:00:00:0A (Unknown) Nmap scan report for 192.168.2.2 Host is up (0.00026s latency). MAC Address: 08:00:27:0B:D1:2B (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.20 Host is up (0.0012s latency). MAC Address: 08:00:27:70:85:D5 (Oracle VirtualBox virtual NIC) Nmap scan report for 192.168.2.4 Host is up. Nmap done: 256 IP addresses (4 hosts up) scanned in 28.09 seconds
靶机IP:192.168.2.20
2、端口扫描
1.全端口扫描
1 2 3 4 5 6 7 8 9 10 11 12
┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ sudo nmap --min-rate 10000 -p- 192.168.2.20 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-18 09:48 CST Nmap scan report for 192.168.2.20 Host is up (0.017s latency). Not shown: 65533 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http MAC Address: 08:00:27:70:85:D5 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 15.77 seconds
┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ sudo nmap -sT -sV -O --min-rate 10000 -p22,80 192.168.2.20 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-18 09:50 CST Nmap scan report for 192.168.2.20 Host is up (0.00069s latency).
PORT STATE SERVICE VERSION 22/tcp open ssh OpenSSH 9.2p1 Debian 2+deb12u4 (protocol 2.0) 80/tcp open http Apache httpd 2.4.62 ((Debian)) MAC Address: 08:00:27:70:85:D5 (Oracle VirtualBox virtual NIC) Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose Running: Linux 4.X|5.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 OS details: Linux 4.15 - 5.8 Network Distance: 1 hop Service Info: OS: Linux; CPE: cpe:/o:linux:linux_kernel
OS and Service detection performed. Please report any incorrect results at https://nmap.org/submit/ . Nmap done: 1 IP address (1 host up) scanned in 21.30 seconds
┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ sudo nmap --script=vuln -p22,80 192.168.2.20 Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-02-18 09:51 CST Nmap scan report for 192.168.2.20 Host is up (0.00076s latency).
PORT STATE SERVICE 22/tcp open ssh 80/tcp open http |_http-dombased-xss: Couldn't find any DOM based XSS. | http-csrf: | Spidering limited to: maxdepth=3; maxpagecount=20; withinhost=192.168.2.20 | Found the following possible CSRF vulnerabilities: | | Path: http://192.168.2.20:80/ | Form id: username | Form action: / | | Path: http://192.168.2.20:80/register | Form id: username |_ Form action: /register |_http-stored-xss: Couldn't find any stored XSS vulnerabilities. | http-enum: |_ /register/: Potentially interesting folder MAC Address: 08:00:27:70:85:D5 (Oracle VirtualBox virtual NIC)
Nmap done: 1 IP address (1 host up) scanned in 64.30 seconds
找到http服务存在目录/register
二、漏洞渗透
1、WEB-80端口渗透
访问页面,是一个登录框
根据找到的/register目录,进行注册登录,成功进入页面 页面提示信息
1 2 3 4 5
**administrador** (2025/2/18 10:00:29): Bienvenido. En Token Of Love, la pasión por la ciberseguridad se une al amor digital. 欢迎光临。在《爱的信物》中,对网络安全的热情与数字爱情相遇。
**administrador** (2025/2/18 10:00:29): Dicen que las claves viajan por rutas interplanetarias, vagando por el espacio infinito y estando en todas partes a la vez… ¿será magia o pura tecnología? 😉🔮 bafybeicbqiitqxhqx47qenneilgb2ckdpweoxxkdmcnx4pda654l733lxu 据说钥匙沿着星际路线旅行,在无限的空间中漫游,同时出现在任何地方……这是魔法还是纯粹的技术? 😉🔮bafybeicbqiitqxhqx47qenneilgb2ckdpweoxxkdmcnx4pda654l733lxu
查看页面源码,找到相关的提示
1 2 3 4
Busca el conejo hacker amoroso en un mundo interplanetario ! 在星际世界中寻找可爱的黑客兔子! Solo los usuarios admin pueden enviar mensajes 只有管理员用户可以发送消息
┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ ./imgconceal --check=miao.webp Input password for the hidden file (may be blank) Password: Scanning cover image for suitable carrier bits... Done! Found file 'private.key': hidden on: Fri Feb 14 01:49:04 2025 last access: Fri Feb 14 01:40:31 2025 last modified: Thu Feb 13 08:38:30 2025 size: 1.70 KB
The cover image 'miao.webp' can hide approximately more 391.77 KB (after compression of hidden data).
发现里面隐藏着文件private.key
提取隐藏文件private.key
1 2 3 4 5
┌──(kali㉿kali)-[~/miao/thl/token-of-love] └─$ sudo ./imgconceal --extract=miao.webp --no-password --output=private Scanning cover image for suitable carrier bits... Done! SUCCESS: extracted 'private.key' from 'miao.webp'. hidden on: Fri Feb 14 01:49:04 2025