17: Network Forensics: Evidence, Logs and Network Devices
Course: Networking - Security Advanced · Updated: October 2026 Literature: NF (Davidoff & Ham) chapter 1 (Practical Investigative Strategies), chapter 7 (Network Intrusion Detection and Analysis), chapter 8 (Event Log Aggregation, Correlation, and Analysis), chapter 9 (Switches, Routers, and Firewalls), chapter 10 (Web Proxies). Read the case studies in 7.9, 8.5, 9.8 and 10.8. Related lecture: Presentation: Network forensics
Learning objectives
After studying this article you can:
- explain what network forensics is and how it differs from computer (disk) forensics
- describe the challenges of network evidence and the OSCAR investigation method
- explain the role of IDS/NSM in an investigation
- explain what types of events are logged in Windows and Linux/Unix, how logging is organised, and the role of central logging (syslog, SIEM)
- explain the difference between a logging agent and central logging software, and name examples
- explain what evidence can be collected from switches, routers, firewalls and web proxies
- explain the challenge of encrypted traffic and how investigators deal with it
- name modern tools: Zeek, Arkime, NetFlow/IPFIX, SIEM platforms
Part A: Foundations and logging
1. What is network forensics?
Network forensics is the capture, recording and analysis of network events and traffic in order to find the source of security incidents, attacks or other problems, so that the results can be used as evidence.
1 | |
| Disk forensics | Network forensics | |
|---|---|---|
| Evidence | Hard disks, memory images | Packets, flows, logs from devices |
| Nature | Relatively stable, can be copied in full | Volatile: traffic passes in milliseconds, and logs rotate |
| Location | One device | Spread across many devices, organisations and countries |
| Volume | Terabytes per device | Potentially petabytes. You can't keep everything. |
1.1 Sources of network evidence
| Source | Example |
|---|---|
| Full packet capture (PCAP) | Complete traffic recordings (tcpdump, Wireshark, Arkime) |
| Flow records | Who talked to whom, when, how much: NetFlow, IPFIX, sFlow, Zeek conn.log |
| IDS/NSM alerts and logs | Snort, Suricata, Zeek (see article 16) |
| Network device logs | Switches, routers, firewalls, VPN gateways, wireless controllers |
| Server and application logs | Web servers, DNS, DHCP, mail, authentication (Active Directory) |
| Proxies | Web proxy logs and caches |
| Cloud logs | AWS CloudTrail, VPC Flow Logs, Azure/Microsoft 365 audit logs |
1.2 Evidence: legal aspects
- Chain of custody: document who collected the evidence, when and how, and who has handled it since.
- Integrity: calculate hashes (SHA-256) of captured files straight away.
- Order of volatility (RFC 3227): collect the most volatile data first (memory, network connections, ARP tables) and logs on disk later.
- Legal framework: privacy laws (GDPR / AVG), employment law (monitoring employees needs a legitimate purpose and proportionality), and telecommunications law. In the Netherlands, the Wet op de inlichtingen- en veiligheidsdiensten and the Wetboek van Strafvordering also apply.
1.3 The OSCAR method (NF chapter 1)
| Step | Activity |
|---|---|
| Obtain information | What happened? What does the environment look like? Who is involved? |
| Strategise | Plan the investigation: which sources, in what order, with what priority |
| Collect evidence | Collect and document it, keeping it intact (hashes, chain of custody) |
| Analyse | Correlate, build a timeline, interpret, form and test hypotheses |
| Report | Report clearly to management, lawyers or a court, in non-technical language where needed |
2. Network intrusion detection as a source of evidence (NF chapter 7)
- NIDS/NIPS: monitors the network for malicious activity and alerts administrators.
- Alerts: lists of suspicious packets or streams, the starting point of an investigation.
- Packet logging: the IDS can store the specific packets that triggered an alert for detailed analysis (in Wireshark).
- Detection modes: signature-based, protocol awareness, behavioural analysis (see article 16).
- Commercial products (Cisco, Palo Alto, Trellix, Vectra, Darktrace, Corelight) and roll-your-own solutions (Snort, Suricata, Zeek, Security Onion).
3. Event logs (NF chapter 8)
3.1 Operating system logs
Windows:
- Event logs (
.evtx) in categories: Security (logins, privilege use, policy changes), System, Application, plus many Applications and Services logs (PowerShell, Sysmon, Defender, ...) - Important Event IDs:
| Event ID | Meaning |
|---|---|
| 4624 / 4625 | Successful / failed logon (with logon type, e.g. 3 = network, 10 = RDP) |
| 4648 | Logon with explicit credentials |
| 4672 | Special privileges assigned (administrator) |
| 4688 | New process created (with command line, if enabled) |
| 4720 / 4732 | User account created / added to a security group |
| 1102 | Audit log cleared, a strong sign of an attacker covering their tracks |
| 7045 | New service installed (often used by malware and lateral movement) |
- Sysmon (Sysinternals) adds detailed logging: process creation with hashes, network connections, DNS queries.
- Central collection: Windows Event Forwarding (WEF) or an agent.
Unix/Linux:
- syslog (RFC 5424): messages with a facility (kern, auth, daemon, mail, local0–7, ...) and a severity (0 = emergency ... 7 = debug)
- Files under
/var/log/:auth.log/secure(logins, sudo, SSH),syslog/messages, application logs (/var/log/apache2/,/var/log/nginx/) - systemd-journald (
journalctl): binary, structured logs on modern Linux - auditd: detailed auditing of system calls and file access
3.2 Application and device logs
Almost everything logs: web servers (access logs with IP, time, URL, status code, user agent), DNS servers, DHCP (which IP address belonged to which MAC address at what time, which is essential!), e-mail servers, databases, VPN gateways, firewalls, cloud services, physical access systems (badges) and so on.
3.3 Central logging: aggregation, correlation, analysis
Why central logging?
- Attackers delete local logs. Central copies survive.
- Correlation: an attack leaves traces on many systems. Only a combined view gives a complete picture.
- Retention: keeping logs for longer (NIS2 and sector rules often require retention).
- Time synchronisation: all systems must use NTP. Otherwise building a timeline is impossible. Record time zones (UTC preferred).
Logging architecture:
| Component | Function | Examples |
|---|---|---|
| Logging agent | Runs on the source system. It collects logs locally, optionally filters or parses them, and forwards them (reliably, encrypted, with buffering) | Windows Event Forwarding, NXLog, Elastic Agent / Beats, Fluent Bit, rsyslog/syslog-ng, Wazuh agent, Splunk Universal Forwarder |
| Central logging software | Receives, stores, indexes, searches and correlates logs from all sources. It provides dashboards, alerts and reports. | SIEM (Security Information and Event Management): Splunk, Microsoft Sentinel, Elastic Security, IBM QRadar, Google SecOps, Wazuh (open source), Graylog, OpenSearch |
Analysis with the command line:
1 2 3 4 5 6 7 8 | |
Part B: Network devices, proxies and encrypted traffic
4. Switches, routers and firewalls (NF chapter 9)
Network devices are a valuable source of evidence, but much of the information is volatile (it only exists in memory) or kept only for a short time.
4.1 Switches
Switches are investigated because of their function:
- CAM table / MAC address table: which MAC address is on which port. You can trace a device to a physical wall socket. Note that entries expire (often after 300 seconds).
- Port mirroring (SPAN): copies traffic to a monitoring port for capture or an IDS.
- DHCP snooping bindings, 802.1X logs: which device/user was connected where.
- Logs: port up/down, security violations (port security, DAI) and configuration changes.
4.2 Routers
Routers are investigated because they link networks:
- Routing tables: the network topology, and evidence of manipulated routes
- ARP table: IP address ↔ MAC address on connected subnets
- ACLs and their hit counters
- NetFlow/IPFIX export: flow records of all traffic passing through
- Logs: logins, configuration changes, routing protocol events
- Compromised routers: an attacker may change the configuration, the firmware or ACLs (e.g. SYNful Knock, Cisco implant 2015, Salt Typhoon 2024)
4.3 Firewalls
- Logs of connection attempts (allowed and blocked), with extensive information: time, source/destination IP, ports, rule ID, number of bytes
- Evidence of data exfiltration and service exploitation: large outgoing transfers, connections to unusual countries or ports
- NAT translation tables: which internal host was behind a public IP address at a given time. These are crucial when an external party reports "your IP attacked us".
- VPN logs: who connected, from where and when
- NGFWs: application, user and URL logs, IPS alerts, and malware sandbox verdicts
4.4 Collecting evidence from network devices
- Prefer non-intrusive methods: read data through existing central logs, SNMP or NetFlow before you log in to the device.
- If you must log in to a device: use the console, record the whole session, and run only commands that read (e.g.
show running-config,show mac address-table,show ip arp,show logging,show clock). - Note the device's time compared with real time (clock drift).
- Capture volatile data first. A reboot erases memory, logs held in RAM and possibly malware implants.
4.5 Flow analysis: NetFlow and IPFIX
Full packet capture is expensive. Flow records are a compact alternative:
1 2 | |
Without content, a single line like this already raises questions: why does an internal PC upload 2.1 GB at 3 am to a server abroad? Tools: nfdump/nfsen, SiLK, ntopng, Elastic, cloud VPC Flow Logs.
5. Web proxies (NF chapter 10)
5.1 Why investigate web proxies?
| Type of proxy | Function |
|---|---|
| Caching proxy | Stores pages that have been fetched before, to speed things up |
| Content filter | Inspects content and blocks categories (malware, adult, gambling) or files |
| Anonymising proxy | Hides the user's IP address (e.g. Tor, commercial proxies) |
| Reverse proxy | Sits in front of web servers (load balancing, WAF, TLS termination) |
Investigation scenarios:
- A user on the internal network is suspected of violating the web-use policy or leaking data.
- A workstation is infected: which sites did it contact, and when was malware downloaded?
- Reconstructing what a user saw (the content in the cache).
5.2 Evidence in a web proxy
- Access logs (e.g. Squid
access.log) with: timestamp, client IP, (authenticated) username, URL, HTTP method, status code, number of bytes, content type, cache result (HIT/MISS), sometimes the user agent and referrer - The cache: copies of the web pages and files themselves, which can be extracted and reconstructed:
- manually: find cache objects, separate the HTTP headers from the content, decompress (gzip)
- automatically: with tools that parse the cache structure
- Analysis tools: command-line tools (
grep,awk,sort,uniq), log analysers such as SARG and Calamaris (Squid), and a SIEM.
1 2 | |
6. Encrypted traffic
In 2026 more than 90% of web traffic is encrypted (TLS 1.3, QUIC). For investigators this means the content is invisible by default. The options:
| Option | Description | Limits |
|---|---|---|
| Decrypt with the server's private key | Possible with RSA key exchange (TLS 1.2 and earlier) | Doesn't work with (EC)DHE / forward secrecy, so it is useless for TLS 1.3 |
| TLS inspection proxy ("SSL interception") | The proxy acts as the server towards the client (with a company CA on the clients) and as the client towards the server, and inspects the plaintext in between | Requires control over the clients. Legal, privacy and security issues. Breaks certificate pinning. |
| Session key logging | Endpoints export the session keys (SSLKEYLOGFILE, EDR, debugging) |
Only on systems you control |
| Endpoint visibility | EDR sees the data before encryption or after decryption | Requires agents on endpoints |
| Metadata analysis | Without decryption: SNI, certificate details, JA3/JA4 TLS fingerprints, packet sizes and timing, flow volumes, DNS queries | Content stays hidden, but it is often enough to detect malware C2 and exfiltration |
7. Modern network forensics tools
| Tool | Use |
|---|---|
| Wireshark / tshark | Packet analysis. File → Export Objects (HTTP, SMB, ...) and Follow TCP Stream |
| tcpdump | Capture on servers and network devices |
| Zeek | Turns PCAPs or live traffic into protocol logs, which is the basis for threat hunting |
| Arkime (formerly Moloch) | Large-scale full packet capture with indexing and a web interface |
| NetworkMiner | Extracts files, images, credentials and hosts from PCAPs |
| Suricata | Run rulesets over historical PCAPs (suricata -r capture.pcap) |
| Security Onion | A complete open-source platform: Suricata, Zeek, Elastic, case management |
| SIEM | Splunk, Microsoft Sentinel, Elastic, Wazuh: log correlation and timelines |
| Timesketch / Plaso | Combine sources into a single super-timeline |
| Velociraptor | Collect evidence from many endpoints quickly |
8. Summary
- Network forensics = collecting and analysing packets, flows and logs as evidence, using a structured method (OSCAR) and keeping the chain of custody.
- Logs come from operating systems (Windows Event Log, syslog/journald), applications and devices. Central logging with agents and a SIEM is essential for correlation and integrity.
- Switches (CAM table, SPAN), routers (routing/ARP tables, NetFlow), firewalls (connection and NAT logs) and web proxies (access logs, cache) are rich sources of evidence, but much of it is volatile.
- Encryption hides content. Investigators rely on TLS inspection, key logging, endpoints and metadata such as JA4.
References
Videos
- SANS Digital Forensics and Incident Response: YouTube channel (many free talks, e.g. on network forensics, Zeek, Arkime): https://www.youtube.com/@SANSForensics
- Chris Greer: Wireshark for incident response / threat hunting: https://www.youtube.com/@ChrisGreer
- 13Cubed: Windows event logs, forensics: https://www.youtube.com/@13Cubed
- SharkFest: Wireshark developer and user conference talks: https://sharkfest.wireshark.org/
- Active Countermeasures: "Threat hunting with network data" (Zeek, RITA, AC-Hunter): https://www.youtube.com/@ActiveCountermeasures
Articles and books
- Davidoff & Ham, Network Forensics: Tracking Hackers through Cyberspace (Prentice Hall, 2012), and the Network Forensics Puzzle Contest by the authors, with evidence files and solutions: http://forensicscontest.com/
- Richard Bejtlich, The Practice of Network Security Monitoring (No Starch Press, 2013)
- SANS FOR572: Advanced Network Forensics: Threat Hunting, Analysis, and Incident Response, with free posters and cheat sheets: https://www.sans.org/cyber-security-courses/advanced-network-forensics-threat-hunting-incident-response/
- Microsoft, Security auditing events (Windows Event IDs): https://learn.microsoft.com/en-us/windows/security/threat-protection/auditing/security-auditing-overview
- FoxIO, JA4+ network fingerprinting: https://github.com/FoxIO-LLC/ja4
Standards and guidelines
- NIST SP 800-86: Guide to Integrating Forensic Techniques into Incident Response
- NIST SP 800-92 (Rev. 1 draft): Cybersecurity Log Management Planning Guide
- NIST SP 800-61 Rev. 3: Incident Response Recommendations and Considerations for Cybersecurity Risk Management (2025)
- RFC 3227: Guidelines for Evidence Collection and Archiving
- RFC 5424: Syslog · RFC 7011: IPFIX
Practice material
- Malware-Traffic-Analysis.net: PCAPs with exercises and answers: https://www.malware-traffic-analysis.net/
- CyberDefenders: blue-team challenges, including network forensics: https://cyberdefenders.org/
- Wireshark sample captures: https://wiki.wireshark.org/SampleCaptures
Cyber Security
Why it matters
Network forensics makes it possible to answer the key questions after an incident: What happened? How did the attacker get in? What did they access or steal? Are they still inside? How do we keep them out?
- Incident response depends on evidence. Without logs and network data, an organisation often can't tell what was stolen, and then has to assume the worst (reporting duties, reputational damage).
- Legal duties: under the GDPR, a data breach must be reported to the Dutch Data Protection Authority (Autoriteit Persoonsgegevens) within 72 hours. Under NIS2, essential and important entities must give an early warning within 24 hours and a report within 72 hours. You can't meet these deadlines without good logging.
- Attackers cover their tracks: they delete logs (Event ID 1102), use encryption, live off the land and move slowly. Volt Typhoon stayed hidden in critical infrastructure for years.
- Retention is too short: many organisations keep firewall and proxy logs for only days or weeks, while the average time to detect a breach is still months.
- Evidence can be inadmissible if the chain of custody isn't followed, or if data was collected illegally (privacy).
- Logging systems are themselves targets: a compromised SIEM or log server gives an attacker insight into the organisation and the opportunity to remove traces.
How to make it safe
- Have a logging strategy: decide in advance what to log (authentication, network devices, firewalls, proxies, DNS, DHCP, VPN, cloud, EDR). Don't wait until there's an incident.
- Centralise logs in a SIEM, with agents that forward logs encrypted (TLS) and reliably. The log platform must be on a separate, well-protected network with write-once or immutable storage.
- Synchronise all clocks with NTP, and log in UTC.
- Retain logs long enough: at least 6–12 months for security-relevant logs (as advised by NCSC and others). Keep the GDPR proportionality principle in mind.
- Collect network data: NetFlow/IPFIX everywhere, Zeek logs at strategic points, and full packet capture at the Internet edge (with a rolling buffer of a few days).
- Enable important audit events: Windows advanced audit policy, process command-line logging, PowerShell script-block logging, Sysmon, Linux auditd.
- Prepare forensic readiness: an incident response plan, contact details, tools ready to use (a forensic laptop, write blockers, a capture appliance), and legal and privacy agreements (works council, privacy officer).
- Practise: tabletop exercises, and analysing sample PCAPs (Malware-Traffic-Analysis, CyberDefenders).
- Protect evidence integrity: hash files when you collect them, document the chain of custody, work on copies.
- Use detection content: Sigma rules for the SIEM, Suricata/ET rules, and threat intelligence (MISP).
Extra references
- NCSC-NL, Logging en monitoring: richtlijnen en factsheets: https://www.ncsc.nl/
- CISA & partners, Best Practices for Event Logging and Threat Detection (2024): https://www.cisa.gov/resources-tools/resources/best-practices-event-logging-and-threat-detection
- Autoriteit Persoonsgegevens, Datalek melden (reporting a data breach): https://autoriteitpersoonsgegevens.nl/
- Sigma (generic signature format for SIEM systems): https://github.com/SigmaHQ/sigma
- MISP, Open Source Threat Intelligence Platform: https://www.misp-project.org/
- Mandiant, M-Trends (yearly report with dwell-time figures): https://www.mandiant.com/m-trends