Closed preetkaran20 closed 4 years ago
Added PR to reduce JWTFuzzerHandler code that is copied from HttpFuzzer. https://github.com/zaproxy/zap-extensions/pull/2421
Hi @kingthorin and @thc202 ,
Following is the view of fuzzer: I was in impression that in case of multiple message location each one message location replacer only modifies one http message at a time i.e. say if 2 message locations with one one value is there then 2 http messages will be generated and hence I introduced a field for specifying signature operation which is no signature, generate new signature and use old signature only. But as this is not the case hence this UI becomes invalid so i need to have this field applicable for all the message locations and hence it cannot be represent in message location so i was thinking of adding this field either in Options panel or in fuzzer policy. please suggest.
thanks, Karan
Hi @kingthorin and @thc202 ,
As i have already mentioned that Http view now contains the JWT view and it looks like this:
I am not sure if it is ok or we want to remove it and how can we remove it.
thanks, Karan
Hi @thc202 and @kingthorin ,
Gentle reminder regarding queries.
thanks, Karan
https://github.com/SasanLabs/owasp-zap-jwt-addon/pull/6#issuecomment-640070200
Right, the locations pertain to the same message and they are replaced at the same time (that's to allow to fuzz several "fields" at the same time, e.g. common one, username/password combo). IMO the option can be in the view (maybe show before the field listing?), that info can be passed to the replacer through the message location (e.g. the replacer can check the first message location to determine what/how the signature will be). That's more flexible/usable than move to other place.
https://github.com/SasanLabs/owasp-zap-jwt-addon/pull/6#issuecomment-640070531
Per previous comment, I'm checking that, will try raise the PR in the following days (to allow to add the components/views just to the fuzzer).
Right, the locations pertain to the same message and they are replaced at the same time (that's to allow to fuzz several "fields" at the same time, e.g. common one, username/password combo). IMO the option can be in the view (maybe show before the field listing?), that info can be passed to the replacer through the message location (e.g. the replacer can check the first message location to determine what/how the signature will be). That's more flexible/usable than move to other place.
Per previous comment, I'm checking that, will try raise the PR in the following days (to allow to add the components/views just to the fuzzer).
Hi @thc202 this makes sense, i think we can add the signature field to all message locations and not typical to first message location. However i think this might be some kind of workaround and i am not sure how can we solve this problem generically. we can build something like Common Props which can go with the message locations and implementer can rely on them that common props for these kind of properties which are applicable to all the message locations.
Was there a reason to change all the file permissions?
Was there a reason to change all the file permissions?
Actually i was facing issues locally and hence updated the permissions but somehow git flag for tracking files is enabled so disabled that flag and again checkedin.
Hi @thc202 and @kingthorin ,
I have done the changes. Please find below screenshot of the new fuzzer UI:
Also below is the Options panel UI changes:
Please review.
thanks, Karan
Hi @thc202 and @kingthorin ,
Please review this PR and if you think it doesn't require more changes to Fuzzer Addon, please release that addon to maven repository.
thanks, Karan
Hi @kingthorin and @thc202, I have done the changes as suggested. please review.
thanks, Karan
Hi @thc202 and @kingthorin ,
I have done the changes. Please find below screenshot of the new fuzzer UI:
Also below is the Options panel UI changes:
Please review.
thanks, Karan
Hi @kingthorin and @thc202 ,
I was struggling with what should be the Private Key encoding ? I have for now added PEM encoding for Private key because PKCS encoding has password and for each private key in p12 file has its own password hence i have gone with PEM file with assumption that private key will not have password. However truststore configuration currently has password so i was thinking of changing that too to PEM format. What do you guys think ?
Which format we should stick with ? Shall we go by simple PEM format ? please suggest
thanks, Karan
There's nothing written in stone. I'd have to research to see what's more used/supported in the industry.
Security wise, requiring a password is obviously a good choice. However, that's not always the way things go.
If you have something working I'd say stick with it. You can always adapt to community input later as well. If there's request(s) for other formats/support then change/add later.
Hi @thc202 ,
Did we released Fuzzer to Maven Repo ? also please add the review comments you were mentioning so that i can incorporate them.
thanks, Karan
Hi @thc202 ,
Did we released Fuzzer to Maven Repo ? also please add the review comments you were mentioning so that i can incorporate them.
thanks, Karan
@thc202 , Gentle reminder regrading queries.
thanks, Karan
Hi @thc202 @kingthorin ,
Gentle reminder regarding the queries.
thanks, Karan
No news since the last meeting, the add-on was not yet released.
No news since the last meeting, the add-on was not yet released.
Hi @thc202 / @kingthorin ,
Sorry to interrupt you guys again, I was thinking on releasing this addon asap. What do you think ? shall we can release it ? also @thc202 as you had mentioned about review comments please add those and while i will incorporate them you guys can help in releasing the Fuzz addon.
thanks, Karan
As far as I understand @thc202 is trying to find a good opportunity to tackle allowing add-ons to declare or push views for the fuzzer.
The first bit with just the scanners (not the fuzzer) could be released?
I'll get the fuzz changes ready for the next weekly and will add the review comments this weekend.
@thc202 @kingthorin ,
Thanks a lot guys, i think lets release the addon then fully else we need to release it in 2-3 weeks again.
Hi @thc202 ,
Gentle reminder.
thanks, Karan
Hi @thc202 ,
Gentle reminder.
thanks, Karan
Hi @thc202 @kingthorin
thanks a lot. Build is now successful.
thanks, Karan
Hi @thc202 , Gentle reminder. thanks, Karan
Hi @thc202 @kingthorin
thanks a lot. Build is now successful.
thanks, Karan
How ever waiting for the review comments :)
Hi @thc202 , Gentle reminder. thanks, Karan
Hi @thc202 @kingthorin thanks a lot. Build is now successful. thanks, Karan
How ever waiting for the review comments :)
@thc202 Gentle reminder.
Hi @thc202 , Gentle reminder. thanks, Karan
Hi @thc202 @kingthorin thanks a lot. Build is now successful. thanks, Karan
How ever waiting for the review comments :)
@thc202 Gentle reminder.
Hi @kingthorin @thc202 ,
Gentle reminder regarding review.
thanks, Karan
Seems fine to me. Still seems to be plenty if comments to yourself that are un-resolved though. Not sure how important those are/were.
i think they are outdated. However i will look at them once again for confirmation.
Seems fine to me. Still seems to be plenty if comments to yourself that are un-resolved though. Not sure how important those are/were.
Yes i checked and they are outdated. One was regarding testing RSA, I have checked again and it is working fine. Just waiting for @thc202 's review comments, so shall i merge these changes and track them as bugs (if it takes time) or shall i wait for some more days ? @kingthorin what is your suggestion ?
Some comments to build.gradle.kts
:
-addOnName.set("JWT Extension")
+addOnName.set("JWT Support") // Or something like that, add-ons are more than just extensions (e.g. this provides scan rules as well).
-implementation("org.zaproxy.addon:fuzz:13.0.0")
+compileOnly("org.zaproxy.addon:fuzz:13.0.0") // Might need testImplementation if you plan to add tests.
The dependencies
block needs to have:
register("fuzz") {
version.set("13.*")
}
The changelog could be updated to mention the new functionality.
Another comment for build.gradle.kts
, under manifest
it could have repo.set("https://github.com/SasanLabs/owasp-zap-jwt-addon/")
, that's shown in the marketplace (site and ZAP).
Some comments to
build.gradle.kts
:-addOnName.set("JWT Extension") +addOnName.set("JWT Support") // Or something like that, add-ons are more than just extensions (e.g. this provides scan rules as well). -implementation("org.zaproxy.addon:fuzz:13.0.0") +compileOnly("org.zaproxy.addon:fuzz:13.0.0") // Might need testImplementation if you plan to add tests.
The
dependencies
block needs to have:register("fuzz") { version.set("13.*") }
what does register doing here ? i didn't got the use ? can you please explain.
Sorry, that was not clear, that's for the dependencies
under the manifest
, to declare that the JWT add-on depends on the Fuzzer add-on (and that range version). Like was done for the Common Library.
The add-on is not filling the "changes" entry of the manifest, since the add-on has a changelog you can add:
changesFile.set(tasks.named<ConvertMarkdownToHtml>("generateManifestChanges").flatMap { it.html })
to the manifest
in build.gradle.kts
. That's shown to the user to inform about the changes of the version installed or available in the marketplace.
@thc202 while installing and working on new fuzz version i am facing null pointers while saving options panel:
The work around is referenced here: https://github.com/zaproxy/zaproxy/issues/6136
Hi @thc202 ,
I have incorporated changes suggested. Please review.
thanks, Karan
@thc202 done with the changes.
Hi @thc202 @kingthorin ,
please review https://github.com/zaproxy/zaproxy-website/pull/101 also.
thanks, Karan
Looks good, thank you (especially for the patience)!
Merging it now. Thanks @thc202 and @kingthorin
@thc202 @kingthorin what next needs to be done for releasing this Project.
I think the following steps:
Update the changelog to reflect the new version, e.g.:
-## Unreleased
+## [1.0.0] - 2020-08-03
- First version of JWT Support.
- Contains scanning rules for basic JWT related vulnerabilities.
- Contains JWT Fuzzer for fuzzing the JWT's present in the request.
+
+[1.0.0]: https://github.com/SasanLabs/owasp-zap-jwt-addon/releases/tag/v1.0.0
v1.0.0
) and push.Once that's done we can release to the marketplace.
Hi @thc202 @kingthorin
i have added the release https://github.com/SasanLabs/owasp-zap-jwt-addon/releases/tag/v1.0.0
thanks, Karan
It doesn't seem to have the actual add-on (*.zap) attached?
Sorry for the typo in the date.
Added the ".zap" file too.
The jar
can be removed, that will not work in ZAP.
This is the part 2 of the JWT Addon where Fuzzer Capabilities are added for Fuzzing JWT token.