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

Add TLS logs in results when using the banner module with the --tls flag #336

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

marc-etienne
Copy link

This patch adds the result of the TLS handshake when using the banner module with the --tls option.

How to Test

echo 4.5.6.7 | zgrab2 banner --tls -p 443 shows the certificates of the TLS connection if it succeeded.

Notes & Caveats

Hopefully that won't break modules that could be subclassing the Banner module, but the changes are minimal to avoid breaking anything.

I based the patch on existing code that was done for SMTP with STARTTLS, HTTPS, etc.

Something to note: results are returned even if no data is received in the underlying TLS connection. This means that if the banner module is used without --tls and no data is received data.banner.result in the JSON will be an empty object ({}) instead of being omitted. I'm not sure if that's a problem or not, but we'd need to add some additional if statements if result must not be {}.

Issue Tracking

I don't think there is an issue regarding this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant