BTAB (Blue Team Analyisis Box) is a blue team analysis toolbox focused on attack signature analysis and alert triage. It assists security operators with pcap analysis, HTTP message inspection, web access log analysis, attack payload identification, encrypted traffic decryption and more. It ships as a single binary that works out of the box and can be used via the Web UI, the command line, or directly inside Wireshark through the bundled btab.lua plugin.
Development and compilation instructions
Plug-in module development instructions
Investigation and Analysis Function Description
Wireshark Plugin (btab.lua) Usage
btab.lua plugin for detection right from the packet list (docs).config.yaml as follows (common install paths are auto-detected at startup, and it can also be edited online in "System Settings"):pcapAnalyseConfig:
# tsharkPath: tshark # unix environment
tsharkPath: C:\Program Files\Wireshark\tshark.exe # win environment
pip install jupyterlab
pip install grpcio-tools
wireshark/btab.lua into the Wireshark personal plugins directory to analyze captures directly from Wireshark (requires Wireshark >= 4.2). See wireshark/README.md.Double-click to execute. After startup, visit the local port 8001: http://localhost:8001
# run as a web server (default port 8001)
btab server
btab server -p 8001 # specify the port
btab server --grpc # grpc only mode
# execute a detection engine
## list the engine names
btab engine -l
## pcap parsing
btab engine -e pcap -f file.pcap
# workflow
## list the workflow templates
btab wf -l
## pcap check workflow (extract HTTP sessions and run SQLi detection on each)
btab wf -t pcapcheck -f xxx.pcap
btab wf -t pc -f xxx.pcap # pc is an alias of pcapcheck
## SQL injection detection
btab wf -t sqli -c "' and 1+1"
cd frontend
yarn install
yarn dev
yarn build
The front-end is embedded into the binary via go:embed. Copy the ./frontend/dist/ directory to ./backend/web/dist, then run go build under ./backend/.
Or simply use the one-step packaging script (which builds the front-end, syncs dist and runs go build automatically):
bash backend/pack.sh # dev mode: incremental build, output to release/btab_dev/
bash backend/pack.sh release # full build, output to release/btab_windows_amd64.zip
cd ./backend
go mod tidy
go mod vendor
go build
Using standard interfaces to implement unified plug-in module specifications, it is convenient to add new plug-in modules in the future. There are currently modules such as jq, pcap and SerializationDumper. As long as there are new scenarios, they can be added.
In addition, these plug-ins can be called by the engine and used as analysis tools in the investigation and analysis process. In theory, the capabilities can be expanded infinitely.
For detailed code, see plugin
type Plugin interface {
Init() // Initialization
Set(key string, value interface{}) // Set the variables required by the plug-in
Check() error // Check the value of the set variable
Exec() error // Execute this plug-in
GetState() int // Get the plug-in task progress
GetFinalStatus() int // Get the final result
GetResult() string // Get the output result
}
| Modules | Technology | Remarks |
|---|---|---|
| front-end framework | vue3 + vite | |
| Front-end UI framework | naive ui | |
| backend language | golang | |
| Backend Web | gin | |
| Data storage | gorm + sqlite | samples, tasks, templates and scripts are all stored in DB |
| Vulnerability detection engine | nuclei v3 | load YAML templates to identify attacks in pcap / HTTP messages |
| Behavior detection engine | goja | detection scripts written in JavaScript, extensible online |
| URL detection engine | go regexp | built-in webloghunter-derived ruleset, managed online |
| Traffic packet parsing | tshark + gopacket | tshark path required |
| Wireshark integration | Lua plugin + REST API | wireshark/btab.lua, requires Wireshark >= 4.2 |
| Investigation and analysis | python | grpc / jupyter |
Since the author has been engaged in the security industry, he has been focusing on the field of traffic security analysis, and is also interested in software research and development. On the one hand, this project is to share the usual research results and promote exchanges and learning. On the other hand, there is too little communication with the blue team in China. Now there are more red teams. I hope this way can be used to form a blue team. communication group
You can join the group chat or add my Ali0th friend to enter the group chat.


A major version overhaul: the UI is rebuilt and detection evolves from "single-purpose tools" to an "engine + strategy + task" system.
btab.lua): packet context menus and whole-capture triage, session-level nuclei detection, cross-frame webshell decryption, Expert Information / btab.* alert annotationsserver / engine / workflow subcommandsThe first version implements the general framework, but in order to achieve no dependency, the overall packaging is difficult, the volume is large, and the expansion capability is insufficient. The second version needs to be optimized. The analysis capability is increased through DSL syntax and python jupyter, and the expansion capability is achieved through grpc.