nerdexam
GIAC

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.

Security Architecture & Engineering

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)
  • A
    83% (29)
  • C
    11% (4)
  • D
    6% (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.

AThe attacker must determine the right values for all the form inputs.Correct

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.

BThe attacker must target a site that doesn't check the referrer header.Correct

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.

CThe target site should have limited lifetime authentication cookies.

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.

DThe target site should authenticate in GET and POST parameters, not only cookies.

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

#CSRF#cross-site request forgery#web application security#session management

Community Discussion

No community discussion yet for this question.

Full GSLC Practice