Skip to content

A saltstack formula to install ZEEK network security monitor on RHEL or Debian based systems

License

Notifications You must be signed in to change notification settings

alias454/zeek-formula

Repository files navigation

zeek-formula

Travis CI Build Status Semantic Release

A saltstack formula to install the Zeek Network Security Monitor on RHEL or Debian based systems.

Supports one capture interface at the moment. Adding ability to control multiple capture interfaces is on the TODO list

Table of Contents

Optional

Formulas exist to help with installation and management of other components such as pf_ring.

pfring-formula https://github.com/saltstack-formulas/pfring-formula

Compile a custom Zeek package using the guide RPM package creation for ZEEK IDS Deployments https://alias454.com/rpm-package-creation-for-bro-ids-deployments/.

General notes

See the full SaltStack Formulas installation and usage instructions.

If you are interested in writing or contributing to formulas, please pay attention to the Writing Formula Section.

If you want to use this formula, please pay attention to the FORMULA file and/or git tag, which contains the currently released version. This formula is versioned according to Semantic Versioning.

See Formula Versioning Section for more details.

If you need (non-default) configuration, please pay attention to the pillar.example file and/or Special notes section.

Contributing

Commit message formatting is significant!!

Please see How to contribute for more details.

Available states

zeek ^^^^^^^ Meta-state (This is a state that includes other states).

Installs zeek and it's requirements, manages the configuration file, and starts the service.

zeek.zeek-repo

Manage repo files for RHEL or Debian based systems.

zeek.zeek-prereqs

Install prerequisite packages.

zeek.zeek-package

Install zeek packages. This formula can support deploying a custom binary built to your own specs.

zeek.zeek-config

Manage configuration file placement.

zeek.zeek-bpfconf

Manage BPF module and configuration. Supports a single zeek-bpf.conf file that applies to all capture interfaces.

zeek.zeek-sendmail

If using sendmail(postfix), manage relay host and service.

zeek.zeek-service

Manage zeek service and supprt configuring a service to manage promiscuous mode of defined network interfaces on RHEL/Debian systems.

zeek.zeek-syslog

Manage rsyslog config and service to send logs to a remote collector.

zeek.zeek-zeekpkg

Manage zkg pip module and plugin installations.

zeek.zeek-cron

Manage zeekctl cron entry for housekeeping tasks.

Testing

Linux testing is done with kitchen-salt.

Requirements

  • Ruby
  • Docker
$ gem install bundler
$ bundle install
$ bin/kitchen test [platform]

Where [platform] is the platform name defined in kitchen.yml, e.g. debian-9-2019-2-py3.

Test options

bin/kitchen converge

Creates the docker instance and runs the zeek main state, ready for testing.

bin/kitchen verify

Runs the inspec tests on the actual instance.

bin/kitchen destroy

Removes the docker instance.

bin/kitchen test

Runs all of the stages above in one go: i.e. destroy + converge + verify + destroy.

bin/kitchen login

Gives you SSH access to the instance for manual testing if automated testing fails.