Computer and Network Security

Table of Contents

Lecture 11: Web attacks on user

Accessing user info

User info can be accessed in many ways:

Cross-site scripting (XSS)

Used to bypass JS’s same origin policy.

Preventing XSS:

Cross-site request forgery (CSRF/XSRF)

Allows attacker to execute requests on behalf of victim. Embed a request in e.g. an image tag on a malicious page, like:

<img src="http://bank.com/transfer.php?amount=100000&dest=52345235" />

It’s a “confused deputy attack”:

Preventing CSRF:

HTTP response splitting

Exploits fact that user provided data is in header of reply.

For example, a redirect header includes the location. If that’s added verbatim, the attacker might be able to add terminating CRLFs to build a second header. This poisons the web cache, associating the attacker-generated reply with the address.

HTTP request smuggling is possible in a similar way.

Language problems

There are also language-specific vulnerabilities. PHP:

Pyhon pickle