In this section

0.5 Order of Volatility on a Live Endpoint

Module 0

Introduction

A running host holds evidence that exists nowhere else: which programs are running and from where, who they are talking to, what they have loaded, and sometimes the only remaining copy of the program itself.

All of it disappears when the machine stops, and machines stop for reasons that have nothing to do with the investigation: an owner who wants the service back, a patch window, a crash, or an intruder who notices.

Order of volatility is the discipline of collecting the short-lived evidence first. This lesson sets out the order, then plays it out on the lab machine, where a listener has been started from a binary that was deleted straight afterwards, as an intruder's tool often is.

The demonstration collects what Velociraptor can see while it runs, recovers the deleted binary, and then stops the process to show what a reboot leaves. Module 5 builds a full single-endpoint collection on this ground; here the aim is to know what to take first, and why.

1

Evidence That Expires

The order of volatility

The order most practitioners work to was written down in 2002, in RFC 3227, the guidelines for evidence collection and archiving. Its list runs from registers and cache, through the routing table, ARP cache, process table, kernel statistics and memory, to temporary file systems, disk, remote logging and monitoring data, physical configuration and network topology, and archival media.

The principle behind it is simple: collect the evidence that will change soonest before the evidence that will wait.

registers, cachegone in nanosecondsprocess table, network, memorygone at shutdowntemporary file systemsoften gone at bootdiskuntil overwrittenremote loggingoutlives the hostarchival mediayearscollect top to bottom

RFC 3227's order of volatility, each bar as long as the evidence tends to last. Velociraptor works on the second rung down: everything above it needs other tools, and everything below it will wait.

The list was written for a responder at a keyboard, and it maps onto Velociraptor almost directly. Registers and cache belong to memory forensics and specialist tools. The second rung is where a live response client lives: processes, network connections and memory are exactly what Velociraptor's live artifacts read. Temporary file systems and the disk follow, and remote logs belong to whatever system collected them.

OrderAn order of volatility for a live endpoint
1. Running stateProcesses, network connections, logged-on users, loaded modules
2. MemoryA process's memory or the whole of it, when the question needs it
3. Temporary file systems/tmp, /dev/shm and their equivalents, often cleared at boot
4. DiskFiles, logs and the artifacts built from them
5. ElsewhereCentral logs and monitoring, which outlive the host
Each line outlives the one above it

The same RFC is blunt about two things that matter as much as the order. It says not to shut the system down until collection is done, because an attacker may have altered the startup scripts to destroy evidence, and it warns that disconnecting from the network can trigger a deadman switch that wipes data.

Both are reasons why a running host is handled with a collection plan rather than an instinct to pull the plug.

Windows hosts add rungs of their own to the second step. Alongside processes and sockets, a live Windows machine holds open handles, loaded drivers, the services that are running rather than configured, and the logon sessions behind them, all of which change or vanish at shutdown. The categories are the same on every platform: what runs, what it holds, and who it runs as.

The order is a guide to timing, not a ranking of importance. A disk artifact may decide the case; it is simply willing to wait for the process list.

2

What Is Only True While It Runs

A program whose file is gone

On the lab machine, a program was started from /tmp/.cache/kworkerd, a name chosen to blend in with the kernel's own worker threads, and the file was deleted a second later. On Linux, deleting a running program's file removes its name from the directory but not the program from memory, and the process keeps running from the copy the kernel already holds. The process list shows exactly that:

VQL1 row
SELECT Pid, Ppid, Name, Exe, Deleted, Hash
FROM Artifact.Linux.Sys.Pslist()
WHERE Name = 'kworkerd'
PidPpidNameExeDeletedHash
29832967kworkerd/tmp/.cache/kworkerd (deleted)Truenull
Exe ends in (deleted) and Hash is null: the program is running, and its file is gone.

The process list on the lab machine: one process named like a kernel worker, running from /tmp.

Two columns tell the story. Exe is the path the program was started from, and the kernel marks it (deleted) because the file is gone; the artifact turns that into Deleted: true. Hash is empty, because the artifact hashes the file at the Exe path and there is no longer a file there.

