What best describes a Cross-site request forgery (CSRF) attack?
Think about how the attacker uses the user's browser to perform actions.
CSRF tricks a userβs browser into sending unwanted requests to a trusted site where the user is authenticated, without their knowledge.
Which of the following is a common and effective defense against CSRF attacks?
Look for a method that verifies the legitimacy of requests from the user.
CSRF tokens are unique values included in forms or requests that the server checks to confirm the request is genuine.
A user is logged into their bank website. Meanwhile, they visit a malicious site that contains a hidden form that submits a money transfer request to the bank. Why does this attack succeed?
Consider how browsers handle cookies and requests across different sites.
Browsers send cookies automatically with requests to the bank, even if the request originates from another site, enabling CSRF.
Which statement correctly distinguishes CSRF from Cross-site scripting (XSS)?
Think about who is being tricked in each attack type.
CSRF tricks the userβs browser into sending requests the website trusts; XSS injects malicious code into the website to attack users.
A web application uses the 'SameSite' cookie attribute set to 'Strict' for session cookies. What is the expected impact on CSRF attacks?
Consider how the 'SameSite' attribute controls cookie behavior in cross-site requests.
'SameSite=Strict' prevents cookies from being sent with requests initiated by third-party sites, blocking CSRF attempts.