Summary of "Watch how Wazuh Stop a SSH attack in Seconds with Active Response"

Watch how Wazuh Stops an SSH Attack in Seconds with Active Response

Demo: an SSH brute‑force (Hydra) attack is launched from an attacker Linux machine against a Linux victim. Wazuh detects the attack with correlation rules and automatically blocks the attacker IP using the built‑in firewall-drop active response.


What the video demonstrates


Environment and tools


Detection details seen in Wazuh


Guide — creating a correlation rule and active response

  1. Create a custom correlation rule (edit local_rules.xml)

    • Group name: e.g., brute_force_correlation
    • Custom rule ID: use a unique number (demo used 120000 as an example)
    • Severity level: high (demo used level 12)
    • Frequency: 3
    • Timeframe: 120 seconds (match 3 events within 2 minutes)
    • Ignore: 300 seconds (suppress repeat alerts for 5 minutes)
    • Match any of several default Wazuh rule IDs for SSH/PAM failures (examples noted in the demo: 5763, 5503, 5760, 5710, 351, etc.)
    • Add condition to correlate on the same source IP (data.srcip) to avoid false positives from many different IPs
    • Description: e.g., “Correlation brute force SSH attack — these rule IDs triggered three times from same IP within 2 minutes”
  2. Configure the active response (edit ossec.conf)

    • Ensure the built‑in firewall-drop command exists and is enabled (Wazuh includes a firewall-drop active‑response script)
    • Add an active‑response entry with fields such as:
      • disabled: no
      • command: firewall-drop
      • location: local (run on manager)
      • rules_id: the custom correlation rule ID (the one created above)
      • timeout: 180 seconds (initial block duration)
      • repeated_offenders / backoff: configure incremental blocking for repeat offenders (demo used repeated_offenders = 60 so subsequent blocks increase: first block 180s, then 180+60, etc.)
    • Restart Wazuh manager: systemctl restart wazuh-manager

Behavior observed during the test


Notes, tips, and follow‑ups


Files / locations edited


Main speakers / sources


Summary takeaway: with a custom correlation rule keyed on data.srcip and the built‑in firewall-drop active response, Wazuh can detect SSH brute‑force attempts and block the attacker IP in seconds while allowing configurable backoff and suppression to reduce noise.

Category ?

Technology


Share this summary


Is the summary off?

If you think the summary is inaccurate, you can reprocess it with the latest model.

Video