Cross-Site Request Forgery

Cross-Site Request Forgery (CSRF/XSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated. CSRF attacks specifically target state-changing requests, not theft of data, since the attacker has no way to see the response to the forged request. - OWASP

Summary

Tools

Methodology

CSRF_cheatsheet

When you are logged in to a certain site, you typically have a session. The identifier of that session is stored in a cookie in your browser, and is sent with every request to that site. Even if some other site triggers a request, the cookie is sent along with the request and the request is handled as if the logged in user performed it.

HTML GET - Requiring User Interaction

HTML GET - No User Interaction

HTML POST - Requiring User Interaction

HTML POST - AutoSubmit - No User Interaction

HTML POST - multipart/form-data With File Upload - Requiring User Interaction

JSON GET - Simple Request

JSON POST - Simple Request

With XHR :

With autosubmit send form, which bypasses certain browser protections such as the Standard option of Enhanced Tracking Protectionarrow-up-right in Firefox browser :

JSON POST - Complex Request

Labs

References

Last updated