The definition of Linux.Sys.Pslist, read from the binary in lesson 0.1, shows both columns being computed in exactly that way.

At the same moment, the folder the program came from was read from disk:

VQL0 rows
SELECT OSPath.String AS Path, Size
FROM glob(globs='/tmp/.cache/*')
PathSize
No rows
Nothing: an image of this disk would hold no trace of the program's file.

The folder the program ran from, read from disk at the same moment.

It is empty. An image of this disk taken now would hold no file called kworkerd, and the process list is the only place the program is visible at all. That is the defining property of volatile evidence: it describes the machine as it is now, and the disk does not record it.

The name is a test of its own. Genuine kernel worker threads on Linux appear in process listings in square brackets, as [kworker/0:1] and the like, and they have no executable on disk because they are part of the kernel.

A process called kworkerd with an Exe path in /tmp is a user-space program borrowing the look of one. The Exe column, the parent process ID and the command line separate the two in a single row, which is why the first pass takes all of them rather than names alone.

A deleted executable that is still running is one of the more useful findings live response produces, because legitimate software rarely does it. Installers replace files, and package managers can leave a process running from a library that has since been upgraded, but a program running from a deleted file in a temporary folder, under a borrowed name, is worth explaining before anything else.

3

Who It Is Talking To

Sockets and the processes behind them

The process list says what runs; the network table says what it is waiting for. Linux.Network.Netstat reads the kernel's socket tables under /proc/net and joins each socket to the process that owns it, so a listening port comes with a process ID and a command name:

VQL1 row
SELECT LocalAddr, LocalPort, State,
       ProcessInfo.Pid AS Pid, ProcessInfo.Command AS Command
FROM Artifact.Linux.Network.Netstat(source='TCP4')
WHERE LocalPort = 4444
LocalAddrLocalPortStatePidCommand
0.0.0.04444Listening2983kworkerd

The same process, holding a listening socket on every interface.

The program is listening on port 4444 on every interface, which means anything that can reach the server on that port can talk to it. The process ID is the one from the process list, which ties the two rows to one program. Without the join, a listening port is a number; with it, it is a claim about a specific binary that can be checked.

The address matters as much as the port. A listener on 127.0.0.1 accepts connections only from the machine itself, while one on 0.0.0.0 accepts them from any network the host is attached to; the first is often a local service, the second is something the outside world can reach. Established connections carry a remote address too, which is the pivot to firewall, proxy and flow logs elsewhere in the estate.

Socket state is about as volatile as evidence gets. A connection that was established a minute ago may already be closed, and a listener disappears the moment its process stops. Network collection is therefore taken in the same pass as the process list, not after a pause to read it, because the rows only make sense together and only exist together.

FieldsReading one socket row
LocalAddr 0.0.0.0Listening on every interface, not just loopback
LocalPort 4444The port anything outside would connect to
State ListeningWaiting for a connection, not in one yet
PidThe process that owns the socket, joined from /proc

On a Windows host the equivalent artifact is Windows.Network.Netstat, and the same rule holds: collect the sockets while the processes that own them are still there to be joined to.

4

The Binary That Is Not on Disk

Recovering it through /proc

The program's file is gone from the directory, but its bytes are not gone from the machine. The process's memory map still lists the file, deleted or not, because the kernel keeps the mapping for as long as the process runs:

VQL1 row
SELECT Pid, Filename
FROM Artifact.Linux.Sys.Maps(processRegex='kworkerd')
WHERE Filename =~ 'kworkerd'
GROUP BY Filename
PidFilename
2983/tmp/.cache/kworkerd

The process's memory map: the deleted file is still mapped into it.

On Linux, /proc/PID/exe is a link to the running program's executable, and it stays readable after the file is deleted. Reading through it recovers the binary while the process lives. The artifact did not do this, as the empty Hash showed, so the recovery is a step of its own, here run in a shell on the lab machine:

$ ls -l /proc/2983/exe
lrwxrwxrwx 1 root root 0 Dec  2 18:49 /proc/2983/exe -> /tmp/.cache/kworkerd (deleted)
$ sha256sum /proc/2983/exe /usr/bin/nc
2a6fac3d98e090468962ef18003cb8b89fbffa7219917ca12567d5e42b156948  /proc/2983/exe
2a6fac3d98e090468962ef18003cb8b89fbffa7219917ca12567d5e42b156948  /usr/bin/nc
$ cp /proc/2983/exe kworkerd.recovered && file kworkerd.recovered | cut -c1-90
kworkerd.recovered: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically l

The link points at the deleted path, the hash through /proc matches the hash of the original program the lab copied, and the recovered copy is a complete ELF executable that can be analyzed at leisure.

In a real investigation the same commands run remotely through Velociraptor, with the shell artifact from lesson 0.2 or with an upload of the /proc path, and the copy and its hash go into the case record.

The hash is what turns a recovered file into something others can use. Matched against the original, it proves the copy is complete; searched across the estate, it finds the same program on other hosts, under the same name or another; and shared with threat intelligence colleagues, it is the identifier every malware repository and vendor report uses. A recovery without a hash is a file of uncertain provenance.

This is the step most often lost to a reboot. The process list, the socket and the map are all useful, but they describe the program; the recovered file is the program, and it is the thing malware analysts, detection engineers and threat intelligence colleagues will ask for next. A deleted binary that was not recovered before the machine stopped is, in most cases, gone for good.

5

After the Reboot

What stopping the process erases

To see what a reboot leaves, the lab stopped the process, as a shutdown would, and asked the same questions again:

VQL0 rows
SELECT Pid, Name, Exe FROM Artifact.Linux.Sys.Pslist()
WHERE Name = 'kworkerd'
PidNameExe
No rows

The process list after the process was stopped, as a reboot would stop it.

The network table was read at the same moment, for the same port:

VQL0 rows
SELECT LocalPort, State FROM Artifact.Linux.Network.Netstat(source='TCP4')
WHERE LocalPort = 4444
LocalPortState
No rows

The listening socket, at the same moment.

Both are empty. The process, its socket and the readable link in /proc are gone, and the file in /tmp/.cache was already gone. Everything that identified the program on this machine, and the only copy of the program itself, existed on one side of the stop and not the other.

While it runsAfter a rebootrebootProcess kworkerdrunninggoneSocket 0.0.0.0:4444listeninggone/proc/PID/exereadablegone/tmp/.cache/kworkerdalready deleteddeletedThe cron entry or timeron diskon disk

The demonstration in one picture. Three of the five pieces of evidence exist only on the left of the line, and none of the three is on the disk.

The bottom row of the figure is the reason reboots are not the end of an investigation. Whatever started the program, a cron entry or a timer like the ones lesson 0.3 found, or a service, or a shell profile, lives on disk and survives the reboot, and it may start the program again from a copy kept somewhere else.

A collection that recorded the running state before the reboot can be compared with one taken after it, and a program that returns under the same name or the same port is a finding of its own.

A reboot is sometimes the right call: the owner may need the service back, or the risk of leaving a compromised host running may outweigh the evidence. The job of the order of volatility is to make that call cheap, by having the volatile collection done before anyone has to make it.

6

Collecting Changes the Host

The footprint of live response

Live response is not a passive act. Every collection runs code on the machine under investigation, and the machine records it. The lab machine's process list in lesson 0.1 contained the Velociraptor process itself, and a network collection taken after the client connected will show the client's connection to the server.

Reading files can change their access times, depending on the file system and how it is mounted, and the client writes its own working files to disk.

FootprintWhat a collection does to the host it examines
A processThe client, and every program an artifact starts
ReadsFile access times can move, depending on the file system and its mount options
WritesThe client's own temporary files and its writeback
NetworkA connection to the server, visible in the next network collection

The RFC's guidance applies directly. It advises against tools that change access times across the whole system and against trusting the system's own programs, and it asks for every step to be documented.

Velociraptor helps with the last of these on its own: every collection is a flow with a timestamp, the artifact it ran and the user who launched it, so the record of what the responder did is kept by the same system that collected the evidence.

The order in which collections run also shapes the footprint.

Running the process list before anything else means it records the machine with the fewest of the responder's own processes on it, and running the network table straight afterwards means the only new connection it shows is the client's own. Each later collection adds a little more of the responder to the machine, which is one more reason the volatile pass comes first.

The footprint argues for restraint rather than for doing nothing. Collect what the question needs, in the order of volatility, and record that the collection happened; do not run a broad file system sweep on a host where the process list has not yet been taken.

When the report says the client's process appeared in the process list, that is not contamination but documentation, provided it was expected and written down.

Record the clock as part of the first pass.

The RFC asks for clock drift to be noted, and the reason is practical: every timestamp in a live collection is the host's opinion of the time, and a host whose clock is minutes off will place its own events in the wrong order against the firewall, the identity provider and every other host. info() and the client's interrogation record the host's time and time zone.

The difference from a trusted clock is one line in the case notes.

There is one more effect worth naming. A careful intruder may watch for responders. A process that disappears when a new program starts on the machine, or a listener that closes when an unfamiliar connection arrives, is possible, and it is one more reason to take the volatile evidence first and quickly, in one pass rather than over an afternoon.

7

An Order for a Velociraptor Collection

Turning the principle into artifacts

The order of volatility becomes concrete as a list of artifacts and the sequence they are scheduled in. On a Linux host that may go down, the first pass is the running state, then whatever the running state says needs recovering, and only then the disk:

PlanA first collection on a host that may go down
Linux.Sys.PslistWhat runs, from where, and whether its file still exists
Linux.Network.NetstatWho it is listening for and talking to
Linux.Sys.MapsWhat each process has mapped, deleted files included
Linux.Sys.UsersAccounts, for the logons that the process list implies
ThenMemory if the question needs it, then files and logs
Windows equivalentsWindows.System.Pslist, Windows.Network.Netstat

Two refinements turn the list into practice. First, read the first pass before scheduling the second: the process list is what tells you that a binary needs recovering from /proc, or that a process's memory is worth taking with Linux.Triage.ProcessMemory.

A responder who schedules everything at once loses the chance to act on what the first artifacts show. Second, give the first pass a deadline of minutes, not hours, because the conditions that make volatile evidence valuable are the same ones that make it disappear.

On Windows the first pass has the same shape with different names: Windows.System.Pslist and Windows.Network.Netstat for running state, then whatever those rows point to. A process whose image is missing, an unsigned binary in a user's temporary folder, or a listener owned by a process with no obvious business listening are the findings that decide the second pass, just as the deleted kworkerd decided it here.

Memory deserves its own decision. A full memory image is the richest volatile evidence there is and also the largest and slowest collection, and on a busy server it competes with the workload for minutes.

Velociraptor can take one, and it can take a single process's memory, which is often all the question needs. Which to take is a judgment about the question, the host and the time available, and Module 5 works through it.

The disk comes last because it waits, not because it matters less. Logs, persistence entries, browser artifacts and file system metadata are the evidence most investigations are decided on, and they will still be there after the reboot that would have destroyed the process list.

8

Asking an Assistant

Getting an order for this host, not a textbook

Asked in general what to collect first, an assistant recited the order of volatility, which is correct and not enough. It also suggested a full file system triage as covering most of what is needed, which for this host would have spent the time before the reboot on the one rung that would survive it.

