Zeek and Wazuh — OwlH Net 0.17.x documentation (2024)

Integration Logical Diagram

Zeek and Wazuh — OwlH Net 0.17.x documentation (1)

Components

  • OwlH Node - Zeek IDS and Wazuh Agent
  • Wazuh Manger
  • Logstash Server
  • Elastic and Kibana Server

Let’s see what we need to modify on each component to be able to manage this Bro and Wazuh integration.

Configure - Zeek - OwlH Node

This system will require Bro working of course, and Wazuh agent installed. OwlH instructions will help to configure both Bro and Wazuh agent.

Zeek Logs Output format to JSON

Option 1 - Modify ASCII writer output

you can load the json_logs.bro configuration that will tell ASCII writer to write output in JSON format.You must include following line in your .bro configuration files. It can be /etc/bro/site/local.bro or you can follow our recomendation and write the configs in owlh.bro file (please, see below).

This will modify output and will store just json output, you won’t have ASCII output.

@load tuning/json_logs.bro

Option 2 - Use add-json package

Usually, you would like to have both outputs, ASCII and JSON. You can use add-json packet (https://github.com/J-Gras/add-json) and load it in your local.bro or owlh.bro.

To install add-json package you can use bro-pkg tool

bro-pkg install add-json

Note

Thanks to C.L.Martinez and Jan.Grashoefer

Zeek Event Enritchment to help Wazuh ruleset

It is a good idea to help wazuh rules to do their job, to include a field that will identify what kind of log line we are analyzing. Bro output doesn’t include that info per line by default, so we are going to help wazuh by including the field ‘bro_engine’ that will tell wazuh what kind of log is it.

We are using redef function to include a custom field for each ::Info record of each Protocol. Here are just a few of them, we will include more by default in next releases.

redef record DNS::Info += { bro_engine: string &default="DNS" &log;};redef record Conn::Info += { bro_engine: string &default="CONN" &log;};redef record Weird::Info += { bro_engine: string &default="WEIRD" &log;};redef record SSL::Info += { bro_engine: string &default="SSL" &log;};redef record SSH::Info += { bro_engine: string &default="SSH" &log;};

Loading Zeek customizations at Zeek start

We include all OwlH customizations in OwlH_*.bro files, that helps to have a clear view of what OwlH does as well as we hope it will simplify configuration management.

Under /etc/bro/site we will create two files

  • owlh.bro - Will include JSON call and @load for bro_engine field definition.
  • owlh_types.bro - Will include all redef statments

You will only need to load OwlH.bro at the end of your local.bro file to include all these configurations

@load /etc/bro/site/OwlH.bro

owlh.bro looks like:

# Select prefered output#@load tuning/json-logs.bro@load packages/add-json/add-json.bro@load /etc/bro/site/owlh_types.bro

and owlh_types.bro:

redef record DNS::Info += { bro_engine: string &default="DNS" &log;};redef record Conn::Info += { bro_engine: string &default="CONN" &log;};redef record Weird::Info += { bro_engine: string &default="WEIRD" &log;};redef record SSL::Info += { bro_engine: string &default="SSL" &log;};redef record SSH::Info += { bro_engine: string &default="SSH" &log;};

Wazuh Agent configuration

Note

Remember we are on Bro Node component.*

Modify your Wazuh agent to read the Bro Logs files

<localfile> <log_format>syslog</log_format> <location>/path/to/bro/logs/*.log</location></localfile>

Note

if needed, You can specify files instead of all .log ones

<localfile> <log_format>syslog</log_format> <location>/path/to/bro/logs/weird.log</location></localfile><localfile> <log_format>syslog</log_format> <location>/path/to/bro/logs/conn.log</location></localfile>

Configure - Wazuh Manager

Good news is that Wazuh’s JSON decoder works really great, so using JSON output from BRO allow us to save time developing an specific decoder for its standard ASCII out.

We only need to create a few rules to identify the Bro events and forward them to ELK.

Wazuh Zeek IDS Rules

Include the Wazuh rules into your /var/ossec/etc/rules/zeek-rules.xml file to manage your Zeek logs

<group name="zeek"> <rule id="990001" level="5"> <field name="bro_engine">SSH</field> <description>Zeek: SSH Connection</description> </rule> <rule id="990002" level="5"> <field name="bro_engine">SSL</field> <description>Zeek: SSL Connection</description> </rule> <rule id="990003" level="5"> <field name="bro_engine">DNS</field> <description>Zeek: DNS Query</description> </rule> <rule id="990004" level="5"> <field name="bro_engine">CONN</field> <description>Zeek: Connection detail</description> </rule></group>

Note

remember restart your wazuh agent after change.*

Configure - Logstash Server

Logstash Filter

We need to modify Logstash filters (/etc/logstash/conf.d/) to allow JSON record cleaning from Bro to Wazuh-alert index parsing.It is necesary because bro uses [id] field to group network src and dest addresses and ports info and parsing will fail

Also, it is done so we can store IP-PORT data in the right fields for wazuh index

filter { if [data][id][orig_h] { mutate { add_field => [ "[data][srcip]", "%{[data][id][orig_h]}" ] add_field => [ "[data][dstip]", "%{[data][id][resp_h]}" ] add_field => [ "[data][srcport]", "%{[data][id][orig_p]}" ] add_field => [ "[data][dstport]", "%{[data][id][resp_p]}" ] remove_field => [ "[data][id]" ] } } }

Review your Kibana Dashboard

You will need to refresh your Wazuh-alerts-3.x indeces to include the new Zeek fields. from your kibana console, go to Management -> index -> select right wazuh-alerts index -> click top-right refresh icon to refresh

Zeek and Wazuh — OwlH Net 0.17.x documentation (2)

And that’s all folks.

If you need help

  • email our support team - support@owlh.net
  • join OwlH slack - OwlH Slack workspace
  • ask for professional support and services - prohelp@owlh.net

OwlH - current v0.17.x

documentation last updated - Oct 12, 2021

Zeek and Wazuh — OwlH Net 0.17.x documentation (2024)

FAQs

How to integrate zeek with Wazuh? ›

From a File: If you can install a Wazuh-agent where the Zeek logs are being generated, you need to configure the service to write its log to a file, and read it with a localfile . You can find further information in our official documentation: localfile - Local configuration (ossec. conf) · Wazuh documentation.

Is Wazuh hids or nids? ›

Wazuh is a common comparison made by HIDS or SIEM users. We will go over Wazuh later in this list. As a HIDS, this tool gives you the ability to perform log analysis, file integrity checking, policy monitoring, rootkit detection, and active response using both signature and anomaly detection methods.

How do you implement Zeek? ›

  1. Quick Start Guide. Managing Zeek with ZeekControl. A Minimal Starting Configuration. Browsing Log Files. ...
  2. Zeek TSV Format and awk. Zeek TSV Format and zeek-cut. Zeek JSON Format and jq.
  3. Acknowledgement via tshark. NTP via tcpdump. NTP via tcpdump and tshark. Reviewing the Packet Capture with tshark. ...
  4. subnet. file. opaque. any.

Is Zeek host based or network based? ›

In brief, Zeek is optimized for interpreting network traffic and generating logs based on that traffic.

Is Wazuh really free? ›

Wazuh is a free and open source security platform that unifies XDR and SIEM capabilities. It protects workloads across on-premises, virtualized, containerized, and cloud-based environments.

Can Wazuh detect malware? ›

The Wazuh SIEM and XDR platform uses several advanced malware detection techniques for a wide range of malware, including ransomware, rootkits, spyware, adware, trojans, viruses, and worms.

What is the difference between SIEM and Wazuh? ›

Wazuh is one of the best solutions in the market that provides a comprehensive SIEM solution and is open source. Wazuh's easy and dynamic dashboards will help you build custom dashboards as per your needs. Its support for integrating various open source APIs makes it a go-to SIEM solution for any org.

How do I add a decoder to Wazuh? ›

Add custom decoders
  1. Add a new decoder to /var/ossec/etc/decoders/local_decoder.xml to decode the log information: ...
  2. Run /var/ossec/bin/wazuh-logtest utility on the Wazuh server and enter the example log above to test the decoder and rule: ...
  3. Restart the Wazuh manager to apply the changes:

How do I add an agent to Wazuh? ›

Click the upper-left Wazuh icon and then Agents. Click Deploy new agent. Follow the steps described on the Deploy a new agent page.

How do I enable integrity monitoring in Wazuh? ›

Configuration
  1. Edit the Wazuh agent /var/ossec/etc/ossec.conf configuration file. Add the directories for monitoring within the <syscheck> block. For this use case, you configure Wazuh to monitor the /root directory. ...
  2. Restart the Wazuh agent to apply the configuration changes: $ sudo systemctl restart wazuh-agent.

References

Top Articles
Ts Massage Fort Lauderdale
New Outlook for Windows now available
How to change your Android phone's default Google account
Craigslist Kennewick Pasco Richland
Cube Combination Wiki Roblox
Weekly Math Review Q4 3
Conduent Connect Feps Login
Culvers Tartar Sauce
Connexus Outage Map
Where does insurance expense go in accounting?
Bowie Tx Craigslist
Craigslist Mpls Cars And Trucks
Mani Pedi Walk Ins Near Me
Napa Autocare Locator
Zack Fairhurst Snapchat
Ukc Message Board
Gopher Hockey Forum
Drift Boss 911
Touchless Car Wash Schaumburg
Air Quality Index Endicott Ny
Sec Baseball Tournament Score
Ceramic tiles vs vitrified tiles: Which one should you choose? - Building And Interiors
Happy Homebodies Breakup
Understanding Gestalt Principles: Definition and Examples
Phantom Fireworks Of Delaware Watergap Photos
The Eight of Cups Tarot Card Meaning - The Ultimate Guide
Farm Equipment Innovations
John Deere 44 Snowblower Parts Manual
By.association.only - Watsonville - Book Online - Prices, Reviews, Photos
What is Software Defined Networking (SDN)? - GeeksforGeeks
Mia Malkova Bio, Net Worth, Age & More - Magzica
47 Orchid Varieties: Different Types of Orchids (With Pictures)
Old Peterbilt For Sale Craigslist
Rocketpult Infinite Fuel
Spinning Gold Showtimes Near Emagine Birch Run
Clark County Ky Busted Newspaper
Does Iherb Accept Ebt
Raisya Crow on LinkedIn: Breckie Hill Shower Video viral Cucumber Leaks VIDEO Click to watch full…
Regis Sectional Havertys
Elisabeth Shue breaks silence about her top-secret 'Cobra Kai' appearance
Gopher Hockey Forum
Www.craigslist.com Waco
Courses In Touch
Wilson Tire And Auto Service Gambrills Photos
Brake Pads - The Best Front and Rear Brake Pads for Cars, Trucks & SUVs | AutoZone
4k Movie, Streaming, Blu-Ray Disc, and Home Theater Product Reviews & News
Dicks Mear Me
Boyfriends Extra Chapter 6
Shiftselect Carolinas
Morbid Ash And Annie Drew
Gelato 47 Allbud
One Facing Life Maybe Crossword
Latest Posts
Article information

Author: Rev. Leonie Wyman

Last Updated:

Views: 6218

Rating: 4.9 / 5 (79 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Rev. Leonie Wyman

Birthday: 1993-07-01

Address: Suite 763 6272 Lang Bypass, New Xochitlport, VT 72704-3308

Phone: +22014484519944

Job: Banking Officer

Hobby: Sailing, Gaming, Basketball, Calligraphy, Mycology, Astronomy, Juggling

Introduction: My name is Rev. Leonie Wyman, I am a colorful, tasty, splendid, fair, witty, gorgeous, splendid person who loves writing and wants to share my knowledge and understanding with you.