Hello,
I have a question similar to Jason Notovny's January 5th post.
The problem I am facing is that I need a way to run a scan for authenticated users when a csrf token is passed within Post requests on login as "_token". This value can be found within the header as a "csrf-token" variable.
I have been unable to use ZAP's functionality to write such a custom script and have opted to use Zest.
What I have ended up with is a custom Script-based Authentication login. This works when run alone, in that it successfully grants a given used into the application through login. However no scans or spidering takes place. When I attempted to apply this Zest script to the ZAP scans, it did not work. This has resulted in spidering that is not performed while authenticated and many Internal 500 errors when running an active scan.
The later shows that the Zest script appears to be ignored. The applied _token value appears to be a static value from an earlier scan and is no longer valid. Does anyone know the best method of overcoming this obstacle or a better method of simply including the csrf token?
Please note that I have created csrf tokens and enabled them within ZAP's options menu. My assumption is that this has thus far failed due to the fact that the value sent in the response is "csrf-token" and the value I need to include in the post is "_token".
Any ideas are greatly appreciated.
Thanks.
- Ben