Testing for CSRF flaws
The description of the CSRF vulnerability clearly suggests that it is a business logic flaw. An experienced developer would create web applications that would always include a user confirmation screen when performing critical tasks such as changing a password, updating personal details, or when making critical decisions in a financial application such as an online bank account. Testing for business logic flaws is not the job of automated web application scanners, as they work with predefined rules. For example, most of the automated scanners test for the following items to confirm the existence of a CSRF flaw in the URL:
- Checking for common antiCSRF token names in the request and response
- Trying to determine whether the application is checking the referrer field by supplying a fake referrer
- Creating mutants to check whether the application is correctly verifying the token value
- Checking for tokens and editable parameters in the query string
All of the preceding methods...