Contain and keep the evidence
Unit 3 of 5 in Incident response.
You will be able to contain an incident while preserving evidence, using the order of volatility and a chain of custody.
Lesson
Containment limits damage
CSF 2.0 says the Respond function supports the ability to contain the effects of incidents, with outcomes covering incident management, analysis, mitigation, reporting and communication. Containment means stopping the incident from spreading or causing more harm: isolating a machine, disabling an account, blocking an address.
Containment is a trade. Cutting a system off stops harm but may stop the business and may tip off the attacker. Decide who has authority to make that trade, which your preparation should already have settled.
Evidence is fragile
RFC 3227 is the classic short guide to collecting evidence. It tells collectors to proceed from the most volatile to the least volatile, and gives an example order for a typical system: registers and cache; routing table, ARP cache, process table, kernel statistics and memory; temporary file systems; disk; remote logging and monitoring data; physical configuration and network topology; and archival media.
The reason is that the most volatile data disappears first. Memory is gone at shutdown; a disk survives a reboot, though the reboot may change it.
Things to avoid
The RFC lists ways to destroy evidence without meaning to. Do not shut down until evidence collection is complete, because much evidence may be lost and the attacker may have altered startup and shutdown scripts to destroy it. Do not trust the programs on the system; run evidence-gathering tools from protected media. Do not run programs that modify the access time of all files, such as archiving tools. And note that simply disconnecting a machine from the network may trigger 'deadman switches' that detect they are off the net and wipe evidence.
These warnings pull against the urge to contain quickly. Good teams decide the order in advance: capture what is volatile, then isolate.
Chain of custody
If evidence may be needed later for an investigation or a court, you must be able to describe how it was found, how it was handled and everything that happened to it. RFC 3227 lists what to document: where, when and by whom evidence was discovered and collected; where, when and by whom it was handled or examined; who had custody and during what period and how it was stored; and when and how custody changed.
It also advises that access to archived evidence be extremely restricted and clearly documented, and that unauthorized access be detectable. Respect privacy and legal rules when collecting, and ask for guidance before collecting anything that belongs to other people.
Key points
- Containment stops spread and harm; it trades against business disruption and surprise.
- Collect evidence from the most volatile to the least volatile.
- Do not shut down early, trust the system's own tools or run tools that rewrite file times.
- Document custody: who found it, who handled it, where it was kept, how it moved.
Sources
Lecture
The first hour of a forensic investigation: A talk on what to do, in order, in the first hour of an investigation.
Practice in the labs
Practise the order of evidence collection and image a disk the safe way.
- 10-minute drill: pick the evidence collection order on a live box: A ten-minute drill that makes you choose the order of collection on a live machine.
- Collect evidence in the right order (order of volatility): You see how fast each kind of evidence disappears on a real machine.
- Make a forensic image and prove it wasn't altered: You make a verified copy of a disk without changing the original.
Also try, in the simulators
- A worm on the ward network: first alert at a public-sector organisation (Incident Room scenario): You contain a worm on a hospital-style network and weigh disruption against spread.
Knowledge check
- Which evidence should be collected first on a running machine? Answer: The most volatile, such as memory and the process table. RFC 3227 says to proceed from the volatile to the less volatile, because volatile data is lost first.
- Why can unplugging a machine from the network destroy evidence? Answer: Some systems wipe evidence when they detect they are offline. RFC 3227 warns that disconnecting may trigger deadman switches that wipe evidence when they detect they are off the net.
- What does a chain of custody record? Answer: Who found, handled and held the evidence, where, when and how it moved. RFC 3227 lists where, when and by whom evidence was collected, handled and held, and how custody changed.
Back to the syllabus or see all classes.