Difference between pages "Encase image file format" and "Prefetch"

From Forensics Wiki
(Difference between pages)
Jump to: navigation, search
(History)
 
(Volume)
 
Line 1: Line 1:
The Encase image file format is used by [[EnCase]] used to store various types of digital evidence e.g.
+
{{Expand}}
* disk image (physical bitstream of an acquired disk)
+
Windows Prefetch files, introduced in [[Windows|Windows XP]], are designed to speed up the application startup process. Prefetch files contain the name of the executable, a Unicode list of DLLs used by that executable, a count of how many times the executable has been run, and a timestamp indicating the last time the program was run. Although Prefetch is present in Windows 2003, by default it is only enabled for boot prefetching. The feature is also found in [[Windows Vista]], where it has been augmented with [[SuperFetch]], [[ReadyBoot]], and [[ReadyBoost]].
* volume image
+
* memory
+
* logical files
+
  
== History ==
+
Up to 128 Prefetch files are stored in the <tt>%SystemRoot%\Prefetch</tt> directory [http://blogs.msdn.com/ryanmy/archive/2005/05/25/421882.aspx]. Each file in that directory should contain the name of the application (up to eight (?) characters), a dash, and then an eight character hash of the location from which that application was run, and a <tt>.pf</tt> extension. The filenames should be all uppercase except for the extension. The format of hashes is not known. A sample filename for [[md5deep]] would look like: <tt>MD5DEEP.EXE-4F89AB0C.pf</tt>. If an application is run from two different locations on the drive (i.e. the user runs <tt>C:\md5deep.exe</tt> and then <tt>C:\Apps\Hashing\md5deep.exe</tt>), there will be two different prefetch files in the Prefetch folder.
Expert Witness (for Windows) was the original name for EnCase (dating back to 1998). More info about this can be found on the Internet Archive [http://web.archive.org/web/19980504153628/http://guidancesoftware.com/] including a demo of the original software [http://web.archive.org/web/19980504153759/http://guidancesoftware.com/data/ewsetup.exe]. (presumably) the product was renamed because it intrudes the Expert Wittness trademark hold by ASR Data [http://www.asrdata.com/wp-content/themes/asr/pdf/ruling.pdf].
+
  
The Encase image file format therefore is also referred to as the Expert Witness (Compression) Format.
 
  
 +
== Signature ==
 +
Each Prefetch file has a signature in the first 8 bytes of the file. Windows XP and Windows Vista will generate Prefetch files with the signature \x11\x00\x00\x00\x53\x43\x43\x41 (0x41434353 0x00000011). Windows 7 Prefetch file's signature is \x17\x00\x00\x00\x53\x43\x43\x41 (0x41434353 0x00000017). The [http://en.wikipedia.org/wiki/ASCII ASCII] representation of these bytes will display "....SCCA".
  
Currently there are 2 versions of the format:
+
== Timestamps ==
* version 1 is (reportedly) based on [[:File:ASR Data's Expert Witness Compression Format.pdf|ASR Data's Expert Witness Compression Format]]
+
* version 2 was introduced in EnCase 7, for which a format specification (at least for Ex01) is available, but requires registration.
+
  
The libewf project indicates that the January 2012 version of the version 2 format specification, besides Lx01 not being specified, is sufficient to read non-encrypted Ex01 files the format but not complete, at the moment Guidance Software is working on an update.
+
Both the [[NTFS]] timestamps for a Prefetch file and the timestamp embedded in each Prefetch file contain valuable information. The timestamp embedded within the Prefetch file is a 64-bit (QWORD) [http://msdn2.microsoft.com/en-us/library/ms724284.aspx FILETIME] object The creation date of the file indicates the first time the application was executed. Both the modification date of the file and the embedded timestamp indicate the last time the application was executed.
  
== Version 1 ==
+
Windows will store timestamps according to Windows [http://msdn.microsoft.com/en-us/library/ms724290%28VS.85%29.aspx epoch].
The media data can be stored in multiple evidence files, which are called segment files.
+
Each segment file consist of multiple sections, which has a distinct section start definition containing a section type.
+
Up to EnCase 5 the segment file were limited to 2 GiB, due to the internal 31-bit file offset representation. This limitation was lifted by adding a base offset value in EnCase 6.
+
  
 +
==== Creation Time ====
 +
The creation time does not have a static offset on any Windows platform. The location of the creation time can be found using the offset 0x8 + length of Volume path offset.
  
EnCase allows to store the data compressed either using a fast or best level of the deflate compression method.
+
==== Last Run Time ====
EnCase 7 no longer distinguishes between fast or best compression and just provides for either uncompressed or compressed.
+
A timestamp of when the application was last ran is embedded into the Prefetch file. The offset to the "Last Run Time" is located at offset 0x78 from the beginning of the file on [[Windows]] XP. The offset for Windows Vista and Windows 7 is at 0x80.  
  
 +
== MetaData ==
 +
==== Header ====
 +
In each Prefetch file, the size of the header is stored and can be found at offset 0x54 on Windows XP, Windows Vista, and Windows 7. The header size for Windows XP is 0x98 (152) and 0xf0 (240) on Windows Vista and Windows 7.
  
Besides digital evidence the evidence files, or segment files, contain a header containing case information.
+
The Prefetch file will embed the application's name into the header at offset 0x10.
The case information which entails date and time of acquisition, an examiner's name, notes on the acquisition, and an optional password.
+
* In EnCase 3 the case information header is stored in the "header" section, which is defined twice within the file and contain the same information.
+
* As of EnCase 4 an additional "header2" section was added. The "header" section now appears only once, but the new "header2" section twice.
+
  
 +
==== Run Count ====
 +
The run count, or number of times the application has been run, is a 4-byte (DWORD) value located at offset 0x90 from the beginning of the file on [[Windows]] XP. On Windows Vista and Windows 7, the run time can be found at 0x98.
  
The format adds error detection by storing the data with checksums (Adler32), for both the metadata as the data blocks, which are by default 64 x 512 byte sectors (32 KiB).
+
==== Volume ====
As of EnCase 5 the number of sectors per block (chunk) can vary.
+
Volume related information, volume path and volume serial number, are embedded into the Prefetch file. The precise offset for this information varies for each application ran. In the header at offset 0x6c, the location of the volume path is stored. The location is a 4-bytes (DWORD) value. The offset 0x6c is consistent for Windows XP and Windows 7.
EnCase 3F introduced an "error2" section that it uses to record the location and number of bad sector chunks. The way it handles the sections it can't read is that those areas are filled with zero.
+
Then EnCase displays to the user the areas that could not be read when the image was acquired. The granularity of unreadable chunks appears to be 32K.
+
As of EnCase 5 the granularity of unreadable chunks can vary.
+
  
 +
At the location given from 0ffst 0x6c, a 4 byte value is stored which is the number of bytes from current offset (location from offset 0x6c) to the beginning of the volume path. The location from offset 0x6c, for ease, will be called the "volume path offset." The volume path is embedded as a NULL-terminating string.
  
EnCase 3 can store a one-way hash of the data. For a bitstream it does so by calculating e.g. a MD5 hash of the original media data and adds a hash section to the last of the segment file.
+
The length of the volume path is a 4-byte value is located at volume path offset + 0x4.
As of EnCase 6 the option to store a SHA1 hash was added.
+
  
 +
The volume [http://en.wikipedia.org/wiki/Volume_serial_number serial number] is a 4-byte value that identifies a media storage. A serial number does not have a consistent offset within a Prefetch between Windows operating systems. The 4-byte value can be found eight (8) bytes from the creation time location.
  
EnCase 5 and later have the option to store '''single files''' into the EnCase Logical Evidence File (LEF) or EWF-L01.
+
== Issues ==
This format changed slightly in EnCase 6 and 7.
+
==== End of File ====
 
+
Prefetch files generated by the Windows operating system does not have any signature or sequences of bytes to indicate when the end of the Prefetch file has been reached.
== Version 2 ==
+
 
+
In EnCase 7 the EWF format was succeeded by the EnCase Evidence File Format Version 2 (EWF2-EX01 and EWF2-LX01).
+
EWF2-EX01 is at it's lower levels a different format then EWF-E01 and provides support for:
+
* bzip2 compression
+
* direct encryption (AES-256) of the section data
+
 
+
The same features are added to the new logical evidence file format (EWF2-LX01) with the exception of encryption.
+
EWF2-EX01, EWF2-LX01 are not backwards compatible with previous EnCase products.
+
  
 
== See Also ==
 
== See Also ==
 +
* [[SuperFetch]]
 +
* [[Prefetch XML]]
  
* [[:File:ASR Data's Expert Witness Compression Format.pdf|ASR Data's Expert Witness Compression Format]]
+
== External Links ==
* [[EnCase]]
+
* [http://milo2012.wordpress.com/2009/10/19/windows-prefetch-folder-tool/ Prefetch-Tool Script] - Python looks Prefetch files up on a web server.
 
+
* [http://www.mitec.cz/wfa.html Windows File Analyzer] - Parses Prefetch files, thumbnail databases, shortcuts, index.dat files, and the recycle bin
== External Links ==  
+
* [http://www.microsoft.com/whdc/driver/kernel/XP_kernel.mspx#ECLAC Microsoft's description of Prefetch when Windows XP was introduced]
 
+
* [http://msdn.microsoft.com/msdnmag/issues/01/12/XPKernel/default.aspx More detail from Microsoft]
* [http://encase-enterprise-blog.guidancesoftware.com/2012/01/2nd-generation-encase-evidence-file.html 2nd Generation EnCase Evidence File Technical Specification now Available], Guidance Software, Jan 2012
+
* [http://www.tzworks.net/prototype_page.php?proto_id=1 Windows Prefetch parser] Free tool that can be run on Windows, Linux or Mac OS-X.
* Requires registration: [http://www.guidancesoftware.com/DocumentRegistration.aspx?did=1000018246 EnCase Evidence File Format Version 2], Guidance Software, Jan 2012
+
* [http://code.google.com/p/libewf/downloads/detail?name=Expert%20Witness%20Compression%20Format%20%28EWF%29.pdf Expert Witness Compression Format (EWF)].
+
* [http://code.google.com/p/libewf/downloads/detail?name=Expert%20Witness%20Compression%20Format%202%20%28EWF2%29.pdf Expert Witness Compression Format (EWF) version 2].
+
* [http://www.cfreds.nist.gov/v2/Basic_Mac_Image.html Sample image in EnCase, iLook, and dd format] - From the [[Computer Forensic Reference Data Sets]] Project
+
 
+
[[Category:Forensics File Formats]]
+

Revision as of 17:52, 2 July 2011

Information icon.png

Please help to improve this article by expanding it.
Further information might be found on the discussion page.

Windows Prefetch files, introduced in Windows XP, are designed to speed up the application startup process. Prefetch files contain the name of the executable, a Unicode list of DLLs used by that executable, a count of how many times the executable has been run, and a timestamp indicating the last time the program was run. Although Prefetch is present in Windows 2003, by default it is only enabled for boot prefetching. The feature is also found in Windows Vista, where it has been augmented with SuperFetch, ReadyBoot, and ReadyBoost.

Up to 128 Prefetch files are stored in the %SystemRoot%\Prefetch directory [1]. Each file in that directory should contain the name of the application (up to eight (?) characters), a dash, and then an eight character hash of the location from which that application was run, and a .pf extension. The filenames should be all uppercase except for the extension. The format of hashes is not known. A sample filename for md5deep would look like: MD5DEEP.EXE-4F89AB0C.pf. If an application is run from two different locations on the drive (i.e. the user runs C:\md5deep.exe and then C:\Apps\Hashing\md5deep.exe), there will be two different prefetch files in the Prefetch folder.


Contents

Signature

Each Prefetch file has a signature in the first 8 bytes of the file. Windows XP and Windows Vista will generate Prefetch files with the signature \x11\x00\x00\x00\x53\x43\x43\x41 (0x41434353 0x00000011). Windows 7 Prefetch file's signature is \x17\x00\x00\x00\x53\x43\x43\x41 (0x41434353 0x00000017). The ASCII representation of these bytes will display "....SCCA".

Timestamps

Both the NTFS timestamps for a Prefetch file and the timestamp embedded in each Prefetch file contain valuable information. The timestamp embedded within the Prefetch file is a 64-bit (QWORD) FILETIME object The creation date of the file indicates the first time the application was executed. Both the modification date of the file and the embedded timestamp indicate the last time the application was executed.

Windows will store timestamps according to Windows epoch.

Creation Time

The creation time does not have a static offset on any Windows platform. The location of the creation time can be found using the offset 0x8 + length of Volume path offset.

Last Run Time

A timestamp of when the application was last ran is embedded into the Prefetch file. The offset to the "Last Run Time" is located at offset 0x78 from the beginning of the file on Windows XP. The offset for Windows Vista and Windows 7 is at 0x80.

MetaData

Header

In each Prefetch file, the size of the header is stored and can be found at offset 0x54 on Windows XP, Windows Vista, and Windows 7. The header size for Windows XP is 0x98 (152) and 0xf0 (240) on Windows Vista and Windows 7.

The Prefetch file will embed the application's name into the header at offset 0x10.

Run Count

The run count, or number of times the application has been run, is a 4-byte (DWORD) value located at offset 0x90 from the beginning of the file on Windows XP. On Windows Vista and Windows 7, the run time can be found at 0x98.

Volume

Volume related information, volume path and volume serial number, are embedded into the Prefetch file. The precise offset for this information varies for each application ran. In the header at offset 0x6c, the location of the volume path is stored. The location is a 4-bytes (DWORD) value. The offset 0x6c is consistent for Windows XP and Windows 7.

At the location given from 0ffst 0x6c, a 4 byte value is stored which is the number of bytes from current offset (location from offset 0x6c) to the beginning of the volume path. The location from offset 0x6c, for ease, will be called the "volume path offset." The volume path is embedded as a NULL-terminating string.

The length of the volume path is a 4-byte value is located at volume path offset + 0x4.

The volume serial number is a 4-byte value that identifies a media storage. A serial number does not have a consistent offset within a Prefetch between Windows operating systems. The 4-byte value can be found eight (8) bytes from the creation time location.

Issues

End of File

Prefetch files generated by the Windows operating system does not have any signature or sequences of bytes to indicate when the end of the Prefetch file has been reached.

See Also

External Links