← Quick references

Suricata: investigate a capture without a live sensor

Run a saved capture through Suricata, read its EVE events, and separate a rule match from a supported finding.

Start with one question

Use this first pass to answer a small question: which conversations in a capture deserve a closer look? Suricata can process a saved PCAP and produce structured events. This exercise uses capture.pcap as a placeholder for a capture you own and are authorized to inspect. It does not connect Suricata to a network interface.

Keep the original capture unchanged. Write down where it came from, the relevant time window, and what you expected the application to do. That context will matter more than the number of alerts.

  • Suricata and jq are already installed.
  • The configuration and rule files are readable.
  • A new output directory will keep this run separate.

Record the setup and process the file

The configuration path below is a common Linux example; replace it with your installation's actual path. Create the output folder once, check the configuration, and only run the final command after the check succeeds. Use a different folder for the next run.

The -r option selects offline input, while -l selects the log directory. Record the Suricata version, configuration, and enabled rules alongside the results. Different rules can produce different findings from the same capture.

suricata -V
mkdir suricata-run-01
suricata -T -c /etc/suricata/suricata.yaml -l suricata-run-01
suricata -r capture.pcap -c /etc/suricata/suricata.yaml -l suricata-run-01

Read events before counting alerts

If EVE output is enabled, inspect eve.json in the output directory. Each line is a JSON event. The event_type field identifies its purpose; your enabled outputs determine which types appear. Start with a small alert summary, then open the complete record for anything worth investigating.

Keep the flow_id with each note. It connects an alert to related flow or protocol events from the same run, so you can recover context instead of treating the signature text as the whole story.

jq -r 'select(.event_type == "alert") | [.timestamp, .flow_id, .src_ip, .dest_ip, .alert.signature] | @tsv' suricata-run-01/eve.json
Useful evidence to retain
FieldUse
timestampLocate the event in the capture
flow_idFind related EVE records
signature_id and revIdentify the rule and its revision

Check what the run could actually see

Review suricata.log for startup problems and warnings. Check that the expected rules loaded and that EVE logging was enabled. Review HOME_NET against the addresses in this lab capture; an unsuitable setting can change which directional rules match.

An empty alert list is not a clean bill of health. A rule may not cover the behavior, the capture may omit a conversation, or encrypted traffic may hide the relevant content. Likewise, an alert is a lead to investigate, not proof that the host was compromised.

Turn one finding into a repeatable note

Choose one event and locate the corresponding conversation in your packet viewer. Explain what the packets support, what remains uncertain, and what additional evidence would settle the question. If no alert appears, document that result and the configuration used rather than manufacturing a successful detection.

  • Save the command, version, configuration reference, and rule revision.
  • Record timestamps and the related flow_id.
  • Separate observed packets from your interpretation.
  • Keep captures and logs private when they contain personal data.