gitwtfhub

wtf is wazuh-custom-detection-rules?

nonso-cybersec/wazuh-custom-detection-rules — explained in plain English

Analysis updated 2026-05-18

0Audience · ops devopsComplexity · 4/5Setup · hard

TL;DR

A custom Wazuh security rule that detects password spraying attacks by spotting one IP address failing logins across many different usernames.

Mindmap

mindmap
  root((wazuh-custom-detection-rules))
    What it does
      Detects password spraying
      Custom Wazuh rule
      MITRE ATT&CK mapping
    Tech stack
      Wazuh
      XML rules
      Windows Event Log
    Use cases
      SOC alert tuning
      Detection engineering practice
      Lab attack simulation
    Audience
      Security analysts
      SOC engineers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Deploy a custom Wazuh rule that flags password spraying instead of generic brute force

REASON 2

Learn how to build and calibrate a custom Wazuh detection rule chain step by step

REASON 3

Test detection rule accuracy by running a simulated password spray against a lab domain controller

What's in the stack?

WazuhXML

How it stacks up

nonso-cybersec/wazuh-custom-detection-rules00kaku/gallery-slider-block04amanrajj/netwatch
Stars00
LanguageJavaScriptRust
Last pushed2021-05-19
MaintenanceDormant
Setup difficultyhardeasymoderate
Complexity4/52/53/5
Audienceops devopsgeneralops devops

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires a full lab: a Wazuh manager, a Windows Server domain controller with the Wazuh agent, and an attack machine to simulate the spray.

Wtf does this do

This project is a custom detection rule for Wazuh, an open source security monitoring tool, built to catch a specific kind of attack called password spraying. Password spraying is when an attacker tries a small number of common passwords against many different user accounts from the same source, hoping at least one account uses a weak password, rather than trying many passwords against a single account like a normal brute force attack does. The problem this project solves is that Wazuh's default brute force rule treats both attack types the same way, firing an identical alert whether one account or fifty accounts were targeted. A security analyst reading that alert cannot tell whether to lock down a single account or investigate the whole organization, and the correct response is very different in each case. The author noticed this gap while running an attack simulation against a test Active Directory environment and built a new rule, numbered 100300, specifically to close it. The new rule watches for individual login failure events from the same source IP address, but only fires once that IP has failed to log in as several different usernames within a two minute window. This distinguishes a spray, many usernames from one address, from ordinary repeated failures against one account. It fires at a higher severity level than the default rule and maps to a more precise category in the MITRE ATT&CK framework, a widely used reference for classifying attack techniques. The project documents the full setup: a lab with a Wazuh manager, a Windows Server domain controller running the Wazuh agent, and a Kali Linux machine used to simulate the attack. It also documents how the rule was deployed, tested with a live password spray, and measured, reporting that all twelve times it fired during testing were genuine detections with no false alarms. This is a hands-on security engineering project meant to demonstrate detection rule writing and testing, not a general purpose tool you install and run.

Yoink these prompts

Prompt 1
Walk me through deploying the Rule 100300 password spray detection XML into local_rules.xml in Wazuh
Prompt 2
Explain how the same_field and different_field conditions in this Wazuh rule detect password spraying
Prompt 3
Help me recalibrate the frequency and timeframe values in this rule for a production environment
Prompt 4
Show me how to set up a lab like this one with a Wazuh manager, a Windows domain controller, and a Kali attack box

Frequently asked questions

wtf is wazuh-custom-detection-rules?

A custom Wazuh security rule that detects password spraying attacks by spotting one IP address failing logins across many different usernames.

How hard is wazuh-custom-detection-rules to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is wazuh-custom-detection-rules for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.