Live systems and the order of volatility

Unit 2 of 5 in Digital forensics basics.

You will be able to collect the most perishable evidence first and weigh the cost of stopping, isolating or leaving a system running.

Lesson

What disappears first

RFC 3227 gives an example order of volatility for a typical system, from most to least: registers and cache; the routing table, ARP cache, process table, kernel statistics and memory; temporary file systems; disk; remote logging and monitoring data relevant to the system; physical configuration and network topology; and archival media. It says to proceed from the volatile to the less volatile.

SP 800-86 puts it as a prioritization factor: volatile data is lost when a computer is powered down or with the passage of time, and in many cases acquiring it should take priority over non-volatile data. It adds that non-volatile data can also be dynamic, such as log files overwritten as new events arrive.

A practical order for a running machine

SP 800-86 gives a recommended order for volatile operating system data, first to last: network connections, login sessions, contents of memory, running processes, open files, network configuration and operating system time. Connections and logins come first because connections can time out or be dropped and the list of connected users changes, while the network configuration changes least and can wait.

The two orders differ in detail because one is a general ranking and the other a working list for one type of data, but they agree on the rule: collect what changes fastest first. The guide also says to collect as much volatile data as possible when in doubt, and decide later what to examine, and suggests an automated script on a read-only toolkit for consistency.

The labs on this site practice the same habit on your own machine: read-only commands, every output recorded, a baseline in your head so odd things stand out. Each command only reads, because every action on a live machine changes it a little.

Things that destroy evidence

RFC 3227's list of things to avoid applies to anyone: do not shut down until collection is complete, because much evidence is lost and an attacker may have set shutdown scripts to destroy evidence; do not trust the programs on the system, so run evidence tools from protected media; do not run programs that change the access times of all files; and be careful about unplugging the network, because disconnecting or filtering the machine may trigger dead-man switches that wipe evidence when the machine goes offline. It also says a rootkit may mean your tools do not give a full picture.

SP 800-86 says volatile data can be collected only from a live system that has not been rebooted or shut down since the event, that every action on the system will almost certainly alter it, and so the analyst should decide as quickly as possible whether to preserve volatile data, ideally by criteria written in advance. It says powering off the system or even disconnecting it from a network can eliminate the chance to collect important information, and gives the example that memory may hold password hashes.

Containment versus evidence

SP 800-86 treats this as a real tension. Isolating systems may be needed to prevent further damage or to preserve evidence, and the analyst should work with the incident response team to choose a containment step, such as disconnecting cables, unplugging power, raising physical security or shutting down gracefully, based on policy and on the risk the incident poses, while preserving evidence where possible. It also reminds the organization to consider in advance what each strategy costs it operationally, since taking a critical system offline to image it can cause large losses.

There is no single right answer. A worm spreading across a hospital network calls for faster containment than a quiet data theft on one server. The Incident Room scenario puts you in that decision and scores the trade.

The same questions in the cloud

In a cloud account the volatile layer may be different but the questions are the same. AWS's documentation says that when you stop an instance, data on any instance store volumes is erased, and that terminating an instance is permanent and irreversible: attached EBS volumes configured to be deleted on termination are permanently deleted and cannot be recovered, and instance store data is permanently lost. It also notes you can hibernate an instance to save the contents of memory.

So stopping or terminating a compromised instance can destroy the very evidence you wanted. The lab builds a small simulator that scores four made-up instance states against the actions stop, terminate and several ways of isolating, using rules taken from AWS documents, and shows that the right choice depends on what is attached to the instance. The lab is an exercise on synthetic data, not a procedure for a real account; real cloud forensics should follow your organization's runbook and the provider's current guidance.

Key points

Sources

Practice in the labs

Learn the order, triage a live Linux host read-only, then decide what to do about a compromised cloud instance on synthetic data. The Linux labs use a machine or VM you own.

Also try, in the simulators

Knowledge check

  1. Which should be collected first on a running machine, according to SP 800-86's recommended order? Answer: Network connections and login sessions. SP 800-86 lists network connections, then login sessions, then memory, processes, open files, network configuration and operating system time, because the first ones change or expire fastest.
  2. Why does RFC 3227 warn that disconnecting a machine from the network can be harmful? Answer: It may trigger dead-man switches that wipe evidence when the machine goes offline. RFC 3227 says simply disconnecting or filtering from the network may trigger dead-man switches that detect when the machine is off the net and wipe evidence.
  3. You terminate an EC2 instance whose volumes are set to delete on termination. What does AWS say happens to those volumes? Answer: They are permanently deleted and cannot be recovered. AWS's page says terminating is permanent and irreversible, and attached EBS volumes configured to be deleted on termination are permanently deleted and cannot be recovered.
  4. Why do analysts run their evidence tools from protected, read-only media? Answer: The programs on the compromised system cannot be trusted and may report false information. RFC 3227 says not to trust the programs on the system, and SP 800-86 warns that a rootkit may return false information. Trusted tools from protected media reduce that risk.

Back to the syllabus or see all classes.

Related