AARON MARTILLANO
← Back to projects
Home Lab - Aug 2026

Network intrusion detection with Suricata and Wazuh

Suricata alerts on a Windows 11 PC reach a Wazuh dashboard on Ubuntu for centralized analysis and threat hunting.

SuricataWazuhEmerging Threats OpenNpcapjq
Role
Design, deploy, verify
Environment
Local lab, Windows 11 + Ubuntu, Hypervisor (VirtualBox)
Result
Alerts visible end to end

How the data flows

Wazuh has no dedicated Suricata connector. The agent tails eve.json as a JSON log and forwards events to the manager, which applies its Suricata rules and decoders.

Windows 11 host Ubuntu host Npcappacket capture SuricataET Open rules eve.jsonalert log Wazuh agenttails the file Managerdecode + rules Dashboardsearch, hunt

Sample Investigation

Trigger a test alert and follow the event through each stage.

  1. Action
    Opened https://telegram.org in a browser
    Host
    Monitored Windows host

    Trigger

    Telegram is legitimate but can be abused for malware command and control. The ET Open rule helps identify traffic worth investigating; a match alone does not establish malicious activity.

  2. Signature
    ET INFO Observed Telegram Domain in TLS SNI (telegram .org)
    SNI
    telegram.org
    Destination port
    443
    PowerShell table of Suricata Telegram alerts from eve.json Open full screenshot → (opens in a new tab)

    Suricata detects

    Suricata writes the alert to eve.json; the screenshot shows a PowerShell query of those alerts.

  3. Rule description
    Suricata: Alert - ET INFO Observed Telegram Domain in TLS SNI (telegram .org)
    Wazuh rule ID
    86601
    Rule level
    3
    Wazuh Threat Hunting events showing Suricata Telegram alerts Open full screenshot → (opens in a new tab)

    Wazuh shows it

    The dashboard lists the Suricata alerts. Search data.alert.signature: (ET* or GPL*).

Details

Problems I solved

Nothing captured at first

Check that Npcap is installed in WinPcap API-compatible mode for packet capture.

Interface not found

Check that \Device\NPF_{GUID} matches the interface GUID from Get-NetAdapter.

Dashboard stayed empty

Restart the agent after changing ossec.conf, then check ossec.log for file monitoring and manager connectivity. Also check the dashboard time range.

Setup summary

Add this block inside <ossec_config> in C:\Program Files (x86)\ossec-agent\ossec.conf:

<localfile>
  <log_format>json</log_format>
  <location>D:\Program Files\Suricata\log\eve.json</location>
</localfile>

Restart the agent to apply the change:

net stop WazuhSvc
net start WazuhSvc

The Emerging Threats Open ruleset is referenced under rule-files in suricata.yaml.

Read the full setup guide on GitHub →

Querying alerts in Suricata (PowerShell)

Counts alerts recorded in eve.json by signature, most frequent first. If rows appear, Suricata is writing alerts to the log.

PowerShell output listing Suricata alert counts by signature Open full screenshot → (opens in a new tab)
jq -R -r --arg t alert 'fromjson? | select(.event_type == $t) | .alert.signature' "D:\Program Files\Suricata\log\eve.json" | Group-Object | Sort-Object Count -Descending | Select-Object Count, Name

Shows only the alerts that match a keyword. In the command, change { $_.Line -like '*Telegram*' } to your own keyword, such as a signature name, a domain or an IP address. The results appear as a table with the time, signature, source and destination IPs, destination port and SNI domain. This turns raw log lines into a clear summary of who connected where and which rule detected it.

PowerShell table of alerts matching Telegram with signatures and connection details Open full screenshot → (opens in a new tab)
Get-Content "D:\Program Files\Suricata\log\eve.json" | Select-String '"event_type":"alert"' | Where-Object { $_.Line -like '*Telegram*' } | ForEach-Object { $_.Line | ConvertFrom-Json } | Select-Object timestamp, @{N='Signature';E={$_.alert.signature}}, @{N='Src_IP';E={$_.src_ip}}, @{N='Dest_IP';E={$_.dest_ip}}, @{N='Dest_Port';E={$_.dest_port}}, @{N='SNI';E={$_.tls.sni}} | Format-Table -AutoSize

Shows the full details of one alert in JSON format, including the signature ID, category and severity. In the command, change { $_.Line -like '*Telegram*' } to your own keyword to check a different alert. -First 1 picks the first (oldest) match. Change the number to see more entries, for example -First 3 shows the first three. Use -Last 1 to see the newest match instead. Use this when the table doesn’t give enough detail to judge the alert.

PowerShell output showing the JSON details of a Telegram alert Open full screenshot → (opens in a new tab)
Get-Content "D:\Program Files\Suricata\log\eve.json" | Select-String '"event_type":"alert"' | Where-Object { $_.Line -like '*Telegram*' } | Select-Object -First 1 | ForEach-Object { $_.Line | ConvertFrom-Json | ConvertTo-Json -Depth 6 }