Fast open-source intrusion detection
cylab.cmu.edu
cylab.cmu.edu
Honestly, I don't really think this is the best way forward. Using Suricata on cheap hardware with OSS rulesets I can get _very close_ to gigabit throughput. Instead of relying on specialized hardware Suricata can use CUDA making it much more accessible.
Under the hood, doesn't Suricata transform the JSON config to an efficient binary representation though?
(I've never used Suricata, and haven't used Snort or seen the code for ~15 years, but it seems the obvious thing to do)
I don't have a ton of experience with unified2, but it's certainly not as simple to bring into something like Elasticsearch compared to JSON where you basically just point fluentd at it and let it do all the work. All of the common log management tools are built for text files, so why not play to their strengths?
I think most shops have a million integrations that they want to set up for their IDS alerts and JSON is pretty close to a lingua franca.
Zeek can output JSON as well (in addition to plaintext). I've done comparisons. Using jq to search zeek JSON is five times slower than using the C++ simdjson library (fastest JSON parser known to humankind). And simdjson is three times slower than bro-cut on the plaintext logs. This may not sound like a lot, but it is extremely important when monitoring multiple 100Gb links and you have 40 GB JSON conn logs every hour and you need queries to run in a reasonable period of time.
The most common mistake I see is people composing pipelines and putting jq before grep. Or worse, using select() in jq. The grep should always come first. Even if you need to do something like
.. | fgrep value | jq ... | fgrep value
to pre-filter, and then filter again to rule out any false positives.I have some tooling built around jsonparser and fastjson that I need to split out and open source. jq just makes me sad.. very capable, but overkill for what most people use it for and very slow for the common case.
source: wrote the C version of bro-cut that you like so much :)
https://suricon.net/wp-content/uploads/2019/11/SURICON2019_P...
Wait, what? Instead of using specialized hardware... you can use an Nvidia GPU (specialized hardware)?
At least the smartNIC uses about 1/10th the power of most Nvidia GPUs, and I don't have to chew up an extra PCIe slot.
I kind of see both of your points. Nvidia GPUs are special hardware, but how many people already have those at home vs. an FPGA?
Also the programming model for CUDA is much closer to traditional programming than FPGAs.
Just checked a box running zeek/suricata that is seeing 25gbps with about 50k rules, it's currently tracking a bit north of 1 million flows.
so you'd only need 10 of their 'fastest' system to handle what this one system is doing.
(You could also park this in between a TLS-terminating reverse proxy and the app servers, I guess).
The source code is here: https://github.com/cmu-snap/pigasus --- a lot of it is from Snort.