-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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:
- 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. - 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. - Make sure we only store unencrypted data in these structs. Encrypted data is not useful.
- See the DNS analyzer and how the
Analyze
function just useslayers.DNS
from gopacket because gopacket already has a robust DNS decoder. You will need to write your own TLS decoder since gopacket'slayers.TLS
doesn't decode enough for us.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request