How does this Man-In-The-Middle attack work?

后端 未结 4 2079
耶瑟儿~
耶瑟儿~ 2020-12-30 03:02

The Django documentation on its CSRF protection states that:

In addition, for HTTPS requests, strict referer checking is done by CsrfViewMiddlewar

4条回答
  •  执念已碎
    2020-12-30 03:40

    The attacker can set the CSRF cookie using Set-Cookie, and then supply a matching token in the POST form data. Since the site does not tie the session cookies to the CSRF cookies, it has no way of determining that the CSRF token + cookie are genuine (doing hashing etc. of one of them will not work, as the attacker can just get a valid pair from the site directly, and use that pair in the attack).

    Directly from the django project

    (I googled for session independent nonce.)

提交回复
热议问题