Giter Site home page Giter Site logo

Comments (11)

preetkaran20 avatar preetkaran20 commented on June 10, 2024

This issue is because of the way the Header Variant of ZAP works, where the header variant doesn't allow to inject payload in Authorization header (and some of the others) as for scan rules like SQL etc there is no need for injecting the payload in the authorization header. However, in the case of JWT scan rule auth header becomes very important. Code: https://github.com/zaproxy/zaproxy/blob/main/zap/src/main/java/org/parosproxy/paros/core/scanner/VariantHeader.java#L107-L108

@psiinon @thc202 @kingthorin how do we handle such use cases for other scan rules? Do we need to add a way to handle these special usecases?

thanks,
Karan

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

Detailed email conversation:
Gmail - Regarding the JWT Zap Scanner.pdf

from owasp-zap-jwt-addon.

thc202 avatar thc202 commented on June 10, 2024

If an (AbstractAppParamPlugin) scan rule needs to scan an excluded header it should do so by overriding the scan() method.

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

Hi @thc202,

oh ok, then I need to move the code of scan method into the JWT Scan rule and then manipulate the paramlist of headerVariant, right?

thanks,
Karan

from owasp-zap-jwt-addon.

thc202 avatar thc202 commented on June 10, 2024

I was thinking that it would "manually" check for the header and attack it. Since the scan rule is relying on NameValuePair for the scan you could override scan(List<NameValuePair>) and call the base method with a copy of that list plus the Authorization header (if present) when they are of the header type.

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

hmm yeah, that makes sense.

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

PR to fix the issue: #32

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

Merged the PR, Now waiting for the release of the addon: zaproxy/zaproxy#7028

from owasp-zap-jwt-addon.

preetkaran20 avatar preetkaran20 commented on June 10, 2024

Hi @yaakov123

The newer version of addon is available in market place with this issue's fix. Please try it out.

Thanks,
Karan

from owasp-zap-jwt-addon.

Kemosabert avatar Kemosabert commented on June 10, 2024

Hey @preetkaran20 👋

I am encountering the same issue with a test app that I've set up for exactly this integration. I am on the latest version of both the owasp zap client (2.14.0) as well as the addon (1.0.3). I see that the addon is available and active in the progress overview, but it does not seem to do any requests while in the request inspector I can see the JWT's being sent in the Authorization header and cookies.

Could you help me out?
I can of course deliver any screenshots/logs you need to assist :)

Thanks in advance!

from owasp-zap-jwt-addon.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.