Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a script to encrypt requests using RSA #437

Merged
merged 3 commits into from
Feb 26, 2024
Merged

Adding a script to encrypt requests using RSA #437

merged 3 commits into from
Feb 26, 2024

Conversation

mwalkowski
Copy link
Contributor

Hi All,

I've prepared a script for ZAP that allows encrypting the message body using RSA. I decided to reuse httpsender because I wanted this script to run in every possible mode (whether we're using proxy/requester, etc). This way, I also have the option for manual inspection of what I'm sending to the server. I've also prepared a similar solution for Burp and described everything under this link.

Signed-off-by: Michał Walkowski <[email protected]>

def responseReceived(msg, initiator, helper):
body = msg.getNote()
msg.setRequestBody(body)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not keep the body sent?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this makes modifying requests more difficult, please take a look at the attached video, hopefully it will explain everything. ZAP.mp4

ZAP.mp4

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment to the script summarising why you are doing this?

@thc202 thc202 enabled auto-merge (squash) February 26, 2024 11:36
@thc202
Copy link
Member

thc202 commented Feb 26, 2024

Thank you!

auto-merge was automatically disabled February 26, 2024 11:42

Head branch was pushed to by a user without write access

@thc202 thc202 enabled auto-merge (squash) February 26, 2024 11:44
@thc202 thc202 merged commit d30953b into zaproxy:main Feb 26, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants