gourmetproject / gourmet Goto Github PK
View Code? Open in Web Editor NEWAn exquisite network traffic analysis framework
Home Page: https://docs.gourmetproject.io
License: GNU General Public License v3.0
An exquisite network traffic analysis framework
Home Page: https://docs.gourmetproject.io
License: GNU General Public License v3.0
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:
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.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.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.Because we are lazily reading in the entire JSON log file each time we want to add a new entry, the amount of memory we use also grows with the file.
Instead, Logger.Log(c Connection)
should append a new JSON record to the file without reading the entire file in. ioutil.ReadFile(l.fileName)
is bad.
Steps to fix:
ioutil.ReadFile(l.fileName)
Logger.Log
, append the JSON as bytes to the fileIf a user only wants to log Connection objects that have at least one analyzer, and ignore everything else, they should be able to.
For example, if someone wants to write an analyzer that filters for DNS traffic that contains domains ending in .io
, they should be able to configure Gourmet to only log Connections that meet this filter, and ignore/drop everything else.
To implement this:
capture_mode
with three options: minimal, normal, and payloads.Got a cool analyzer idea? Submit a pull request updating the README.md with a link to your analyzer repo!
Right now, as of writing this issue, Gourmet has no unit testing or code coverage.
For a brief overview of Go testing, here are some resources
This issue will stay open as long as there is less than 90% code coverage. If you are looking to help on this effort for Hacktoberfest, try to improve coverage by ~5-10% (or more!) before submitting a pull request.
Create CI/CD pipeline using GitHub Actions to validate pull requests
Go's built-in plugin package, part of the standard library as of Go 1.8, is very finicky with dependency versions across plugins. If a plugin is built using Go Modules, and two plugins use the same package with different versions, then the build process gets angry. This will naturally create a lot of headaches.
Hashicorp's go-plugin package uses an RPC model instead of shared object, which should (hopefully) fix this problem. Migrating is going to be a pain in the ass, but its better to do it now then later.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.