nerdexam
GIAC

GPEN · Question #12

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 B. The attacker must target a site that doesn't check the referrer header. D. The attacker must determine the right values for all the form inputs.. CSRF attacks succeed only when the attacker can bypass referrer header validation and correctly predict all required form input values; these two conditions represent the core constraints limiting the attack.

Web Application Penetration Testing

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 target site should have limited lifetime authentication cookies.
  • BThe attacker must target a site that doesn't check the referrer header.
  • CThe target site should authenticate in GET and POST parameters, not only cookies.
  • DThe attacker must determine the right values for all the form inputs.

How the community answered

(34 responses)
  • A
    15% (5)
  • B
    79% (27)
  • C
    6% (2)

Why each option

CSRF attacks succeed only when the attacker can bypass referrer header validation and correctly predict all required form input values; these two conditions represent the core constraints limiting the attack.

AThe target site should have limited lifetime authentication cookies.

Short-lived authentication cookies reduce the window of opportunity for CSRF exploitation but represent a server-side defense mechanism, not a prerequisite constraint the attacker must satisfy to launch the attack.

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

If the target site validates the HTTP Referer header to confirm the request originates from its own domain, the forged cross-origin request will be blocked, so the attacker is limited to sites that omit this check.

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

Requiring authentication parameters in GET or POST fields rather than relying solely on cookies is a recommended CSRF mitigation technique, not a limitation that defines the conditions under which an attacker can execute the attack.

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

A CSRF attack requires the attacker to construct a fully valid request, including all form field values such as hidden tokens; unpredictable or random fields (like CSRF tokens) prevent the attacker from forging a working request.

Concept tested: CSRF attack prerequisites and constraints

Source: https://owasp.org/www-community/attacks/csrf

Topics

#CSRF#referrer header#web attack limitations#form input validation

Community Discussion

No community discussion yet for this question.

Full GPEN Practice