Home SOC / SIEM lab

A security operations center on an isolated lab network. Host logs and network traffic flow into a Wazuh SIEM, custom rules catch each attack stage, and a Python engine turns the alerts into incident reports.

2026
  • Wazuh
  • Suricata
  • Sysmon
  • Python
  • Docker
  • Metasploit
View source

Architecture: telemetry in, incidents outIsolated lab network

  1. Attacker
    Attacker boxNmap, Metasploitprivate IPs only
  2. Monitored
    Windows ServerSysmon + Wazuh agent
    Nutanix AHVsyslog, Prism alerts
    Suricata NIDSspan port, eve.json
  3. SIEM VM in Docker
    Wazuh Manager11 custom rules + decoder
    Wazuh IndexerOpenSearch
    Wazuh Dashboard
  4. Python tooling
    correlate.pyreads alerts over the REST API
    Incident reportMarkdown or PDF

Why add a network sensor

Wazuh catches brute force, lateral movement and process attacks once they touch a monitored host. But a plain Nmap SYN scan writes nothing to the Windows event log, so a host-only setup never sees the recon. Suricata on a span port closes that gap.

  1. Host only
    Nmap SYN scan
  2.  
    Windows Server
  3.  
    Nothing loggedscan is invisible
  1. With Suricata
    Nmap SYN scan
  2.  
    Suricata8+ scan alerts in 60s
  3.  
    Rule 100011level 10 · T1046

Detection rules

All 11 rules in local_rules.xml, ordered from recon to exploitation. Bar length is the Wazuh alert level, 0 to 15.

RuleLevelDetectsATT&CK
1000100Suricata low-priority anomaly (base rule, no alert)
10001110Port scan: 8+ Suricata scan alerts from one source in 60sT1046
10001210Port scan by signature: 8+ scan signatures in 60sT1046
1000133Windows Firewall dropped a connection
10001410Port scan via firewall: 15+ distinct blocked connectionsT1046
10002010Brute force: 6+ failed logons (4625) from one source in 120sT1110
10002112Brute force followed by a successful logon (4624)T1110 T1078
10003013Suspicious process access to LSASST1003
10003112Encoded or hidden PowerShell executionT1059.001 T1027
10003212New service installed from a temp pathT1543.003 T1021
10004015Multi-stage attack: brute force, then exploitation, same IPT1110 T1003

The kill-chain rule

Rule 100040 only fires when one IP completes the chain: a brute force that succeeds, then exploitation-stage activity within 15 minutes.

  1. Brute force
    1000206+ failed logonswithin 120 seconds
  2. Access
    100021Then a successful logonsame source
  3. Any of, within 900s
    100030LSASS access
    100031Encoded PowerShell
    100032Suspicious service
  4. Alert
    100040 · level 15Multi-stage attackfrom $(srcip)
<!-- local_rules.xml -->
<rule id="100040" level="15" timeframe="900">
  <if_matched_sid>100021</if_matched_sid>
  <if_sid>100030,100031,100032</if_sid>
  <same_source_ip />
  <description>Multi-stage attack
    from $(srcip)</description>
  <mitre><id>T1110</id><id>T1003</id></mitre>
</rule>
  • Chained, not counted. Single alerts are noisy; requiring the sequence cuts false positives.
  • Same source. same_source_ip keeps two unrelated events from combining.
  • Bounded window. A 900-second window keeps the chain tied to one intrusion.

From alerts to an incident report

The correlation engine rebuilds the same story from raw alerts, independently of rule 100040, and writes it up.

  1. Pull alertsWazuh Indexer REST APIwazuh_api_client.py
  2. Group by source IPone attacker per incidentcorrelate.py
  3. Window by timeevents close togethercorrelate.py
  4. Tag attack stagerecon, brute force, exploitationcorrelate.py
  5. Write the reportMarkdown or PDFgenerate_report.py

Safety rails