A security analyst is reviewing an assessment report for a web application that identified a Cross-Site Request Forgery (CSRF) vulnerability in a user profile management module. Which of the following strategies directly mitigate this specific vulnerability? (Select TWO).
- Utilizing unique anti-CSRF synchronizer tokens validated on all state-changing requestsCevap
- Configuring session cookies with the SameSite attribute set to Strict or LaxCevap
- CEnforcing multi-factor authentication (MFA) during the initial user login process
- DApplying parameterized SQL database queries for user search inputs
Cevap
The strategies that directly mitigate Cross-Site Request Forgery (CSRF) are utilizing unique anti-CSRF synchronizer tokens validated on state-changing requests, and configuring session cookies with the SameSite attribute set to Strict or Lax.
Cross-Site Request Forgery (CSRF) leverages an existing authenticated browser session to execute unintended commands. Implementing unique anti-CSRF synchronizer tokens ensures that state-changing requests include a secret, unpredictable value that an attacker cannot forge. Setting the SameSite attribute (Strict or Lax) on session cookies provides additional defense-in-depth by preventing the browser from automatically sending authentication cookies with cross-site requests.
Adım Adım Çözüm
Anahtar Kavram
Cross-Site Request Forgery (CSRF) Prevention