Test for CSRF

Cross-site request forgery (CSRF)Discovery

Written with a model's help from “Cross-Site Request Forgery (CSRF): How I Understand, Test, and Identify CSRF Vulnerabilities | By…” by Samadhan shimple on Samadhan (samadhanshimple) (Medium). Read the writeup before relying on it.

To test for Cross-Site Request Forgery (CSRF) vulnerabilities, identify sensitive state-changing functionality on the target application, such as changing an email address or updating account information. Capture the HTTP request for the functionality using a tool like Burp Suite, and inspect the request for CSRF tokens or other request-validation mechanisms. Check if the server properly validates the token by attempting to send a request with a missing, invalid, or unacceptable token. Also, inspect the authentication cookie attributes, particularly the SameSite attribute, to determine if it can be included in cross-site requests. Finally, validate the actual security impact by attempting to send a request from an untrusted origin and verifying if the action actually changes the server-side state.

Follow #authentication or #csrf for new tips like this one, on your notifications page and, if you choose, in a daily or weekly email.

Comments

No comments yet.