Dev.to Security πŸ” Cybersecurity πŸ‘ 0 πŸ“– 2 min read

Capture RAM first: the order of operations on a suspect host

Picture an analyst whose EDR just flagged a signed binary spawning PowerShell. They pull the binary from disk and compare the hash with the vendor's copy. It matches. Every file they check looks fine, and the host gets p

Picture an analyst whose EDR just flagged a signed binary spawning PowerShell. They pull the binary from disk and compare the hash with the vendor's copy. It matches. Every file they check looks fine, and the host gets powered off "to be safe". The case ends there, because the evidence was in memory and memory is gone.

This is a scenario, but the mistake is common enough that RFC 3227 exists partly to prevent it. It ranks evidence by how fast it disappears. Registers and cache go first, then the routing and ARP tables, process list and RAM, then temporary files, then disk. You collect in that order.

What lives only in memory

The process list as it actually is right now. Open network connections and the processes that own them. Code injected into a legitimate process. Decrypted copies of data that is encrypted on disk. A shutdown removes all of it, and a reboot is no better.

The order to use

1. Record the network state. On Windows run netstat -ano. On Linux run ss -tupan. Save the output to external media. This takes seconds and the connections may not be there in an hour.

2. Capture RAM. WinPmem handles Windows and LiME handles Linux. Write the image to a drive you brought, not to the suspect disk, which would overwrite evidence you have not collected yet.

3. Hash and label. Get-FileHash on Windows or sha256sum on Linux, then note the hash, the time and the hostname.

4. Image the disk. Now the machine can be powered down or isolated.

Every step above alters the system a little. Keep a plain text log of each command and its timestamp. When someone asks why a process started at 14:02, you can show it was your capture tool.

A first look at the image

With Volatility 3, two plugins give you most of a first pass:

vol -f mem.raw windows.pslist
vol -f mem.raw windows.malfind

pslist gives you the process tree to compare against what should be running. malfind lists memory regions that are executable but not backed by a file on disk, which is how injected code tends to appear.

Practise before you need it

The free memory forensics lab on Codelivly builds a case where the disk analysis finds only signed executables with matching hashes, and the answer is in memory. The memory dump CTF is a smaller warm-up using strings and pattern hunting.

When you want the whole workflow, the Digital Forensics Playbook runs 259 pages across 47 chapters, with 30+ labs and 8 challenge investigations covering DFIR, memory forensics and reporting. The Resources shop is also running a Black Friday sale on selected books and bundles, up to 70% off, ending 29 Nov 2026.

πŸ“° Read the original article on Dev.to Security

Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.