Explore our new Cybersecurity Terms Glossary, explained by our experts.
Cybersecurity Terms Glossary
A RAM image holds both active and recently closed sockets, the processes that owned them, and command server addresses, recovered through pool scanning rather than by asking the operating system.

How Do You Extract Network Connections From Memory?
Running netstat on a suspect host answers only one question: what is connected right now, according to an operating system the attacker may control. A memory image answers a better one. It contains the kernel’s own socket structures, including allocations belonging to connections that closed minutes earlier, and it cannot be filtered by a rootkit that is no longer executing.
This is frequently the fastest route to an external indicator. One command server address recovered from one infected host becomes a hunting query across firewall, proxy, and DNS logs for the entire estate.
On Windows, the TCP/IP stack keeps connection state in pool memory allocated by tcpip.sys. Active connections appear as _TCP_ENDPOINT structures, listening sockets as _TCP_LISTENER, and datagram sockets as _UDP_ENDPOINT. Each carries the local and remote address and port, the owning process identifier, and in many builds a creation timestamp.
When a connection closes, the allocation is freed but not immediately overwritten. Scanning the pool for the structure signature therefore recovers connections the live system would no longer report, which is the practical difference between the two main Volatility plugins:
windows.netstat follows the kernel’s linked lists and returns the current, consistent view.windows.netscan scans the whole image for structure signatures and returns both current and residual entries, at the cost of occasional false positives from reused memory.Run both. An entry that netscan finds and netstat does not is either historical or deliberately hidden, and both possibilities are interesting.
python vol.py -f memdump.raw windows.netscan
python vol.py -f memdump.raw windows.netstat
python vol.py -f memdump.raw windows.pslist --pid 4812
python vol.py -f memdump.raw windows.cmdline --pid 4812
The pivot matters more than the list. Take every remote address that does not belong to your own ranges or to a recognised service, map it back to the owning process, then confirm what that process is with windows.cmdline, windows.dlllist, and windows.malfind. A connection owned by svchost.exe is unremarkable until the command line shows it was launched without a service argument.
Several other sources in the same image carry network evidence:
bulk_extractor across the whole image, surfaces them quickly.dnscache service hosted in svchost.exe, so names resolved recently can be recovered even when the connection itself is gone.\Device\NamedPipe reveals pipe names that often match published tooling signatures.Three caveats decide whether a finding survives scrutiny. First, residual structures carry no reliable end time, so memory tells you a connection existed, not when it stopped; corroborate against firewall or network forensics records. Second, process identifiers are reused, so a freed socket may point at a process identifier now held by something entirely innocent; always check the process creation time. Third, netscan false positives are real, and an address with an implausible structure should be treated as noise unless something else supports it.
The strongest finding is one that appears in three places: a socket in memory, a matching flow in the firewall log, and a resolution in DNS telemetry with a consistent timeline. At that point you have an indicator you can hunt with across the estate, which is how a single compromised laptop turns into an accurate scope for the whole Investigation and Incident Response engagement.
Because it shows only current state and depends on the compromised operating system to report honestly. A rootkit or a hooked API can hide specific connections, and anything that closed before you arrived is already invisible. Memory analysis reads the kernel structures directly from an image, recovering closed sockets and entries that a live tool would never display.
The netstat plugin walks the kernel’s own tracking structures and returns a consistent current view. The netscan plugin searches the entire image for the memory signatures of socket objects, which also recovers freed allocations from connections that have already closed. Netscan finds more and occasionally reports false positives, so investigators normally run both and compare the output.
Often yes. The socket allocation may remain in freed pool memory, the hostname may persist in the DNS resolver cache, and the address may still appear as a string in heap memory belonging to the process or to a browser. Implant configuration blocks are especially useful because they list the full set of servers rather than the single one last contacted.
Only partially. Many Windows builds record a creation time in the endpoint structure, which gives you a start point for connections still present. Closed connections recovered by pool scanning carry no dependable end time at all. Any timing claim should be supported by firewall, proxy, or DNS logging rather than resting on the memory image alone.
You May Be Interested In These
We use a few cookies that are needed to make this website work, and they are always on. We would also like to set analytics cookies, to see which pages are useful; functional cookies, so that our live chat works; and advertising cookies, to measure our campaigns. We will not set any of those until you say yes, and you can change your mind at any time from the Cookie Settings link in the footer.
Choose the cookies you are happy for us to use. Strictly necessary cookies are always on; everything else is off until you turn it on.
These cookies keep the website working: they hold your security checks, your form submissions and the choice you make here. The site cannot run without them, so they are always on.
These let our live chat open and remember your conversation, and let the newsletter sign-up work. Switch them off and the chat window will not appear.
These tell us which pages are read and how people find us, so that we can improve the site. The reports are about groups of visitors, never about you personally.
These let us measure our advertising and show you our adverts on other websites, such as LinkedIn, Google and Meta. Switch them off and you will still see adverts, but they will be less relevant.