Risk(s): It may be possible to steal or manipulate customer session and cookies, which might be used to impersonate a legitimate
user, allowing the hacker to view or alter user records, and to perform transactions as that user
Fix: Validate the value of the "Referer" header, and use a one-time-nonce for each submitted form
Request/Response:
POST /Directory/Controller/Controller HTTP/1.1
Accept: application/json, text/plain, */*
Content-Type: application/json;charset=utf-8
Referer: http://bogus.referer.ibm.com
Accept-Language: en-US
User-Agent: Mozilla/4.0 (compatible; MSIE 9.0; Win32)
Host: FQDN
Connection: Keep-Alive
Cache-Control: no-cache
In this vulnerability, IBM APP Scanner tried to change the Referer Header and showed the result that it is not handled in the application.
I ran the ZAP tool today, but it did not show me the same vulnerability in there for the same codebase.
How can I make sure that this scenario can be covered during the active scan in ZAP?
Thanks,
SAI
Counting on referrer checking to protect against CSRF is a rather weak mechanism for CSRF protection so there is a chance that the finding is a false positive. (As other recommendations include use of tokens which may be either transaction or session specific.)
https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet#CSRF_Prevention_without_a_Synchronizer_Token
ZAP does have a CSRF Token scan plugin in the Beta quality active scan package.
https://github.com/zaproxy/zap-extensions/wiki/HelpAddonsAscanrulesBetaAscanbeta
I've seen this finding in appscan results, but as you point out, it's a pointless check, since the referrer is so easy to check. I ignore it.
Personally, I don't see much merit in adding this check in zap, unless someone is interested in it from a purely compliance point of view, rather than from the point of view of knowing about genuine risk.
--
You received this message because you are subscribed to the Google Groups "OWASP ZAP Developer Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zaproxy-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.