Installing Zeek packages in Security Onion with zkg: when a team needs it
A team needs Zeek packages when its network coverage has a gap that the default scripts do not close, and a community or in-house script could close it. An analyst may see a protocol in traffic that Zeek logs only partially, or an engineer may find a detection pattern published as a Zeek script that nobody on the team has deployed. In Security Onion, the usual answer is to install that script as a package. Zeek packages are managed with zkg, the Zeek package manager, and Security Onion installs custom packages from /opt/so/saltstack/local/salt/zeek/zkg/ on the manager, so the packages reach the sensors through the grid's normal Salt configuration rather than through hand edits on each node.
The reason this matters is that Zeek is a scripting-based network security monitor, not a signature intrusion detection system. Its analyses are written in its own scripting language, and its default logging is implemented as scripts too. A package therefore adds analysis and log content, such as new fields, new connection events or new notices, rather than adding match rules the way a Suricata rule does. Teams that expect a package to behave like a signature feed will be disappointed, and they should decide first whether the gap is best closed with Zeek analysis, with a Suricata rule, or with both. Security Onion also includes the MITRE BZAR scripts, which the Security Onion Zeek documentation states ship disabled by default. Confirm the current enablement steps in that documentation before assuming BZAR is producing output on your sensors.
Before installing anything, the engineer should write down the specific gap, the log fields or notices the package will produce, and the sensors that will run it. Check the package's license, its maintenance status and the Zeek version it targets against your Security Onion release, since the Zeek version bundled with a Security Onion release determines what packages are compatible. The Security Onion Zeek documentation is the right place to confirm how custom packages are enabled and deployed in your release. Test each package on a non-production sensor or against imported PCAP first, and confirm that the new logs do not overload your storage or the search nodes.
Which package source and enablement path fits your change
This table compares three ways to add Zeek behavior on a Security Onion grid: a community package installed with zkg, an in-house script package, and the bundled MITRE BZAR scripts. Read each row for when the path fits, who keeps it working, and the risk to test before it reaches sensors.
| Path | When it fits | Who owns maintenance | Main risk to test |
|---|---|---|---|
| Community package via zkg | A published Zeek package covers a detection or log need and its author is actively maintaining it | The package author for code, and your team for pinning versions and reviewing updates | Unreviewed code running on sensors, and load order or conflicts with other Zeek scripts |
| In-house script package | Your analysts have a specific network behavior to log or detect that no public package covers | Your detection engineering team, including Zeek version changes and regression tests | Scripts that work on sample PCAP but add processing cost or noisy logs on live sensor traffic |
| Bundled MITRE BZAR scripts | You want ATT&CK-mapped SMB and related lateral movement visibility and accept added logging volume | Your team for enabling, tuning and disabling, since the scripts ship with Security Onion but are disabled by default | Higher CPU and log volume on sensors that also run Suricata and Zeek workloads, so validate on a test sensor first |
| Testing on a single sensor before grid rollout | Any new package or enablement, before it reaches every sensor through the manager | Your team, with a documented rollback step | Skipping this step means a faulty script can affect every sensor at once |
Installing a Zeek package with zkg on the manager
This sequence takes a Zeek package from a version check through staging, load testing and grid-wide rollout, so each change is proven on a test node before it reaches production sensors. The output is a package that loads cleanly and produces the expected logs across the grid.
Confirm Security Onion and Zeek versions
The engineer responsible for the grid records the installed Security Onion release and the Zeek version it ships, then checks the package's compatibility notes against both. Security Onion 3.x and 2.4 differ in how the grid is managed, so the version determines which documented procedure applies. Confirm the exact commands in the Security Onion Zeek docs before continuing. Done means you have a written version record and a package that declares support for that Zeek release.
Stage the package in the zkg directory
On the manager, the engineer places the package source in the zkg directory under the manager's Salt local tree, which is /opt/so/saltstack/local/salt/zeek/zkg/. Keeping the package inside the local Salt tree means it is treated as customization rather than a file overwritten by updates. Record the package source, version or commit, and who staged it. Done means the package directory exists on the manager at the expected path and the source is traceable.
Install and load the package with zkg
The engineer runs zkg to install the staged package and then confirms the package is registered and loadable, using the commands in the Security Onion Zeek docs. Any script that loads the package must be referenced in the Zeek configuration that Security Onion deploys to sensors, so check that the load line is present. Done means the install completes without errors and the package appears in the zkg list of installed packages.
Enable any bundled scripts deliberately
If the package includes scripts that are disabled by default, such as the MITRE BZAR scripts that ship with Security Onion but are off by default, the engineer decides whether each one is needed and enables only those. Each enabled script adds log volume and processing load, so record the reason for enabling it. Done means the list of enabled scripts matches a documented decision.
Validate on a test node with imported PCAP
The engineer applies the change to a lab or test sensor, not the production grid, and replays representative PCAP through it. They check Zeek's stderr and reporter output for load errors, then confirm that the package's expected log files or fields appear with reasonable values. Compare the output against a baseline run without the package, since unexpected log growth is itself a finding. Done means the test run shows no load errors and the expected logs appear in the test node's data.
Review performance and log volume
Before wider rollout, the engineer checks sensor CPU use, packet drop indicators and the size of new log output during the replay, and confirms that the added scripts do not disturb existing detections. Ask the package maintainer or your Security Onion contact which performance characteristics to expect for your traffic profile. Done means the results are recorded and accepted by the person who owns sensor capacity.
Roll out the package across the grid
Once validation passes, the engineer applies the change through the manager's configuration management so every relevant sensor receives the same package and settings. Roll out in stages where possible, and keep the test node as the reference for comparison. Follow the rollout procedure in the Security Onion Zeek docs for your version. Done means each sensor reports the package loaded and new logs appear from each sensor, not only from the test node.
Enabling the bundled MITRE BZAR scripts safely
The MITRE BZAR scripts ship with Security Onion but stay disabled by default, so enabling them is a deliberate change with a cost. BZAR is a set of Zeek scripts that maps SMB and related Windows network activity to MITRE ATT&CK techniques. Once it runs, Zeek produces additional notices and log detail for protocols that a default deployment may only summarize. That extra visibility is the point, but it also means more log records to store, more events to triage, and more processing on each sensor. Before you enable it, decide whether your analysts will use the added SMB and authentication detail, and confirm with your own sensor metrics how much headroom each sensor has. The Security Onion Zeek documentation at Security Onion Zeek docs is the reference for the exact configuration path in your version.
Enable BZAR first on a non-production sensor that sees traffic similar to your production segments, such as a lab span or a copy of a representative capture. Make the change through the documented Security Onion configuration rather than by editing Zeek files directly on a sensor, so that the setting survives Salt-managed deployments and is visible to the rest of the grid. Then apply the change, confirm that the sensor restarts Zeek cleanly, and check that the BZAR notices appear in the expected logs. Use a known SMB exercise, such as a lab file share access or an authentication test, to confirm the output is what your analysts expect. Record which version of the scripts and which Security Onion release you tested, so the result can be repeated later.
Monitor volume for at least one full business cycle before you widen the change. Compare daily log size, notice counts by type, and the Zeek and sensor resource graphs against the pre-change baseline on the same sensor. Watch for the specific notices that BZAR adds, because a sudden rise usually points to noisy internal administrative traffic rather than an attack. Agree in advance on a volume threshold that triggers a rollback or tuning, and ask your deployment partner or Security Onion support to help you define it if your team has not done this before. Only then roll the change to production sensors in stages, one sensor group at a time, and keep the same measurements running after each stage.
Security and operational risks of third-party Zeek scripts
Third-party Zeek packages add code that runs inside the sensor's analysis process, so the risks are about what that code can touch, how it is versioned, and how it reaches every sensor. Each card below is a check to make before a package moves from the manager's test path to the grid.
Untrusted code in the sensor process
A zkg package is Zeek script that runs inside the Zeek process on every sensor that loads it, so it sees the same traffic and log fields as the built-in analyses. Review the package source before install, focusing on any calls that touch the file system, network sockets or external commands. Ask who maintains the package and whether its code has been reviewed by someone other than its author.
Security Onion Zeek docsSupply chain and version pinning
zkg installs packages from their upstream repositories, and a package that is not pinned to a specific version can change on the next install or update. Record the exact version or commit for every package in your change record, and confirm the package sources are reachable only from the manager you control. Treat a version change as a new package that needs the same review as the first install.
Change control through Salt
Packages placed under the manager's Salt directory are distributed by Salt, so a single change to that tree can reach every sensor in the grid at the next apply. Keep the zkg directory in version control, require a reviewer for changes, and log who applied each state. Confirm with your team which node types receive the change before you run it.
Performance impact and packet loss
Each added script adds per-packet and per-connection work, and on a busy sensor that can push up CPU load and cause packet drops. Test each package on a sensor with representative traffic and watch packet loss and Zeek process health before enabling it grid-wide. Ask the package author for a published performance profile, and treat missing data as a reason to test longer.
Log schema changes break downstream
A package that adds fields or renames existing ones changes the log files that Zeek writes, and parsers, Elastic ingest mappings and dashboards built on those fields can fail silently. Compare the log fields produced by a test sensor before and after the package loads, and check ingest and dashboard results. Plan the schema change alongside any saved searches or detections that reference those fields.
Rollback after a bad push
Once a package is applied through Salt and loaded across the grid, removing it is a second change that must also reach every sensor. Keep the previous Salt state available so you can restore it, and confirm that a rollback restarts Zeek on the affected sensors. Record the rollback steps in the change ticket before the first push, so the team can act without reconstructing them under pressure.
Questions teams ask before installing Zeek packages
Can our own team install Zeek packages in Security Onion without outside help?
Yes, many teams can, provided they have someone comfortable with Linux, Salt-managed configuration and Zeek scripting. Packages are installed with zkg from the manager's Salt directory at /opt/so/saltstack/local/salt/zeek/zkg/, so the technical steps are not unusual. The harder part is judging what a package does to sensor load, log volume and alert behavior before it reaches every sensor. Ask whether your team has a lab sensor, a process for reviewing third-party Zeek scripts, and an owner who can sign off on the change. If any of those are missing, a partner can fill the gap, but the decision should rest on your own review criteria.
What makes a Zeek package installation take more or less effort?
Effort scales with the number of packages, how much each one changes logging or detection, the testing scope and the number of sensors that receive the change. A package that only adds a script is simpler to validate than one that writes new log fields or loads third-party dependencies. Testing against representative traffic takes longer when your sensors see encrypted bulk transfers, high volumes or unusual protocols. Change control adds time when a regulated environment needs documented approval, rollback steps and evidence of testing before a grid-wide push. Ask any provider to list the packages, the sensors in scope, the test traffic and the approval steps before agreeing to a quote.
What do we need to provide before a Zeek package project starts?
Plan to provide a lab sensor or test node that mirrors production configuration, representative PCAP for replay, access to the manager, and a named approver for change windows. The lab matters because a package that behaves well on quiet traffic can produce unexpected log volume on busy links. PCAP from your own network lets you measure real packet handling and check that new logs appear where analysts expect them. Confirm the change windows your operations team allows for manager and sensor updates, and who can roll back if a package causes problems. These inputs usually decide how quickly testing can finish.
Do Zeek packages need ongoing maintenance after the first install?
Yes, packages recur as maintenance because they are third-party code that may change, depend on a specific Zeek version or stop matching your Security Onion release. Each update needs review, testing and a record of what changed before it reaches the grid. Security Onion upgrades can also affect Zeek and its packages, so the upgrade plan should include a package check. Track which packages are installed, which version of each is in use, and who owns the decision to update or remove them. Ask your provider whether package upkeep is included in a one-time engagement or handled under an ongoing support arrangement.
How does enabling the MITRE BZAR scripts change Zeek logging?
BZAR scripts are included with Security Onion but disabled by default, so enabling them adds detection logic that was not running before. The scripts map observed network activity to MITRE ATT&CK techniques and produce additional notices, which can increase log volume and alert volume on your sensors. Before enabling them, check which notices and log fields they generate, how your analysts will consume them, and whether the new output reaches the SIEM or dashboards you rely on. Test on a lab sensor first, measure the added load on busy traffic, and document which detections you accepted and why. Confirm the exact behavior against the Security Onion Zeek documentation for your installed version.
How many sensors change the work for a Zeek package rollout?
The number of sensors matters because each one can process different traffic, so a package that performs well on one sensor may behave differently on another. A grid with several sensors needs staged rollout, usually starting with a single production sensor, checking logs and load, then extending to the rest. Sensors with different link speeds, traffic profiles or hardware should be tested separately when they differ meaningfully. Rollback also takes longer across many sensors, so define the rollback path before the first push. Ask how the plan handles sensors that are offline or in separate sites.
When should we bring in a partner for Zeek package work?
Consider a partner when your team lacks time, Zeek scripting skills or a lab that matches production, or when change control requires independent testing evidence. A partner is also useful when you plan many packages at once or need a repeatable review process for future additions. DeployOpen plans, implements, tests and documents self-hosted open-source platforms inside your own infrastructure, and most engagements are fixed-scope with scope, deliverables and timelines agreed in writing before work starts. Ask for the written scope before comparing quotes, because the package count, testing scope and sensor count determine most of the cost.
How a Zeek package moves from the manager to sensors
The package starts in the manager's zkg directory under the Salt local tree, where it is installed and then distributed through Salt to the sensor nodes. On each sensor, Zeek loads the package and writes its output into the logs that flow to search nodes. Before any grid-wide change, the same package should pass through a lab sensor, so you can confirm it loads, produces the expected logs and does not add noise to existing detections.
Package path from the manager's zkg directory through Salt to sensors, with a lab test before rollout.
How DeployOpen scopes Zeek package work in Security Onion
DeployOpen approaches Zeek package installs in Security Onion as a scoped change to the manager's Salt-managed configuration, not a one-off command on a single node. We agree which packages, sensors and detections are in scope, install and test them on a non-production grid first, and hand over the configuration and runbook so your team can operate the extension after we leave.
How we scope
- Inventory the packages, Zeek scripts and BZAR detections you want, with the detection goal each one serves.
- Confirm your deployment type and which sensor nodes will load the extra scripts before any change is written.
- Record the test grid, change window and rollback steps in the written scope, which is agreed before work starts.
How we build
- Install approved packages with zkg from /opt/so/saltstack/local/salt/zeek/zkg/ on the manager, following the Security Onion Zeek documentation.
- Enable the MITRE BZAR scripts deliberately, since they ship disabled by default, and review the log output they add.
- Test on a non-production grid, check Zeek logs for errors and load impact, then roll out grid-wide through Salt.
How we hand over
- Document each package, its version, the Salt files changed and the reason it was added.
- Provide verification steps your analysts can run to confirm new Zeek logs arrive in the console.
- Deliver a rollback procedure and a short runbook for updating or removing packages during future upgrades.
How we support
- Ongoing support, upgrades and continuous testing are available as a retainer, including package review after Security Onion upgrades.
- Retesting of packages after Zeek or Security Onion version changes is included in the retainer scope when agreed in writing.
- Ask any partner to confirm how package updates are tested and approved before they reach production sensors.

