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 17:59] – [Trisul API] 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 |
- | The first thing to note is Trisul | + | There are two differences between the Bro and Trisul |
- | * Trisul | + | First, |
- | * The packet pipeline deals with familiar concepts | + | |
- | * The analytics pipeline may be a new Bro scripters. | + | |
+ | A second difference is, You can script either the packet processing stream or the analytics stream. We call these two streams the [[https:// | ||
+ | === Comparison === | ||
+ | |||
+ | ^ Feature ^ Bro ^ Trisul ^ | ||
+ | |language | .bro language | LuaJIT | ||
+ | |docs|Bro Scripting|[[https:// | ||
+ | |protocol decoding | Bro framework provides fine grained events representing protocol fields to your script. | ||
+ | |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 | | ||
+ | |time budget | packet drops if script is slow |frontend scripts have to execute fast to avoid packet drops, backend scripts have a more relaxed time budget of about 0-30 seconds. | | ||
+ | |deployment|place script files in directory| similar place scripts in directory on probe or put it on the hub node for automatic deployment to all probes | | ||
+ | |debugger| manual | built in LUA debugger. just call '' | ||
+ | |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| | ||
+ | |intel|intel framework|you can choose your own framework. We like to dump all threat intel into a LevelDB database using LuaJIT FFI to access LevelDB. You can choose any other system. | | ||
+ | |packaging|Yes - Bro packages| Yes - Trisul APPs | | ||
+ | |example|JA3 TLS Fingerprint written [[ https:// | ||
+ | |disadvantage| - | LuaJIT has a 2GB limit on total memory use, therefore your scripts cant allocate too much memory. Use Trisul aggregations instead of building large lookup tables or use LevelDB to store data. | | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Types of Trisul Scripts ===== | ||
+ | |||
+ | There are 16 different types of Trisul scripts depending on what you want to accomplish. | ||
+ | |||
+ | * **6 Frontend scripts** that work on Packets and Reassembly : Input Filter , Simple Counter, Reassembly Handler, File Extraction , PCAP storage , Protocol Handler, | ||
+ | * **7 Backend scripts** that work on metrics, documents, resources : Engine Monitor, Alert Monitor, Counter Monitor, Session Monitor, Resource Monitor, FTS Monitor , Flow Tracker | ||
+ | * **3 Definition scripts** : New Counter Group, New Alert Group, New Resource Group | ||
+ | |||
+ | For more on this refer to [[https:// | ||
+ | |||
+ | |||
+ | 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.1538137784.txt.gz · Last modified: 2018/09/28 17:59 by veera