GSLC · Question #257
Which of the following are the limitations for the cross site request forgery (CSRF) attack? Each correct answer represents a complete solution. Choose all that apply.
The correct answer is A. The attacker must determine the right values for all the form inputs. B. The attacker must target a site that doesn't check the referrer header. CSRF attacks are constrained by the attacker's inability to predict hidden form values and by sites that validate the HTTP Referer header, both of which can break the forged request.
Question
Which of the following are the limitations for the cross site request forgery (CSRF) attack? Each correct answer represents a complete solution. Choose all that apply.
Options
- AThe attacker must determine the right values for all the form inputs.
- BThe attacker must target a site that doesn't check the referrer header.
- CThe target site should have limited lifetime authentication cookies.
- DThe target site should authenticate in GET and POST parameters, not only cookies.
How the community answered
(35 responses)- A83% (29)
- C11% (4)
- D6% (2)
Why each option
CSRF attacks are constrained by the attacker's inability to predict hidden form values and by sites that validate the HTTP Referer header, both of which can break the forged request.
A fundamental limitation of CSRF is that the attacker must know all required form input values in advance. If the server includes an unpredictable anti-CSRF token as a hidden field, the attacker cannot construct a valid forged request, making the attack impossible.
If the target site inspects and validates the HTTP Referer header, it can detect that a request originated from a different domain and reject it. The attacker is therefore limited to targeting sites that omit this check.
Short-lived authentication cookies reduce the window of opportunity but do not prevent a CSRF attack from succeeding during an active session; this is a general session hygiene measure, not a structural limitation of the attack.
Requiring authentication tokens in GET/POST parameters is a defense against CSRF, not a limitation inherent to the attack itself; the question asks for conditions that constrain the attacker, not server-side countermeasures.
Concept tested: CSRF attack prerequisites and inherent limitations
Source: https://owasp.org/www-community/attacks/csrf
Topics
Community Discussion
No community discussion yet for this question.