Web Security II
Outline
Outline
Session fixation attack. Allows attacker to hijack unsuspecting user's session.
Example: bank.com/billpay?session=42
No!
Better approach:
Generate cookie values randomly upon logging into the website. Do not allow for setting cookie through URL params.
Outline
Outline
CSRF
Cross-site request forgery is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated.
Example:
The img causes the browser to make the request with the patsy-bank cookie. If Alice's cookie was still valid, she would pay Mallory $1000.
Outline
CSRF Defenses
But do these work in practice?
Top web vulnerabilities
"But do these work in practice?"
Yes!
Other CSRF defenses
Bring the user into the loop!
Reflected XSS
Steal the CSRF token and submit a request!
Email it to him!
One document is allowed to access another if they have both set document.domain to the same value, indicating their intent to cooperate, or neither has set document.domain and the domains in the URLs are the same.
T-Mobile Austria!
Exhibit A
Exhibit B
Exhibit C
Exhibit D