sajjit.soti
← Back to projects

Case study — Group lab project, EPITA

SOC & observability platform: what standard thresholds miss

A six-person Red Team vs. Blue Team lab: deploy a cloud-based attacker and target on AWS, wire the target into a Wazuh SIEM, then run four real attack scenarios against it — from silent reconnaissance to a full brute-force compromise — and prove each one gets caught, correlated, and explained.

4

Attack scenarios, 4 custom detections

Wazuh

Cloud SIEM / XDR platform

Lvl 10

Highest-severity custom alert

1 attempt

Reconnaissance caught before brute-force

01

The lab environment

A single AWS VPC hosts two EC2 instances in the same subnet — an Ubuntu 22.04 target and a Kali Linux attacker — with outbound access to a managed Wazuh Cloud environment acting as SIEM. The Wazuh agent on the target forwards system logs (journald, auth.log), package-manager logs, and firewall logs to the cloud manager, where rules and decoders correlate raw events into alerts on the dashboard. Nothing here is simulated data — every alert in this case study came from an actual attack run against the actual box.

02

Four scenarios, four detections

1. Suspicious package installation Rule 100300 · Level 8

Attackers commonly install extra tools (netcat, nmap) right after compromising a host, to widen their foothold. A custom rule watches /var/log/dpkg.log for exactly that, capturing the package name and timestamp so an analyst can tell a scheduled update from an unauthorized change at a glance.

2. Unauthorized SSH access, non-existing user Rule 100501 · Level 8

Standard brute-force detection triggers on a threshold — five or more failed attempts against a real account. That misses a quieter attack: probing whether a username itselfis valid, which shows up as a single failed login against an account that was never real. A custom rule matches on the underlying “failed password for invalid user” signature and fires on the very first attempt — visibility standard rules don’t give you.

3. Critical file modification (FIM + privilege escalation)

With shell access gained, the attacker runs sudo nano /etc/passwd to plant a backdoor account. Two rules fire at once: Wazuh’s File Integrity Monitoring catches the checksum change on /etc/passwd (Rule 550), while a separate rule flags the successful sudo to root (Rule 5402). Neither alert alone tells the full story — the Threat Hunting dashboard lets an analyst pull both into one timeline and see the exact command that did it.

4. Initial access via SSH brute force Rule 100002 · Level 10 (Critical)

A Hydra dictionary attack against the target — six password attempts, one hit. The alert that matters isn’t “failed login”, it’s the pattern: a run of failures immediately followed by a success on the same account. A dedicated critical-level rule distinguishes that sequence from routine login noise and surfaces the compromised username and the attacker’s source IP in the same alert.

03

Why the custom rule for use case 2 mattered

This was the most instructive scenario, not the loudest one. Off-the-shelf brute-force detection is threshold-based by design — it waits for volume. That’s exactly the wrong model for username enumeration, where an attacker only needs one attempt per guess and never repeats a username twice. Building a rule around the underlying failure signature, rather than a count, is what caught the reconnaissance phase at all.

<!-- Custom rule: fires on a single attempt, not a threshold -->
<rule id="100501" level="8">
  <if_matched_sid>5710</if_matched_sid>
  <description>Unauthorized SSH access attempt (non-existing user)</description>
</rule>
04

Correlation is the actual product

The clearest lesson from the lab: a single failed login or a single file change looks benign in isolation. It’s only when the SIEM links a sudo event to the exact file-integrity change it caused — same host, same second, same session — that it becomes an actionable forensic narrative instead of two unrelated log lines an analyst has to connect by hand.