Live Network State and Process Capture
Live network state and process capture is the first hands-on step of live response: collecting transient artefacts such as active connections, listening ports, ARP tables, DNS cache, running process trees, and open file handles before they vanish. This data guides containment decisions and shapes the scope of any subsequent forensic acquisition.
Last updated:
Live network state and process capture is the collection of transient digital artefacts from a running system during an active security incident. These artefacts include active TCP and UDP connections, listening ports, ARP cache entries, the DNS resolver cache, the routing table, running process trees with parent-child relationships, and the file handles each process holds open. All of them exist only in memory. They change continuously and vanish entirely when the system is shut down, making their collection the first priority of any live response action. The data gathered at this stage directly informs containment decisions: which network paths to block, which processes to terminate, and how broadly the incident has spread across the environment.
The rationale for capturing live state before acquiring disk images comes from the order of volatility, a concept formalised in RFC 3227 (Guidelines for Evidence Collection and Archiving, published by the IETF in 2002). The order ranks data by how quickly it changes. CPU registers and memory contents are at the top, followed by network connections, process tables, disk data, and finally removable or offline media. A responder who images the disk first and then checks network connections has already missed the most informative layer. Most incident response frameworks, including NIST SP 800-61 and the SANS PICERL model, build the live response step into the detection and containment phases for this reason.
Live capture introduces a fundamental tension: any action taken on the live system modifies it. Running a command writes to memory, updates timestamps, and may alter the very artefacts being collected. Skilled responders minimise this contamination by using trusted, statically compiled tools from a write-protected response kit rather than the binaries already on the suspect system, which may be trojaned or modified. They also document every command executed and its output, creating an audit trail that supports chain-of-custody requirements in later legal or disciplinary proceedings. This approach is consistent across jurisdictions: the UK College of Policing ACPO Good Practice Guide, the US NIST guidelines, and the EU's ENISA guidance all require documentation of investigative actions taken on a live system.
By the end of this topic you will be able to:
- Explain the order of volatility and apply it to sequence live capture steps correctly.
- Identify the specific commands used on Windows and Linux to capture active connections, ARP tables, DNS cache, and process trees.
- Describe the contamination risk of live response and explain how a trusted response kit reduces that risk.
- Interpret a process tree to identify anomalous parent-child relationships that indicate malicious activity.
- Explain how live network state data guides containment decisions before a full forensic disk acquisition begins.
- Order of volatility
- A ranking of digital evidence by how quickly it changes or disappears. Formalised in RFC 3227, it runs from CPU registers and memory (most volatile) through network state, processes, disk data, and removable media (least volatile). Responders collect in this order.
- Live response
- The process of collecting evidence and triage data from a running system without first powering it down. Preserves volatile artefacts that would be lost in a traditional dead-box acquisition but introduces contamination risk through the act of collection itself.
- ARP cache
- A table held in memory that maps IP addresses to hardware (MAC) addresses for recently contacted hosts on the local network. ARP cache entries reveal which hosts a system has communicated with recently and can expose lateral movement paths not recorded in firewall logs.
- Process tree
- A structured representation of running processes showing each process alongside its parent. Malware frequently spawns command shells or other processes from unexpected parents, such as a web server process or a document reader. The tree makes these anomalies visible where a flat list would hide them.
- Trusted response kit
- A portable collection of statically compiled, cryptographically verified forensic tools stored on write-protected media. Used during live response to avoid executing potentially compromised system binaries on the suspect host.
- DNS resolver cache
- A temporary store of DNS query results held by the operating system. Entries reveal which domain names a host has recently resolved, potentially exposing command-and-control (C2) infrastructure, data exfiltration destinations, or phishing sites visited before the incident was detected.
The order of volatility in practice
RFC 3227, published in 2002, established the order of volatility as a guiding principle for digital evidence collection. The categories, from most to least volatile, are: registers, cache, and memory contents; network state and active connections; running processes; disk data; backup media; and finally printed output or remote logs. This ordering exists because actions taken later in the sequence can destroy evidence collected earlier. A responder who captures a disk image before recording active connections has potentially flushed network buffers, closed TCP sessions, and caused the kernel to evict memory pages that held connection-state data.
In practice, the live capture phase typically collects four categories of network state in sequence: the active connection table (TCP and UDP connections with remote addresses and states), the ARP cache, the DNS resolver cache, and the routing table. Each takes seconds to collect. Together they give the responder a snapshot of who the compromised host was talking to at the moment of capture, which hosts it had recently contacted, which domains it had resolved, and how traffic was being routed. This snapshot informs every containment decision that follows.
Some responders argue that network state capture should be deferred until after memory acquisition so that the memory image includes the connection-state data redundantly. This is a reasonable position on isolated, stable systems. On live enterprise hosts under active attack, the compromise may be spreading laterally while the memory acquisition runs. Capturing network state first provides an immediate picture that the containment team can act on in parallel with the acquisition.
Capturing active connections and listening ports
The active connection table is the most actionable single artefact in a live response. It shows every established TCP session, every UDP socket awaiting packets, and every listening port, together with the process ID and, on most platforms, the owning process name. A connection to an unfamiliar IP address on a high-numbered port from a process that should not be making network connections is a strong indicator of compromise even before any log analysis begins.
| Platform | Command | Key flags | Output columns |
|---|---|---|---|
| Windows | netstat -ano | -a all sockets, -n numeric, -o PID | Protocol, local addr:port, foreign addr:port, state, PID |
| Linux | ss -tunap | -t TCP, -u UDP, -n numeric, -a all, -p process | State, recv-Q, send-Q, local addr, peer addr, process |
| Linux (older) | netstat -tunap | same as ss | Same columns, deprecated on newer distros |
| macOS | netstat -anv | -a all, -n numeric, -v verbose | Protocol, local addr, foreign addr, state, PID |
| Windows (extended) | Get-NetTCPConnection | Select-Object * | PowerShell cmdlet | LocalPort, RemotePort, State, OwningProcess, CreationTime |
After recording the connection table, the responder cross-references each PID against the process list to confirm the process name and its executable path. A PID listed in netstat as owning a connection to an external IP, but whose process name resolves to 'svchost.exe' or 'lsass.exe', warrants immediate investigation: those process names are frequently spoofed by malware, and a legitimate svchost would not typically hold an outbound connection to a residential IP address. The combination of connection record and process detail is more informative than either artefact alone.
ARP cache, DNS cache, and routing table
The ARP cache records IP-to-MAC mappings for hosts the system has communicated with on the local network segment. Its forensic value is in revealing lateral movement. If a workstation's ARP cache contains entries for servers it has no legitimate reason to contact, those entries are evidence of scanning, credential spraying, or lateral movement attempts. ARP entries typically expire after a few minutes of inactivity, so their presence at capture time implies recent contact. On Windows, 'arp -a' lists the cache. On Linux, 'arp -n' or the preferred modern form 'ip neigh' displays the same data including entry state (REACHABLE, STALE, DELAY, FAILED).
The DNS resolver cache records the results of recent DNS queries. Entries persist for the duration of the DNS TTL, which can range from a few seconds to several hours. The cache exposes every domain the system has resolved recently, including command-and-control domains, data exfiltration endpoints, and phishing sites. On Windows, 'ipconfig /displaydns' lists all cached entries with their TTLs and resolved addresses. On Linux, the cache is held by the stub resolver service (systemd-resolved on most modern distributions), accessible via 'resolvectl statistics' and 'resolvectl query' for individual names, or by inspecting '/var/cache/nscd/hosts' on nscd-based systems.
The routing table is less likely to reveal attacker activity directly, but it is captured as a standard part of live triage because attackers sometimes inject routes to redirect traffic or to ensure malware-generated connections leave through a specific interface. On Windows, 'route print' or 'Get-NetRoute' shows the routing table. On Linux, 'ip route' or 'netstat -rn' provides the same view. Unexpected routes to specific hosts or subnets, particularly routes pointing to interfaces not normally used for outbound traffic, are an indicator of a persistent routing manipulation.
Process tree capture and interpretation
A process tree shows every running process together with its parent process ID (PPID). The parent-child relationship is central to detecting malicious activity. Legitimate processes follow predictable ancestry: 'explorer.exe' spawns user applications; 'services.exe' spawns service host processes; 'wininit.exe' spawns 'lsass.exe' and 'services.exe'. When a process appears under an unexpected parent, such as 'cmd.exe' spawned by 'iexplore.exe', or a PowerShell session spawned by a document editor, the anomaly is immediately visible in the tree and would be invisible in a flat process list sorted by PID.
On Windows, the Sysinternals tool PsList with the '-t' flag displays the process tree in text form. The PowerShell command 'Get-WmiObject Win32_Process | Select-Object ProcessId,ParentProcessId,Name,ExecutablePath' provides the raw data for tree reconstruction and includes the full executable path, which is useful for detecting process name spoofing. On Linux, 'ps auxf' renders the process tree directly in the terminal using ASCII art indentation. The 'pstree -p' command provides a compact tree with PIDs. Both show command-line arguments, which frequently reveal the exact payload a malicious process was launched with.
Common malicious parent-child patterns include: a web server process (IIS w3wp.exe, Apache httpd, nginx) spawning cmd.exe or powershell.exe, indicating web shell execution; a document reader or email client spawning a scripting engine, indicating a malicious macro or attachment exploit; a process with a legitimate-sounding name in an unusual directory (for example, svchost.exe in C:\Users rather than C:\Windows\System32) spawning network-connected children; and a scheduled task runner spawning an unexpected binary, indicating persistence via task scheduler. Recognising these patterns requires familiarity with normal process hierarchies on the platform being examined.
The trusted response kit and contamination control
Every command executed on a live system modifies it. Timestamps change. Memory pages are allocated and released. If an attacker has replaced system utilities with trojaned versions, running the system's own 'netstat' or 'ps' may return filtered output that hides the attacker's connections and processes. The trusted response kit addresses both problems. It is a portable collection of statically compiled binaries for the target platform, stored on write-protected media such as a USB drive with a physical write-protect switch, and cryptographically verified with a known hash before each use.
Forensic readiness programmes, described in standards such as ISO 27035 and the UK National Cyber Security Centre's incident management guidance, specify that response kits should be maintained, tested, and available before an incident occurs. See Forensic Readiness and Toolkits for toolkit composition guidance. In practice, many organisations run their first live response using whatever tools are available on the system, then update their toolkit after the incident. This is understandable but avoidable.
Contamination documentation is as important as contamination minimisation. Every command executed during live response, its exact syntax, the timestamp of execution, and the responding analyst's identity should be recorded. This record forms part of the chain of custody documentation. Under the UK's PACE 1984 Code B guidelines, the Indian Bharatiya Sakshya Adhiniyam 2023 provisions on electronic records, and US Federal Rules of Evidence Rule 901, evidence integrity challenges in court often focus on who had access to the system and what they did to it. A complete action log answers that question before it is asked.
From live capture to containment decisions
The purpose of live network state and process capture is to inform containment, not to conclude the investigation. Once the responder has captured the connection table, ARP cache, DNS cache, routing table, process tree, and open file handles, the data should be analysed immediately against specific containment questions: Is there an active outbound connection to a known-malicious or unrecognised IP that must be blocked at the firewall or host? Has the attacker's process established persistence that will survive a process termination? Are ARP entries present for hosts that have not yet been scoped into the investigation, suggesting lateral movement that must be traced? Are DNS cache entries pointing to command-and-control domains that can be sinkholed or blocked at the DNS resolver?
Containment decisions made without live state data risk being incomplete. Blocking a single IP address while the attacker maintains a second active connection through a different path achieves nothing. Terminating a visible malicious process that has already written a persistence mechanism to disk only delays the next execution. The live capture provides the map; containment uses that map to close every exit at once rather than one at a time. This containment-first logic is explicitly reflected in the NIST SP 800-61 lifecycle and the SANS PICERL containment phase. More detail on how these triage findings feed into formal containment strategy is covered in Triage and Incident Prioritisation.
After containment actions are taken, the live capture data also seeds the investigation's scope. The list of remote IPs from the connection table becomes the starting point for threat intelligence lookups and firewall log searches. The domains from the DNS cache feed into historical DNS query analysis to establish the timeline of C2 communication. The process tree and open file handle data feed into the memory analysis and disk forensics phases that follow. Live capture is not a standalone activity: it is the bridge between the detection alert and the structured forensic investigation described in the broader digital forensics discipline.
A responder arrives at a compromised Windows workstation. The first action should be to:
Key Takeaways
- The order of volatility, formalised in RFC 3227, requires collecting network state and process data before disk images: these artefacts exist only in memory and are destroyed by shutdown or reboot.
- The core live capture sequence is: active connections (netstat -ano / ss -tunap), ARP cache (arp -a / ip neigh), DNS resolver cache (ipconfig /displaydns / resolvectl), routing table (route print / ip route), process tree (ps auxf / Get-WmiObject), and open file handles (lsof / Handle.exe).
- A trusted response kit of statically compiled, cryptographically verified tools bypasses anti-forensics techniques that replace system utilities with filtered versions, and every command executed must be logged to support chain-of-custody requirements.
- Process trees expose anomalous parent-child relationships, such as a web server spawning a command shell, that are invisible in flat process lists and are the primary indicator of web shell exploitation or document-based exploits.
- Live capture data feeds directly into containment decisions: IPs from the connection table inform firewall rules, ARP cache entries expand the scope to lateral movement targets, and DNS cache entries expose command-and-control infrastructure for blocking or sinkholing.
Why must live network state be captured before shutting down a compromised system?
What is the order of volatility and why does it matter for live capture?
Which commands capture active network connections on Windows and Linux?
How does ARP cache capture help identify lateral movement?
What is a process tree and why is it more useful than a flat process list?
Test yourself on Incident Response and Management with free, timed mocks.
Practice Incident Response and Management questionsSpotted an error in this page? Report a correction or read our editorial standards.