Testing for cross-site request forgery (CSRF)
In this recipe, we will cover how to perform CSRF, where we will be able to post a comment as a different user. The application needs to be secure as a CSRF vulnerability allows the attacker to take advantage and get users to change sensitive information without them knowing.
Getting ready
To prepare for this recipe, please start ZAP and Mutillidae II. Make sure that ZAP intercepts traffic from the Mutillidae II application. You will also need a testing account in Mutillidae II to post the message.
How to do it...
- The first step is to log in to Mutillidae II with the account you created and navigate to the blog, and while the proxy is enabled, submit a blog post in the application Using the drop-down, go to OWASP 2013, then to A8 - Cross Site Request Forgery (CSRF), and then to Add to your Blog. With the proxy enabled, submit a blog post in the application:
Figure 5.11 – The Mutillidae...