Before the rebootCaptured: Claude Opus 5.5, 2 December 2026
  1. You

    What should I collect first on a compromised Linux server with Velociraptor?

  2. Assistant

    Follow the order of volatility: memory first, then running processes and network connections, then temporary files, then the disk. A full triage collection of the file system covers most of what you need.

  3. You

    A Linux server is still running and the owner wants to reboot it within the hour. Velociraptor 0.77.4 shows a process named kworkerd running from /tmp/.cache with Exe ending in (deleted) and an empty Hash, listening on port 4444. Which Velociraptor collections should I run before the reboot, in what order, how do I get the deleted binary and its hash, and what will be gone after the reboot?

  4. Assistant

    Run Linux.Sys.Pslist and Linux.Network.Netstat now, then Linux.Sys.Maps for kworkerd. The Hash column is empty because the artifact hashes the Exe path, which no longer exists; the binary is still readable through /proc/PID/exe while the process runs. Copy it from there and hash the copy, for example with Linux.Sys.BashShell or an upload. After the reboot the process, its socket, its memory and the only copy of the binary are gone; the cron or timer that may restart it, and the logs, stay on disk.

  5. Velociraptor
    $ ls -l /proc/2983/exe
    lrwxrwxrwx 1 root root 0 Dec  2 18:49 /proc/2983/exe -> /tmp/.cache/kworkerd (deleted)
    $ sha256sum /proc/2983/exe /usr/bin/nc
    2a6fac3d98e090468962ef18003cb8b89fbffa7219917ca12567d5e42b156948  /proc/2983/exe
    2a6fac3d98e090468962ef18003cb8b89fbffa7219917ca12567d5e42b156948  /usr/bin/nc
    $ cp /proc/2983/exe kworkerd.recovered && file kworkerd.recovered | cut -c1-90
    kworkerd.recovered: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically l

The second prompt described the host as it was: the deadline, the deleted Exe, the empty Hash and the listening port. The reply put the volatile artifacts first, explained why the Hash was empty, pointed at /proc for the binary and listed what the reboot would take, which is the list a report needs.

PromptThe prompt that describes the host and the deadline
A Linux server is still running and the owner wants to reboot it within the hour. Velociraptor 0.77.4 shows a process named kworkerd running from /tmp/.cache with Exe ending in (deleted) and an empty Hash, listening on port 4444. Which Velociraptor collections should I run before the reboot, in what order, how do I get the deleted binary and its hash, and what will be gone after the reboot?
  1. wants to reboot it within the hourstates the deadline, which is what volatility is about
  2. Exe ending in (deleted) and an empty Hashquotes what the artifact showed, so the answer deals with it
  3. listening on port 4444gives the second volatile fact the order has to protect
  4. in what orderasks for a sequence, not a list
  5. how do I get the deleted binary and its hashnames the evidence a reboot will destroy
  6. what will be gone after the rebootasks for the loss to be stated, for the report

The assistant saved time on the explanation of the empty Hash and on knowing that /proc keeps a deleted executable readable. The steering it needed was information it could not have had: what the host actually showed and how long there was.

What the record rests on
  1. HoldsThe program ran from a deleted fileExe /tmp/.cache/kworkerd (deleted), Deleted true, PID 2983
  2. HoldsIt listened on port 4444Linux.Network.Netstat: 0.0.0.0:4444, Listening, same PID
  3. HoldsThe binary was recovered intactsha256 of /proc/2983/exe matches the copy saved, 2a6fac3d98e09046...
  4. FailsThe disk alone would have shown itglob of /tmp/.cache returned nothing while it ran
DecisionCollect running state and the binary before the reboot; record that nothing on disk would have shown either.

The last line of that check is the one to keep. A finding about a program that existed only in memory has to say so, because the next person to examine the disk will find nothing and wonder whether the finding was real.

Do

Practice

What has to be collected before the reboot?
your own Velociraptor

The scenario holds what Velociraptor collected from a Linux server whose owner wants it rebooted within the hour, and the recovery commands run on it. Decide what the reboot will destroy and what to do first.

Then reproduce it on a Linux virtual machine of your own, never on a production host. Copy a harmless binary such as sleep to /tmp/.cache/, start it with a long duration, and delete the file. Collect Linux.Sys.Pslist from your instant-mode server and find the row with Deleted true and an empty Hash. Recover the binary through /proc/PID/exe, compare its hash with the original, then stop the process and collect again.

Volatile evidence describes the host as it is now and disappears when it stops: processes, sockets, memory and, for a program whose file was deleted, the program itself. Collect running state first, recover what it points to, and leave the disk for last because it will wait. Lesson 0.6 turns to the host that has no client at all, and how evidence is collected from it.

Resources

Velociraptor changes quickly; where its documentation and this lesson disagree, the documentation is newer.

Stuck? Spotted an error?