The Acquisition and Analysis of Random Access Memory: Pre-Publication
The Acquisition and Analysis of Random Access Memory: Pre-Publication
A short version of this work was presented at the Third Annual ifip WG
11.9 International Conference on Digital Forensics in Orlando, Florida on
Jan 28-31, 2007.
Pre-publication copy
INTRODUCTION
BACKGROUND
Techniques described here tend to follow a
more historical thought process regarding Depending on the situation, upon arriving on
forensic procedures: acquire first, then scene, a responder has two core choices: either
identify. This may cause some privacy interact with the system or pull the plug. On
concerns when contrasted with some more one side, it has been known for some time that
modern approaches to e-discovery1 where the normal user interaction is undesirable, even
pertinent information is located first and then performing a clean shutdown would destroy
only that information is acquired. This potential evidence by changing timestamps
distinction is also pertinent when considering and potentially overwriting information.
the classification of information. Following this train of thought, it was
Traditionally acquired data will need to be suggested that pulling the plug of a machine
classified at the highest classification level of will leave it in a more preserved state than
any information found on the system. powering it down gracefully [2] (albeit some
Theoretically, when using more selective subsystems, such as the file system, may not
methods of e-discovery, the acquisition could recover gracefully from abrupt removal of
be limited to only acquire data of a certain power). On the other side, while pulling the
classification level and thus not be subjected plug does preserve the current contents of the
to the high watermark. Both the historical and hard disk drive, it allows little or no insight
selective techniques have their benefits and into what operations the system was
drawbacks; such as completeness versus speed performing at the time when the power was
and storage advantages respectively. This text removed. In light of this lack of knowledge,
does not debate these techniques. others have provided incident response steps
to perform in order to gain insight about the
This article makes many hardware and state of the system [3 among others].
software assumptions. Intel i386 / IA-32
architecture is assumed, along with a standard When concerned with the contents of RAM,
4K page size. Only Microsoft Windows® neither choice is adequate. Simply, pulling
operating systems are discussed, and for the plug can clear the contents of RAM (in
systems that support memory related boot most cases), and performing many incident
switches such as /3G and /PAE it is assumed response actions overwrites potential evidence
that these switches are not being used2. in memory akin to creating new files on a
suspect hard disk drive. Two additional
Even though the concept of object-reuse and concepts need to be introduced into
related techniques for its mitigation have been acquisition and analysis stages in order to take
known for decades [1], many operating advantage of RAM contents: the acquisition of
systems use memory management techniques RAM, and the extraction of information from
that have little or no safeguards against this the RAM duplicate.
threat. A design decision to place a higher
precedence on performance than security is For some time now, varying abilities of
not uncommon. In the case of Random acquiring RAM contents have been available.
Access Memory (RAM), this design choice A popular open source LiveCD called Helix
can be exploited in order to both further has supported George Gartner’s dd tool in
preserve and gain deeper insight into the state combination with the windows
of a currently running machine. \\.\PhysicalMemory object since about 2004.
EP_exitTime 90 78 78 78 90
EP_PID(client 9c 84 84 84 9c Operating System
Unique)
EP_WorkSetSize e4 20c 20c 214 208 even 30 MB of text would translate to roughly
EP_WorkSetMin e8 210 210 1f8 1ec 8000 printed 8.5” x 11” sheets of paper.
EP_WorkSetMax ec 214 214 1fc 1f0
EP_AccessToken 12c c8 c8 c8 e0 A strings analysis will not be able to lend
EP_PPID 1c8 14c 14c 128 124
much insight about RAM specific structures
EP_name 1fc 174 174 154 154
EP_size 290 258 260 278 268 such as processes. Instead, a search for
TH_size 248 258 258 260 278 known patterns must be performed along with
TH_createTime 1b0 1c0 1c0 1c8 1d0 a validation process for potential structures.
TH_exitTime 1b8 1c8 1c8 1d0 1d8 The signature of a process can be defined by
TH_exitStatus 1c0 1d0 1d0 1d8 1e0 inspecting known offsets (as obtained from
TH_PID (client 1e0 1ec 1ec 1f4 1fc calibration) for expected data. For example,
unique)
TH_TID (client 1e4 1f0 1f0 1f8 200
the offset related to process priority must be
unique) non-zero for all processes except the idle
TH_isTerminated 224 248 248 250 250 process, the offset related to the Page
TH_startAddr 230 224 224 22c 234 Directory Base (PDB) must be non-zero (a
process must have a PDB) and the PDB must
EP denotes the Windows EProcess structure, TH be on a page boundary (normally 4K), all the
denotes EThread. All values are base 16 (hex).
*Quantum related values for Vista do not fit the pattern threads of a process must exist inside of the
of prior OSes, and need to be researched further. section of RAM dedicated to kernel memory,
Values obtained via LiveKD and the Windows kernel etc.
debugger by issuing: dt -a -b -v _EPROCESS
Assuming that the operating system version
Process Carving
and service pack level are known prior to the
As late as 2005, strings [23] analysis was
search (i.e. obtained by inspection of the hard
considered the best method available to
disk drive), a search for processes in a forensic
extract information from a RAM
image of 512 MB RAM takes about 7 minutes
duplicate [24]. Running strings on a RAM
to execute through a PERL interpreter on a
duplicate acquired from a cleanly installed and
modest system8. This is a brute-force search
booted Windows operating system resulted in
that searches for structure signatures linearly.
the average extraction of more then 30 MB of
The fully commented proof of concept code is
largely unusable text7 (see Figure 1: Strings
less than 1000 lines and a high success rate
found in a cleanly booted system). Keep in
can be achieved implementing as few as five
mind that these are unmodified operating
checks on known offsets. [25]
systems, fairly atypical in the wild and that
3. The command should be typed all on one line, not 3. Nolan, O’Sullivan, Branson, Waits. First
two lines as shown. Notice the specified size of 4K Responders Guide to Computer Forensics.
which corresponds to the size of a memory page. Carnegie Mellon University 2005.
Note that usermode access to the PhysicalMemory
object has been removed by Microsoft in Windows 4. Tim Vidas. Procloc.
Server 2003 SP1 and potentially in future operating http://nucia.unomaha.edu/tvidas/. Accessed Feb 8,
systems. \.\DebugMemory is being researched 2007.
further.
5. Harlan Carvey. Windows IR/CF Tools.
4. It could be argued that this information is not lost, http://sourceforge.net/projects/windowsir/.
but will likely be swapped out. This would depend Accessed Feb 8, 2007.
if the portion of memory in question as allocated or
not, and even if the portion was allocated that 6. Mariusz Burdach. Windows Memory Forensic
subsequently swapped out, some information in the Toolkit. http://forensic.secure.net. Accessed Feb. 8,
swap file would be lost. 2007.
6. This may prove to not be the case with a dedicated 10. McAfee VIL database. SQLslammer worm.
hardware acquisition, but this cannot be tested as no Accessed Feb. 8, 2007.
such hardware readily exists. http://us.mcafee.com/virusInfo/default.asp?id=alpha
7. Tested on systems with 512 MB of RAM. 11. Goodwin, Bill. High-tech crime is put on trial.
ComputerWeekly.com. Jan 27, 2007. Accessed
12. United States vs O’Keefe. D.C. Docket No. 04- 25. Vidas, Timothy. Starting a Framework for the
0001 Cr-WLS-1. No 05-11924. Georgia App. Ct. Analysis of Volatile Data Stores. Third Annual ifip
Aug 22. 2006. WG 11.9 International Conference on Digital
http://www.ca11.uscourts.gov/opinions/ops/200511 Forensics. Orlando, Florida. Jan 28-31, 2007.
924.pdf
26. Chris Betz. Memparser.
13. St. of AZ vs Brandy. S-0700-CR-2005014635. http://sourceforge.net/projects/memparser/.
Arizona Sup. Ct. Nov. 11 2005. Accessed Feb 8, 2007.
14. Auditor Acquitted – Uses Computer Virus Defense. 27. Chow, Pfaff, Garfinkel, Rosenblum. Shredding
Aug 28 2003. Accessed Mar 28, 2007. Your Garbage: Reducing Data Lifetime Through
http://www.accountingweb.com/cgi- Secure Deallocation. 14th USENIX Security
bin/item.cgi?id=98024 Symposium. July / August 2005.
15. United States vs Michael Shawn McCourt. District 28. Joanna Rutkowska. Beyond the CPU: Defeating
Court for the western district of Missouri. 06-1018. Hardware Based RAM Acquisition Tools. Will be
Nov 24, 2006. given at Black Hat DC 2007.
http://www.ca8.uscourts.gov/opndir/06/11/061018P. http://blackhat.com/bh-dc-07/bh-dc-07-
pdf speakers.html#Rutkowska. Accessed Feb 8, 2007.
16. Matthew David Bounds v The Queen. HCA 39. 29. Memory Support and Windows Operating Systems.
July 20, 2006. Feb 9, 2005. Accessed March 28, 2007.
http://www.austlii.edu.au/au/cases/cth/high_ct/2006 http://www.microsoft.com/whdc/system/platform/se
/39.html rver/PAE/PAEmem.mspx
17. Altheide, Cory. Forensic analysis of Windows 30. Intel 64 and IA-32 Architectures Software
hosts using UNIX-based tools. Journal of Digital Developer’s Manual: Volume 3A: System
Investigation. Vol 1, Num 1. Feb 2004. Programming Guide Part 1. Intel Corp. November
2006.
18. KB 244139: Windows feature allows a Memory
dump file to be generated with the keyboard
http://support.microsoft.com/kb/244139/en-us