Memory and operating system artifacts
Unit 4 of 5 in Digital forensics basics.
You will be able to read what a memory image and common operating system records show, and say how far each can be trusted.
Lesson
Why memory is worth capturing
SP 800-86 says operating systems run in RAM, whose contents change constantly, and that RAM often holds recently used data such as data files, password hashes and recent commands. Like a disk, memory also holds residual data in slack and free space: pages released by one program may still contain what it left. The guide says volatile data can be collected only from a live system that has not been rebooted, and that the contents of memory come third in its collection order, after network connections and login sessions.
It also says collecting from a running machine carries risk: files may change, and a malicious party might have installed rootkits designed to return false information. A memory image is a snapshot you can study without touching the live machine again, which is one reason people capture it first and analyze it later.
How to capture memory depends on the operating system and the tool, and this class does not teach a capture tool. The labs analyze an image you capture from your own machine or virtual machine, or a documented public sample, and say which you are using.
Reading a memory image
The Volatility 3 documentation explains that memory analysis splits into memory layers, templates and objects, and symbol tables, all held in a context. A layer is data that can be accessed by address. Because processors use paged memory, a program's virtual addresses map to physical addresses, and each process usually has its own map, so the tool has to find the maps first. Symbol tables describe the structure of the operating system's internal data so that the tool can interpret raw bytes.
In practice you start by identifying the image, then ask the same question several ways. The listing of running processes, a scan for process structures and the process tree can disagree, and the lab teaches why the disagreement is informative: a process that appears in a scan but not in the linked list may have been hidden, or may simply have exited, and the exit-time column tells you which. Check that system process names have the right parent and path, read a chain of processes as a story, and corroborate with network connections and command lines before you conclude anything.
What the operating system leaves behind
Operating systems keep records for their own reasons that happen to be evidence. On Linux, the utmp(5) manual page says the utmp file lets you discover who is currently using the system, and warns that not every program uses utmp logging and that the file must not be writable by other users because system programs depend on its integrity. The last(1) manual page says last looks through the wtmp file, which records logins and logouts, and prints connect times, most recent first. The Linux lab combines these login records, shell history and the text authentication log to rebuild an intrusion on a virtual machine you stage yourself, then cross-checks them so that one wiped artifact does not blind you.
On Windows, the prefetch lab has you generate your own ground truth by running known programs a known number of times, then parse the prefetch files with a free tool, PECmd (the name stands for Prefetch Explorer Command Line), and compare the numbers. The lab, not a vendor document, explains what prefetch is and what it can and cannot prove, and it ends with the honest negative: prefetch cannot tell you everything. The browser lab does the same for browser history: find the profile, copy it, read the database and decode the timestamps.
The rule behind all of these: an artifact is a clue about what a program or person did, not a verdict. Different artifacts record different things, last for different times and can be cleared or forged.
Time you can trust, and absence of evidence
SP 800-86 lists three reasons file times can be wrong: the computer's clock was never synchronized with a good time source, the time may not be recorded to the detail you expected, and an attacker may have altered it. It adds that when file times matter, bit stream imaging should be used to collect, because some copy methods change creation times.
That is why the strongest forensic claims rest on agreement between independent sources, and why an empty log is weak evidence. Absence of evidence is not evidence of absence: logs rotate, history is lost when a shell is killed, and attackers delete records. Write down what you checked and what you could not check.
Key points
- Memory holds recent commands, hashes and process state; capture it before power-down, analyze it later.
- Ask several questions of an image (list, scan, tree) and treat disagreement as a clue.
- OS records such as login files, history files and prefetch are clues, not verdicts.
- File times can be wrong or altered; cross-check with independent sources.
- An empty log is weak evidence; record what you could not check.
Sources
- NIST SP 800-86: Guide to Integrating Forensic Techniques into Incident Response (2006)
- Volatility 3 documentation: Volatility 3 Basics
- Linux manual page: utmp(5)
- Linux manual page: last(1)
- PECmd project page on GitHub (Prefetch Explorer Command Line)
Practice in the labs
Read a memory image you captured or a documented sample, learn to read process tables, then reconstruct activity from Windows prefetch, Linux login records and browser history on your own machine.
- Analyze a memory image with Volatility 3: You identify an image you are allowed to analyze and run process, network connection and command line plugins in Volatility 3.
- Read Volatility process output: spot hidden, masquerading, and injected processes: A desk exercise on embedded output: find the hidden, the masquerading and the injected process by reading process lists and trees.
- Prove a program ran with Windows Prefetch: You run known programs a known number of times, parse the prefetch files and match the numbers, then read what prefetch cannot show.
- Reconstruct a Linux intrusion from login records and shell history: You stage an incident on your own virtual machine and rebuild it from login records, shell history and the auth log.
- Examine browser artifacts (on your own profile): You copy your own browser profile, read its databases and decode the timestamps.
Knowledge check
- Why might a memory image hold evidence a disk image does not? Answer: RAM holds recent commands, password hashes and running state that vanish at power-down. SP 800-86 says RAM often holds recently used data such as files, password hashes and recent commands, and that volatile data can only be collected from a live system that has not been shut down.
- A process appears in a scan of memory but not in the normal process list. What should you check first? Answer: Its exit time, to tell a hidden process from one that has simply ended. The lab teaches that a scan finds process structures the list no longer shows. A terminated process also lingers there, so the exit-time column separates the merely ended from the possibly hidden.
- According to the last(1) manual page, which file does last read? Answer: wtmp, which records logins and logouts. The manual says last looks through the wtmp file, which records all logins and logouts, and prints connect times with the most recent first.
- Why is an empty log weak evidence that nothing happened? Answer: Logs can rotate, be cleared or never have been enabled, so absence is not proof. A record that is missing may be missing because it was never kept, was rotated away, or was deleted. The labs repeat this, and SP 800-86 warns that file times too can be altered.
Back to the syllabus or see all classes.
Related
- Digital forensics basics
- Analyze a memory image with Volatility 3
- Read Volatility process output: spot hidden, masquerading, and injected processes
- Prove a program ran with Windows Prefetch
- Reconstruct a Linux intrusion from login records and shell history
- Examine browser artifacts (on your own profile)
- All classes
- Free cyber labs