Wazuh training for security engineers

1

CDB Lists

2

Wazuh CDB Lists

Definition

The CDB (constant database) feature allows Wazuh to look up key values extracted from rule-matching log entries, to use as criteria in rules

3

CDB Rule Example

CDB rule:

<rule id="100334" level="10">
  <!-- child rule of rule 100330 which matches the DNS query log from your
               corporate DNS server -->
  <if_sid>100330</if_sid>
  <list field="domain" lookup="match_key">lists/baddomains</list>
  <description>DNS query for malicious domain!</description>
</rule>
4

Lab Exercise

Lab Exercise 5A: Basic CDB IP Lookups

Lab Objective:Escalate the severity level of ssh login failures when the client’s IP is in a known-attackers CDB IP list.
5

CDB Lists with Values

We are not limited to only checking fields for their presence or absence in a given list. CDB Lists can contain both a key (the part to look up) and a value (the part to return). The looked up values can then be used as criteria in rules.

6

Lab Exercise

Lab Exercise 5B: Advanced CDB IP Lookups

Lab Objective:Use a CDB list containing attacker IPs and attacker severity level values for more granular ssh failure alert escalation.
7

Wazuh Active Response

8

Active Response Flow

_images/arflow.svg
9

Wazuh Active Response

Definition

AR is an automated remediation to security violations and threats

10

Wazuh Active Response

11

Wazuh Active Response

12

Uses for Active Response

AR is more than just for reacting to attacks or abuse. Use it wherever you want to take a custom action in response to events that trigger specific Wazuh rules.

13

Commands Configuration

Commands Configuration Example:

<command>
       <name>firewall-drop</name>
       <executable>firewall-drop</executable>
       <timeout_allowed>yes</timeout_allowed>
</command>
14

Response Configuration

Response Configuration example:

<active-response>
       <command>firewall-drop</command>
       <location>local</location>
       <rules_id>5712</rules_id>
       <timeout>600</timeout>
</active-response>
15

Lab Exercise

Lab Exercise 5C: Linux active response

Lab Objective:Set up Wazuh to have your Linux agents block ssh brute force attackers, and then test the setup.
16

Wazuh Integrations

17

Wazuh Integrations

<integration>
    <name> </name>
    <hook_url> </hook_url> <!-- Required for Slack -->
    <api_key> </api_key> <!-- Required for PagerDuty and VirusTotal -->

    <!-- Optional filters -->
    <rule_id> </rule_id>
    <level> </level>
    <group> </group>
    <event_location> </event_location>
</integration>
18

Troubleshooting Wazuh

19

Tools for diagnosis

  • tcpdump

    • For troubleshooting network connectivity
  • lsof

    • For troubleshooting when files are actually accessed
  • strace

    • Advanced analysis of inter-process messages
  • ss (formerly netstat)

    • For determining which ports are open and established connections
20

SCA

21

Security Configuration Assessment

22

SCA Engine

23

Osquery

24

Lab Exercise

Lab Exercise 6A: Osquery integration with Wazuh

Lab Objective:Configure Osquery on both linux and windows and manage it through Wazuh centralized configuration.
25

Sysmon

26

Lab Exercise

Lab Exercise 6B: Sysmon integration with Wazuh

Lab Objective:Configure Sysmon on your Windows machine to gain further security awareness over this endpoint.
27

Docker

28

Lab Exercise

Lab Exercise 6C: Monitoring docker activity

Lab Objective:Install a docker server on the indexer instance and monitor its activity with Wazuh
29

Cloud monitoring

30

Cloud monitoring

  • Wazuh is capable of monitoring the accounts of cloud based services such as AWS, GCP, Azure, Office 365 and GitHub.
  • Privilege separation is highly encouraged, so a dedicated account with only the powers needed to collect the logs should be created.
  • Wazuh periodically collect the logs and analyze them.
  • Monitoring cloud based assets and security alerts is crucial.
31

Wazuh Manager Cluster

32

Wazuh cluster

_images/wazuh_architecture.png
33

Questions

34

Certificates

35

Share your Certificate!

_images/certificate.png
36