Recall & Review
beginner
What is Cross-site request forgery (CSRF)?
CSRF is a type of cyber attack where a malicious website tricks a user's browser into performing unwanted actions on a trusted site where the user is logged in.
Click to reveal answer
beginner
How does a CSRF attack typically work?
An attacker creates a fake request that looks legitimate and tricks the user's browser into sending it to a trusted website, causing actions like changing passwords or making purchases without the user's consent.
Click to reveal answer
intermediate
Why is a user’s login session important in CSRF attacks?
Because CSRF exploits the fact that the user is already logged into a trusted site, so the site trusts requests coming from the user's browser without verifying if the user intended the action.
Click to reveal answer
beginner
Name one common method to prevent CSRF attacks.
Using CSRF tokens: unique, secret values included in forms or requests that the server checks to confirm the request is genuine and intended by the user.
Click to reveal answer
intermediate
What role does the 'SameSite' cookie attribute play in CSRF protection?
The 'SameSite' attribute restricts cookies from being sent with cross-site requests, reducing the risk that a malicious site can use the user's cookies to perform CSRF attacks.
Click to reveal answer
What does CSRF stand for?
✗ Incorrect
CSRF stands for Cross-site request forgery, a type of cyber attack.
Which of the following best describes a CSRF attack?
✗ Incorrect
CSRF tricks the user's browser into sending unauthorized requests to a trusted site.
Which security measure helps prevent CSRF attacks?
✗ Incorrect
CSRF tokens verify that requests are intentional and from the user.
Why does CSRF rely on the user being logged in to the target site?
✗ Incorrect
CSRF exploits the authentication cookies sent by the browser when the user is logged in.
What does the 'SameSite' cookie attribute do to help prevent CSRF?
✗ Incorrect
'SameSite' restricts cookies from being sent with cross-site requests, reducing CSRF risk.
Explain in your own words what a Cross-site request forgery (CSRF) attack is and why it is dangerous.
Think about how a trusted website can be tricked into doing something the user did not want.
You got /4 concepts.
Describe two common ways websites protect themselves against CSRF attacks.
Consider what websites check or restrict to confirm requests are genuine.
You got /3 concepts.