Add TLS 1.3 cert support in --banner#806
Open
gpotter2 wants to merge 3 commits intorobertdavidgraham:masterfrom
Open
Add TLS 1.3 cert support in --banner#806gpotter2 wants to merge 3 commits intorobertdavidgraham:masterfrom
gpotter2 wants to merge 3 commits intorobertdavidgraham:masterfrom
Conversation
This commit updates the TLS banners so that: - by default masscan tries to use a banner that supports TLS 1.0 to 1.2 (only) - if this fails, masscan retries using a banner that supports TLS 1.3 This is the less ressource-intensive way of always retrieving the certificates in case banners are enabled, as TLS 1.3 certificates are encrypted, while still adding support for TLS 1.3 when it is enforced.
This commit adds support to retrieve TLS 1.3 certificates (as they are, unlike TLS 1.2 and below, encrypted). It embeds implementations of AES256, SHA384 (from rfc6234) and x25519 which are the minimum, most supported algorithms for TLS 1.3 (ffdhe was only added to openssl in 3.0+). Those implementations are released under compatible licenses. Also comes with tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds TLS 1.3 support for
--bannersand certificate retrieval. For context, this is a bit harder than on TLS 1.2 considering the server certificate is encrypted.Changes:
Some notes regarding the implementation:
Caveats:
Note that this PR would allow to support sending probes over TLS with minimal effort. I think it's best to have this first part merged though before adding more complexity.