The idea
Pavel runs the security desk at Greystone Transit Authority, where a tap on the office switch feeds a copy of the office's traffic to his analyst machine. Two sensors watch that copy and write three logs to one SIEM: Suricata raises alerts from known-bad patterns, and Zeek logs every connection (one log) and every web request (another), attack or not.
Last night the ticketing portal had two visitors. One was a clerk doing her job. The other swept the portal's ports and threw a run of exploits at it.
The morning shift wants to know what happened before the portal opens to the public at nine. In the SIEM, both visitors' events are mixed together across three logs. Pavel has to pull one actor's whole path out of that pile, and tell it apart from the clerk's ordinary night.
Steps
-
Two sensors, three logs
A SIEM (security information and event management) is one place that holds every sensor's records and answers questions across all of them at once. Pavel's analyst machine runs two sensors on the network card that receives the copied traffic:
- Suricata matches traffic against tens of thousands of known-bad signatures and raises an alert when one hits.
- Zeek writes one line per connection (its
connlog) and one line per web request (itshttplog), whether or not anything is wrong with them.
A shipper called Vector moves all three logs into OpenSearch, the search engine behind this SIEM. Each sensor sees the same traffic but records a different slice: Suricata the few events that tripped a rule, Zeek the full record of who talked to whom and what they asked for. Correlation joins those slices back together.
First, check that the SIEM is up and the sensors are running.
analyst:~# ps -o rss=MEMORY_KB,comm= -C zeek,Suricata-Main,java,vector
-
Start from the alert
Triage usually starts where the noise is loudest: an alert. Suricata only speaks up when traffic matches a signature, so its alerts are the few events someone already decided are worth a look. Ask the SIEM for every alert, grouped by who sent it (
src_ip) and which rule fired (alert.signature).This is the thread Pavel pulls first. An alert is only the slice Suricata caught, though. It does not tell him everything that host did, or whether anything else on the network deserves a look, and the next two steps cover that.
analyst:~# curl -s 'localhost:9200/_plugins/_ppl?format=csv' -H 'content-type: application/json' -d '{"query":"source=suricata | where event_type = \"alert\" | stats count() by src_ip, alert.signature"}' -
What that host touched
The alert named
10.0.1.50. Widen the view with Zeek's connection log, which holds every connection, signature or not.A port sweep shows up here as one source reaching a spread of destination ports (
id.resp_p). A normal visitor talks to one port, the portal's web port, while a host looking for a way in knocks on several. Count the distinct ports each source reached, busiest first.This is correlation at work: you carry the alert's source address over to a different log and ask what else that address did. Suricata called that field
src_ip, and Zeek calls the same source addressid.orig_h. One address, two field names.analyst:~# curl -s 'localhost:9200/_plugins/_ppl?format=csv' -H 'content-type: application/json' -d '{"query":"source=zeek-conn | stats dc(id.resp_p) as ports, count() as conns by id.orig_h | sort - ports"}' -
What that host asked for
One more log, one more slice: Zeek's HTTP log records every web request (the method, the path, the headers), attack or not. The alert said the intruder tried exploits. The HTTP log shows every request it sent, next to the clerk's single ordinary one.
Count requests per source first, then read the intruder's. The same source address joins this third log to the other two.
analyst:~# curl -s 'localhost:9200/_plugins/_ppl?format=csv' -H 'content-type: application/json' -d '{"query":"source=zeek-http | stats count() as requests by id.orig_h | sort - requests"}' analyst:~# curl -s 'localhost:9200/_plugins/_ppl?format=csv' -H 'content-type: application/json' -d '{"query":"source=zeek-http | where id.orig_h = \"10.0.1.50\" | stats count() by method, uri"}' -
One actor, one path
Put the three slices together.
10.0.1.50tripped Suricata's signatures, swept three ports in Zeek's connection log, and sent the matching requests in its HTTP log. That is the intruder's whole path, rebuilt from logs that each saw only a piece.The clerk,
10.0.1.30, is the comparison. Pavel clears her by what she did: one connection to one port and oneGETof/status. Nothing in any of the three logs looks like an attack.What does not clear her is the absence of an alert. The intruder's port sweep raised no alert either (step 3), so "no alert" cannot mean "safe". You clear a host by reading everything it did and finding it ordinary.
Two limits are worth knowing. Pavel pivoted by hand, carrying one address from search to search, where a production SIEM automates this with correlation rules that also tie events together by time. And a source address is a handy key on this small network but a weak identity on a real one, where NAT and DHCP put many people behind one address.
analyst:~# curl -s 'localhost:9200/_plugins/_ppl?format=csv' -H 'content-type: application/json' -d '{"query":"source=suricata | where event_type = \"alert\" | stats count() by src_ip, alert.signature"}'
Run these steps on real machines