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

Create TLS Analyzer #2

Open
spitfire55 opened this issue Oct 4, 2019 · 0 comments
Open

Create TLS Analyzer #2

spitfire55 opened this issue Oct 4, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@spitfire55
Copy link
Collaborator

In order to implement more sophisticated analyzers like JA3, self-signed cert detection, etc., we first need a basic TLS analyzer.

gopacket has a TLS Layer already defined, but it does not currently decode a lot of the data we care about, such as Handshake messages or ChangeCipherSpec messages. Ultimately, you should ignore it, as the maintainers are not planning to use the layers package for TCP-specific protocols anyways, and it shouldn't have been merged in the first place.

In order to implement:

  1. Look at the DecodeFromBytes source code at https://github.com/google/gopacket/blob/master/layers/tls.go#L130 to get an idea for an idiomatic way in Go to take raw bytes and decode them into structs.
  2. Take the full application payload of a reassembled TCP stream, which will be the payload field into a Connection object, and, if the TCP payload is TLS, decode it into structs that store more information about handshakes, cipher specs, etc.
  3. Make sure we only store unencrypted data in these structs. Encrypted data is not useful.
  4. See the DNS analyzer and how the Analyze function just uses layers.DNS from gopacket because gopacket already has a robust DNS decoder. You will need to write your own TLS decoder since gopacket's layers.TLS doesn't decode enough for us.
@spitfire55 spitfire55 added enhancement New feature or request Hacktoberfest Fix this issue to win a free T-Shirt! labels Oct 4, 2019
@spitfire55 spitfire55 removed the Hacktoberfest Fix this issue to win a free T-Shirt! label Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant