Urgent.News

What's breaking now, across thousands of outlets.

Tech

Detection Engineering Lab: Building a Wazuh SIEM and Writing a Custom Rule for SSH Brute Force

This write-up documents a small SIEM detection lab I built to practise detection engineering from the defender's side: deploying a SIEM, generating adversary activity against a monitored host, validating that it is detected, and writing a custom correlation rule mapped to MITRE ATT&CK. Repository with the rule, configuration notes and all screenshots:…

This article details a hands-on SIEM detection lab designed to teach defenders the end-to-end process of deploying a Security Information and Event Management (SIEM) system, simulating adversary activity, validating detection capabilities, and writing custom correlation rules tied to MITRE ATT&CK techniques.

The lab utilizes three virtual machines on a bridged network: a Wazuh manager serving as the SIEM, an Ubuntu endpoint with OpenSSH and Apache hosting the Wazuh agent, and a Kali Linux machine acting as the adversary simulation host. Logs from the endpoint are collected by the Wazuh agent and forwarded to the manager for decoding, evaluation against the rule set, and indexing for display on the dashboard.

Two detection scenarios are examined:

1. SSH brute-force attacks against the SSH service on the endpoint, using Hydra from the Kali host to trigger Wazuh rule 5760 (ssh: authentication failed). The event details provide critical information for analyst investigation.

2. Network reconnaissance, detected through Apache access logs from Nmap port scanning the endpoint. The Nmap script engine requests non-existent URLs, producing 404 responses that trigger Wazuh's web-based rule (31101). The log includes Nmap's user agent for easy attribution of the tool.

To improve detection beyond the vanilla Wazuh rules, the article walks through creating a custom correlation rule that fires when a specific SSH brute-force rule (5760) triggers five times within 120 seconds. This helps filter out normal operational noise and focus on suspicious activity bursts. The rule is then tested against the simulated Hydra attacks.

The lab also uncovers a false positive from Wazuh's rootcheck signature flagging certain system binaries. This false positive is attributed to a generic string pattern match and not indicative of actual compromise. The author recommends documenting and implementing scoped exceptions for known false positives instead of disabling the rule outright.

The article concludes by outlining next steps and extensions for the lab, such as tightening the custom brute-force rule to trigger only from a single source IP, adding automated response capabilities to block offending IPs, expanding coverage to include additional MITRE ATT&CK techniques, and implementing further tuning and exception management. Standing up a SIEM and manually generating adversary activity provides a concrete, practical approach to learning and practicing detection engineering concepts.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

FAQ: A Drafted Retry Block Is Not a Flake Policy

A red job came back green after a single retry. Someone pasted a model draft and called the flake gone. I do not buy that story without a real job log.

  • Retry block in GitLab CI does not replace flaky job fixes.
  • Retry key queues another job attempt, not job stability guarantee.
  • Myth suggests retry key makes job safe, but only spends failure budget.

Dynoxide 1.3.0: security fixes and fussier pagination

Dynoxide 1.3.0 ended up a bit bigger than I'd planned. Working through the compatibility fixes turned up some DynamoDB behaviour I hadn't expected, and I also fixed two security issues that needed…

  • Dynoxide 1.3.0 includes security fixes for DynamoDB behavior and token-related issues
  • High-severity parsing error now triggers syntax error instead of panic
  • Pagination rules updated with stricter DynamoDB token matching requirements

More from Saturday 10 October →