nerdexam
GIAC

GCIH · Question #324

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 limited by the attacker needing to know all required form inputs and by targeting only sites that do not validate the HTTP referrer header.

Web Application Attacks & Post-Exploitation

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

(57 responses)
  • A
    70% (40)
  • C
    12% (7)
  • D
    18% (10)

Why each option

CSRF attacks are limited by the attacker needing to know all required form inputs and by targeting only sites that do not validate the HTTP referrer header.

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

If a form has unpredictable fields such as a CSRF token or captcha, the attacker cannot forge a valid request, which directly limits the attack's viability.

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

Sites that verify the HTTP Referer or Origin header can detect and reject cross-origin requests, so the attacker is restricted to targeting sites that omit this check.

CThe target site should have limited lifetime authentication cookies.

Short-lived authentication cookies are a defensive mitigation that reduces the attack window but are a security recommendation for the target site, not a constraint the attacker must navigate to craft the attack.

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

Using token-based authentication in GET and POST parameters rather than relying solely on cookies is a CSRF defense mechanism for the site, not a pre-condition limitation imposed on the attacker.

Concept tested: CSRF attack preconditions and constraints

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

Topics

#CSRF#referrer header#authentication cookies#form input validation

Community Discussion

No community discussion yet for this question.

Full GCIH Practice