scripting:introbro
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
scripting:introbro [2018/09/28 19:16] – [Two scripting pipelines in Trisul] veera | scripting:introbro [2024/06/04 17:08] (current) – thiyagu | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Introduction to Trisul Scripting for Bro IDS users ====== | ====== Introduction to Trisul Scripting for Bro IDS users ====== | ||
- | Bro IDS is a popular open source network analysis platform. A key feature of Bro IDS is the custom BRO language | + | A key feature of the popular open source network analysis platform Bro IDS is the custom BRO language. It allows you to write scripts to enhance the functionality of the platform. |
- | ===== Trisul | + | ===== Trisul |
- | ==== Outputs : database objects vs logs ==== | + | There are two differences between the Bro and Trisul approaches. Lets sort them out before diving deeper. |
+ | First, Trisul integrates the packet processing as well as the database.So you directly work with database objects like metrics , resources, flows, documents, and graphs.This can be a bit confusing to Bro scripters who focus on generating logs and notices. | ||
- | Trisul is built from ground up to be full streaming analytics platform - database included. In Trisul, you work directly with database objects like metrics , resources, flows, documents, and graphs.This can be a bit confusing to Bro scripters who focus on generating logs. | + | A second difference is, |
- | + | ||
- | To illustrate with an example. | + | |
- | + | ||
- | **Say you are calculating TLS Fingerprints from network traffic** | + | |
- | + | ||
- | * In Bro, you might write scripts to add the fingerprint to the connection/ | + | |
- | * In Trisul, your approach would be to create a new counter group for TLS Fingerprints and count each print there. You can also mark the flows like Bro, or create graph edges, but the main focus is on metrics. | + | |
- | + | ||
- | ==== Two scripting pipelines in Trisul | + | |
- | + | ||
- | + | ||
- | A second | + | |
=== Comparison === | === Comparison === | ||
Line 27: | Line 15: | ||
^ Feature ^ Bro ^ Trisul ^ | ^ Feature ^ Bro ^ Trisul ^ | ||
|language | .bro language | LuaJIT | |language | .bro language | LuaJIT | ||
- | |protocol decoding | Bro framework provides fine grained events representing protocol fields to your script. | + | |docs|Bro Scripting|[[https:// |
+ | |protocol decoding | Bro framework provides fine grained events representing protocol fields to your script. | ||
|events | fine grained " | |events | fine grained " | ||
|extending | you can write C code and integrate it to your Bro scripting using a *.bif file. This involves a binary compile process |leverages LuaJIT FFI to directly call library functions | | |extending | you can write C code and integrate it to your Bro scripting using a *.bif file. This involves a binary compile process |leverages LuaJIT FFI to directly call library functions | | ||
Line 35: | Line 24: | ||
|threading|single with load balanced workers | multithreaded with load balanced threads, this allows for very fast state sharing between multiple threads using message passing. During development and debugging you can turn it into a single threaded system | | |threading|single with load balanced workers | multithreaded with load balanced threads, this allows for very fast state sharing between multiple threads using message passing. During development and debugging you can turn it into a single threaded system | | ||
|async|yes|yes - you can have a deferred execution of a LUA code block| | |async|yes|yes - you can have a deferred execution of a LUA code block| | ||
- | |intel|intel framework|Essentially we use a LevelDB library via FFI to dump all the Intel items and use that to lookup | + | |intel|intel framework|you can choose your own framework. We like to dump all threat |
|packaging|Yes - Bro packages| Yes - Trisul APPs | | |packaging|Yes - Bro packages| Yes - Trisul APPs | | ||
- | |example|JA3 TLS Fingerprint written [[ https:// | + | |example|JA3 TLS Fingerprint written [[ https:// |
- | |docs|[[https:// | + | |disadvantage| - | LuaJIT has a 2GB limit on total memory use, therefore your scripts cant allocate too much memory. Use Trisul |
Line 54: | Line 43: | ||
- | + | To conclude, this was a quick introduction to Trisul scripting. We will be diving deeper into each of the areas in the coming days. | |
- | + |
scripting/introbro.1538142390.txt.gz · Last modified: 2018/09/28 19:16 by veera