Difference between pages "Main Page" and "Windows Prefetch File Format"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
m (WIKI NEWS)
 
(Section A)
 
Line 1: Line 1:
<div style="margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; background-color:#faf0ff; align:right; border:1px solid #ddccff;">
+
{{expand}}
This is the '''Forensics Wiki''', a [http://creativecommons.org/licenses/by-sa/2.5/ Creative Commons]-licensed [http://en.wikipedia.org/wiki/Wiki wiki] devoted to information about [[digital forensics]] (also known as computer forensics). We currently list a total of [[Special:Allpages|{{NUMBEROFARTICLES}}]] pages.
+
 
+
Much of [[computer forensics]] is focused on the [[tools]] and [[techniques]] used by [[investigator]]s, but there are also a number of important [[papers]], [[people]], and [[organizations]] involved. Many of those organizations sponsor [[Upcoming_events|conferences]] throughout the year and around the world. You may also wish to examine the popular [[journals]] and some special [[reports]].
+
</div> 
+
  
 +
A Windows Prefetch file consists of one file header and multiple file sections with different content. Not all content has an obvious forensic value.
  
==WIKI NEWS==
+
As far as have been possible to ascertain, there is no public description of the format. The description below has been synthesised from examination
2014-06-14: The Wiki has been migrated to the most up-to-date MediaWiki and moved from HostGator to Pair. The previous bugs with the AccountCreation problem should be fixed. Please let us know if there are any problems.
+
of multiple prefetch files.
  
2013-05-15: You can now subscribe to Forensics Wiki Recent Changes with the [[ForensicsWiki FeedBurner Feed]]
+
== Characteristics ==
 +
{| class="wikitable"
 +
|-
 +
| <b>Integers</b>
 +
| stored in little-endian
 +
|-
 +
| <b>Strings</b>
 +
| Stored as [http://en.wikipedia.org/wiki/UTF-16/UCS-2 UTF-16 little-endian] without a byte-order-mark (BOM).
 +
|-
 +
| <b>Timestamps</b>
 +
| Stored as [http://msdn2.microsoft.com/en-us/library/ms724284.aspx Windows FILETIME] in UTC.
 +
|-
 +
|}
  
{| width="100%"
+
== File header ==
 +
The file header is 84 bytes of size and consists of:
 +
{| class="wikitable"
 
|-
 
|-
| width="60%" style="vertical-align:top" |
+
! Field
<!-- Selected Forensics Research --
+
! Offset
<div style="margin-top:0.5em; border:2px solid #ff0000; padding:0.5em 0.5em 0.5em 0.5em; background-color:#ffff99; align:center; border:1px solid #ddccff;">
+
! Length
<h2 style="margin:0; background-color:#ffff33; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding-left:0.4em; padding-top:0.2em; padding-bottom:0.2em;"> Featured Forensic Research </h2>
+
! Type
 +
! Notes
 +
|-
 +
| H1
 +
| 0x0000
 +
| 4
 +
| DWORD
 +
| Format version (see format version section below)
 +
|-
 +
| H2
 +
| 0x0004
 +
| 4
 +
| DWORD
 +
| Signature 'SCCA' (or in hexadecimal representation 0x53 0x43 0x43 0x4)
 +
|-
 +
| H3
 +
| 0x0008
 +
| 4
 +
| DWORD?
 +
| Unknown - Values observed: 0x0F - Windows XP, 0x11 - Windows 7, Windows 8.1
 +
|-
 +
| H4
 +
| 0x000C
 +
| 4
 +
| DWORD
 +
| Prefetch file size (or length) (sometimes referred to as End of File (EOF)).
 +
|-
 +
| H5
 +
|0x0010
 +
| 60
 +
| USTR
 +
| The name of the (original) executable as a Unicode (UTF-16 litte-endian string), up to 29 characters and terminated by an end-of-string character (U+0000). This name should correspond with the one in the prefetch file filename.
 +
|-
 +
| H6
 +
|0x004C
 +
|4
 +
|DWORD
 +
|The prefetch hash. This hash value should correspond with the one in the prefetch file filename.
 +
|-
 +
| H7
 +
|0x0050
 +
|4
 +
|?
 +
| Unknown (flags)? Values observed: 0 for almost all prefetch files (XP); 1 for NTOSBOOT-B00DFAAD.pf (XP)
 +
|-
 +
|}
  
<small>May 2014</small>
+
It's worth noting that the name of a carved prefetch file can be restored using the information in field H5 and H6, and its size can be determined by field H4.
<bibtex>
+
@inproceedings{Hurley:2013:MAC:2488388.2488444,
+
author = {Sven Ka ̈lber, Andreas Dewald, Steffen Idler},
+
title = {Forensic Zero-Knowledge Event Reconstruction on Filesystem Metadata},
+
booktitle = {Lecture Notes in Informatics},
+
volume="P-228",
+
year=2014,
+
url = {http://subs.emis.de/LNI/Proceedings/Proceedings228/331.pdf},
+
}
+
</bibtex>
+
  
Abstract: Criminal investigations today can hardly be imagined without the forensic analysis of digital devices, regardless of whether it is a desktop computer, a mobile phone, or a navigation system. This not only holds true for cases of cybercrime, but also for traditional delicts such as murder or blackmail, and also private corporate investigations rely on digital forensics. This leads to an increasing number of cases with an ever-growing amount of data, that exceeds the capacity of the forensic experts. To support investigators to work more efficiently, we introduce a novel approach to automatically reconstruct events that previously occurred on the examined system and to provide a quick overview to the investigator as a starting point for further investigation. In contrast to the few existing approaches, our solution does not rely on any previously profiled system behavior or knowledge about specific applications, log files, or file formats. We further present a prototype implementation of our so-called zero knowledge event reconstruction approach, that solely tries to make sense of characteristic structures in file system metadata such as file- and folder-names and timestamps.
+
=== Format version ===
  
(See also [[Past Selected Articles]])
+
{| class="wikitable"
 +
|-
 +
! Value
 +
! Windows version
 +
|-
 +
| 17 (0x11)
 +
| Windows XP, Windows 2003
 +
|-
 +
| 23 (0x17)
 +
| Windows Vista, Windows 7
 +
|-
 +
| 26 (0x1a)
 +
| Windows 8.1 (note this could be Windows 8 as well but has not been confirmed)
 +
|-
 +
|}
  
| width="40%" style="vertical-align:top" |
+
=== File information ===
 +
The format of the file information is version dependent.
  
<div style="margin-top:0.5em; border:2px solid #00ff00; padding:0.5em 0.5em 0.5em 0.5em; background-color:#ffeeff; align:center; border:1px solid #ffccff;">
+
Note that some other format specifications consider the file information part of the file header.  
<h2 style="margin:0; background-color:#ffff33; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding-left:0.4em; padding-top:0.2em; padding-bottom:0.2em;">  Featured Article </h2>
+
;[[Forensic Linux Live CD issues]]
+
:Forensic Linux Live CD distributions are widely used during computer forensic investigations. Currently, many vendors of such Live CD distributions state that their Linux do not modify the contents of hard drives or employ "write protection." Testing indicates that this may not always be the case. [[Forensic Linux Live CD issues|Read More...]]
+
  
 +
==== File information - version 17 ====
 +
The file information – version 17 is 68 bytes of size and consists of:
 +
{| class="wikitable"
 +
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
|
 +
| 0x0054
 +
| 4
 +
| DWORD
 +
| The offset to section A. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0058
 +
| 4
 +
| DWORD
 +
| The number of entries in section A.
 +
|-
 +
|
 +
| 0x005C
 +
| 4
 +
| DWORD
 +
| The offset to section B. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0060
 +
| 4
 +
| DWORD
 +
| The number of entries in section B.
 +
|-
 +
|
 +
| 0x0064
 +
| 4
 +
| DWORD
 +
| The offset to section C. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0068
 +
| 4
 +
| DWORD
 +
| Length of section C.
 +
|-
 +
|
 +
| 0x006C
 +
| 4
 +
| DWORD
 +
| Offset to section D. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0070
 +
| 4
 +
| DWORD
 +
| The number of entries in section D.
 +
|-
 +
|
 +
| 0x0074
 +
| 4
 +
| DWORD
 +
| Length of section D.
 +
|-
 +
|
 +
| 0x0078
 +
| 8
 +
| FILETIME
 +
| Latest execution time (or run time) of executable (FILETIME)
 +
|-
 +
|
 +
| 0x0080
 +
| 16
 +
| ?
 +
| Unknown ? Possibly structured as 4 DWORD. Observed values: /0x00000000 0x00000000 0x00000000 0x00000000/, /0x47868c00 0x00000000 0x47860c00 0x00000000/ (don't exclude the possibility here that this is remnant data)
 +
|-
 +
|
 +
| 0x0090
 +
| 4
 +
| DWORD
 +
| Execution counter (or run count)
 +
|-
 +
|
 +
| 0x0094
 +
| 4
 +
| DWORD?
 +
| Unknown ? Observed values: 1, 2, 3, 4, 5, 6 (XP)
 +
|-
 
|}
 
|}
  
 +
==== File information - version 23 ====
 +
The file information – version 23 is 156 bytes of size and consists of:
 +
{| class="wikitable"
 +
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
|
 +
| 0x0054
 +
| 4
 +
| DWORD
 +
| The offset to section A. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0058
 +
| 4
 +
| DWORD
 +
| The number of entries in section A.
 +
|-
 +
|
 +
| 0x005C
 +
| 4
 +
| DWORD
 +
| The offset to section B. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0060
 +
| 4
 +
| DWORD
 +
| The number of entries in section B.
 +
|-
 +
|
 +
| 0x0064
 +
| 4
 +
| DWORD
 +
| The offset to section C. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0068
 +
| 4
 +
| DWORD
 +
| Length of section C.
 +
|-
 +
|
 +
| 0x006C
 +
| 4
 +
| DWORD
 +
| Offset to section D. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0070
 +
| 4
 +
| DWORD
 +
| The number of entries in section D.
 +
|-
 +
|
 +
| 0x0074
 +
| 4
 +
| DWORD
 +
| Length of section D.
 +
|-
 +
|
 +
| <b>0x0078</b>
 +
| <b>8</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|
 +
| 0x0080
 +
| 8
 +
| FILETIME
 +
| Latest execution time (or run time) of executable (FILETIME)
 +
|-
 +
|
 +
| 0x0088
 +
| 16
 +
| ?
 +
| Unknown
 +
|-
 +
|
 +
| 0x0098
 +
| 4
 +
| DWORD
 +
| Execution counter (or run count)
 +
|-
 +
|
 +
| 0x009C
 +
| 4
 +
| DWORD?
 +
| Unknown
 +
|-
 +
|
 +
| <b>0x00A0</b>
 +
| <b>80</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|}
  
<!-- This begins the two-column section -->
+
==== File information - version 26 ====
 
+
The file information – version 23 is 224 bytes of size and consists of:
{| width="100%"
+
{| class="wikitable"
 
|-
 
|-
| width="60%" style="vertical-align:top" |
+
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
|
 +
| 0x0054
 +
| 4
 +
| DWORD
 +
| The offset to section A. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0058
 +
| 4
 +
| DWORD
 +
| The number of entries in section A.
 +
|-
 +
|
 +
| 0x005C
 +
| 4
 +
| DWORD
 +
| The offset to section B. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0060
 +
| 4
 +
| DWORD
 +
| The number of entries in section B.
 +
|-
 +
|
 +
| 0x0064
 +
| 4
 +
| DWORD
 +
| The offset to section C. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0068
 +
| 4
 +
| DWORD
 +
| Length of section C.
 +
|-
 +
|
 +
| 0x006C
 +
| 4
 +
| DWORD
 +
| Offset to section D. The offset is relative from the start of the file.
 +
|-
 +
|
 +
| 0x0070
 +
| 4
 +
| DWORD
 +
| The number of entries in section D.
 +
|-
 +
|
 +
| 0x0074
 +
| 4
 +
| DWORD
 +
| Length of section D.
 +
|-
 +
|
 +
| 0x0078
 +
| 8
 +
| ?
 +
| Unknown
 +
|-
 +
|
 +
| 0x0080
 +
| 8
 +
| FILETIME
 +
| Latest execution time (or run time) of executable (FILETIME)
 +
|-
 +
|
 +
| <b>0x0088</b>
 +
| <b>7 x 8 = 56</b>
 +
| <b>FILETIME</b>
 +
| <b>Older (most recent) latest execution time (or run time) of executable (FILETIME)</b>
 +
|-
 +
|
 +
| <b>0x00C0</b>
 +
| <b>16</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|
 +
| 0x00D0
 +
| 4
 +
| DWORD
 +
| Execution counter (or run count)
 +
|-
 +
|
 +
| <b>0x00D4</b>
 +
| <b>4</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|
 +
| <b>0x00D8</b>
 +
| <b>4</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|
 +
| <b>0x00DC</b>
 +
| <b>88</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
|}
  
<div style="margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; background-color:#eeeeff; align:right; border:1px solid #ddccff;">
+
== Section A ==
 +
This section contains an array with 20 byte (version 17) or 32 byte (version 23 and 26) metrics entry records.
  
<h2 style="margin:0; background-color:#ccccff; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000; padding-left:0.4em; padding-top:0.2em; padding-bottom:0.2em;">Topics</h2>
+
A metrics entry records conists of:
 +
{| class="wikitable"
 +
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
|
 +
| 0
 +
| 4
 +
| DWORD
 +
| Start time in ms
 +
|-
 +
|
 +
| 4
 +
| 4
 +
| DWORD
 +
| Duration in ms
 +
|-
 +
|
 +
| 8
 +
| 4
 +
| DWORD
 +
| Copy of duration in ms
 +
|-
 +
|
 +
| 12
 +
| 4
 +
| DWORD
 +
| Filename string offset <br> The offset is relative to the start of the filename string section
 +
|-
 +
|
 +
| 16
 +
| 4
 +
| DWORD
 +
| Filename string number of characters without end-of-string characters
 +
|-
 +
|
 +
| 20
 +
| 4
 +
| DWORD
 +
| Unknown flags
 +
|-
 +
|
 +
| 24
 +
| 4
 +
| DWORD
 +
| Unknown
 +
|-
 +
|
 +
| 28
 +
| 4
 +
| DWORD
 +
| Unknown
 +
|}
  
* '''[[File Analysis]]''':
+
== Section B ==
** '''[[:Category:File Formats|File Formats]]''': [[PDF]], [[DOC]], [[DOCX]], [[JPEG]], [[GIF]], [[BMP]], [[LNK]], [[MP3]], [[AAC]], [[Thumbs.db]], ...
+
This section contains an array with 12 byte (version 17, 23 and 26) entry records.
** '''[[Forensic file formats]]''': [[AFF]], [[gfzip]], [[sgzip]], ...
+
* '''[[File Systems]]''': [[FAT]], [[NTFS]], [[ext2]]/[[ext3]], [[ufs]], [[ffs]], [[reiserfs]], ...
+
** '''[[File Systems#Cryptographic_File_Systems|Cryptographic File Systems]]''': [[File Vault]], [[EFS]], [[CFS]], [[NCryptfs]], [[TCFS]], [[SFS]], ...
+
* '''[[Hardware]]''':
+
** '''[[Bus]]ses''': [[IDE]], [[SCSI]], [[Firewire]], [[USB]], ...
+
** '''[[Data storage media|Media]]''': [[RAM]], [[Hard Drive]]s, [[Memory Card]]s, [[SmartCard]]s, [[RFID]] Tags...
+
** '''[[Personal Digital Devices]]''': [[PDAs]], [[Cellphones]], [[SmartPhones]], [[Audio Devices]], ...
+
** '''[[Other Devices]]''': [[Printers]], [[Scanners]], ...
+
** '''[[Write Blockers]]''': ...
+
* '''Recovering data''': [[Recovering bad data|bad data]], [[Recovering deleted data|deleted data]], [[Recovering Overwritten Data|overwritten data]], [[Sanitization Standards]]
+
* [[Encryption]]
+
* [[GPS]]
+
* [[Forensic_corpora|Forensic Corpora]]
+
* [[Network forensics]]: [[OS fingerprinting]], [[Hidden channels]], [[Proxy server|Proxy servers]]
+
* [[Steganography]], [[Steganalysis]]
+
* '''[[Metadata]]:''' [[MAC times]], [[ACLs]], [[Email Headers]], [[Exif]], [[ID3]], [[OLE-2]], ...
+
* '''[[Legal issues]]:''' [[Caselaw|Case law]]
+
* '''Further information:''' [[Books]], [[Papers]], [[Reports]], [[Journals]], [[Websites]], [[Blogs]], [[Mailing lists]], [[Organizations]], [[Vendors]], [[Conferences]]
+
</div>
+
  
 +
The actual format and usage of these entry records is currently not known.
  
 +
== Section C - Filename strings ==
 +
This section contains filenames strings, it consists of an array of UTF-16 little-endian formatted strings with end-of-string characters (U+0000).
  
| width="40%" style="vertical-align:top" |
+
At the end of the section there seems to be alignment padding that can contain remnant values.
  
<!-- Tools -->
+
== Section D - Volumes information (block) ==
<div style="margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; background-color:#e0ffe0; align:right; border:1px solid #ddccff;">
+
  
<h2 style="margin:0; background-color:#ccffcc; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000000; padding-left:0.4em; padding-top:0.2em; padding-bottom:0.2em;">[[Tools]]</h2>
+
Section D contains one or more subsections, each subsection refers to directories on a volume.
  
* '''[[:Category:Disk Imaging|Disk Imaging]]''': [[dd]], [[dc3dd]], [[dcfldd]], [[dd_rescue]], [[sdd]], [[aimage]], [[Blackbag]], ...
+
If all the executables and libraries referenced in the C section are from one single disk volume, there will be only one section in the D section. If multiple volumes are referenced by section C, section D will contain multiple sections. (A simple way to force this situation is to copy, say, NOTEPAD.EXE to a USB drive, and start it from that volume. The corresponding prefetch file will have one D header referring to, e.g. \DEVICE\HARDDISK1\DP(1)0-0+4 (the USB drive), and one to, e.g. \DEVICE\HARDDISKVOLUME1\ (where the .DLLs and other support files were found).
* '''[[Tools:Data Recovery|Data Recovery]]''': ...
+
* '''[[Tools#Disk_Analysis_Tools|Disk Analysis]]''': [[EnCase]], [[SMART]], [[Sleuthkit]], [[foremost]], [[Scalpel]], [[frag_find]]...
+
* '''[[Tools#Forensics_Live_CDs|Live CDs]]''': [[DEFT Linux]], [[Helix]] ([[Helix3 Pro|Pro]]), [[FCCU Gnu/Linux Boot CD]], [[Knoppix STD]], ...
+
* '''[[Tools:Document Metadata Extraction|Metadata Extraction]]''': [[wvWare]], [[jhead]], [[Hachoir | hachoir-metadata]], [[Photo Investigator]]...
+
* '''[[Tools:File Analysis|File Analysis]]''': [[file]], [[ldd]], [[ltrace]], [[strace]], [[strings]], ...
+
* '''[[Tools:Network_Forensics|Network Forensics]]''': [[Snort]],  [[Wireshark]], [[Kismet]],  [[NetworkMiner]]...
+
* '''[[:Category:Anti-forensics tools|Anti-Forensics]]''': [[Slacker]], [[Timestomp]], [[wipe]], [[shred]], ...
+
* '''[[Tools#Other_Tools|Other Tools]]''': [[biew]], [[hexdump]], ...
+
</div>
+
  
<div style="margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; background-color:#c0ffff; align:right; border:1px solid #ddccff;">
+
In this section, all offsets are assumed to be counted from the start of the D section.
  
<h2 style="margin:0; background-color:#99ffff; font-size:120%; font-weight:bold; border:1px solid #afa3bf; text-align:left; color:#000000; padding-left:0.4em; padding-top:0.2em; padding-bottom:0.2em;">[[:Category:Top-Level|Categories]]</h2>
+
=== Volume information ===
 +
The structure of the volume information is version dependent.
  
The contents of this wiki are organized into various [[:Category:Top-Level|categories]]:
+
==== Volume information - version 17 ====
 +
The volume information – version 17 is 40 bytes in size and consists of:
  
* [[:Category:Tools|Tools]]
+
{| class="wikitable"
* [[:Category:Disk file systems|Disk file systems]]
+
|-
* [[:Category:File Formats|File Formats]]
+
! Field
* [[:Category:Howtos|Howtos]]
+
! Offset
* [[:Category:Licenses|Licenses]]
+
! Length
* [[:Category:Operating systems|Operating systems]]
+
! Type
* [[:Category:People|People]]
+
! Notes
* [[:Category:Bibliographies|Bibliographies]]
+
|-
 +
| VI1
 +
| +0x0000
 +
| 4
 +
| DWORD
 +
| Offset to volume device path (Unicode, terminated by U+0000)
 +
|-
 +
| VI2
 +
| +0x0004
 +
| 4
 +
| DWORD
 +
| Length of volume device path (nr of characters, including terminating U+0000)
 +
|-
 +
| VI3
 +
| +0x0008
 +
| 8
 +
| FILETIME
 +
| Volume creation time.
 +
|-
 +
| VI4
 +
| +0x0010
 +
| 4
 +
| DWORD
 +
| Volume serial number of volume indicated by volume string
 +
|-
 +
| VI5
 +
| +0x0014
 +
| 4
 +
| DWORD
 +
| Offset to sub section E
 +
|-
 +
| VI6
 +
| +0x0018
 +
| 4
 +
| DWORD
 +
| Length of sub section E (in bytes)
 +
|-
 +
| VI7
 +
| +0x001C
 +
| 4
 +
| DWORD
 +
| Offset to sub section F
 +
|-
 +
| VI8
 +
| +0x0020
 +
| 4
 +
| DWORD
 +
| Number of strings in sub section F
 +
|-
 +
| VI9
 +
| +0x0024
 +
| 4
 +
| ?
 +
| Unknown
 +
|-
 +
|}
  
</div>
+
==== Volume information - version 23 ====
 
+
The volume information entry – version 23 is 104 bytes in size and consists of:
  
 +
{| class="wikitable"
 +
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
| VI1
 +
| +0x0000
 +
| 4
 +
| DWORD
 +
| Offset to volume device path (Unicode, terminated by U+0000)
 +
|-
 +
| VI2
 +
| +0x0004
 +
| 4
 +
| DWORD
 +
| Length of volume device path (nr of characters, including terminating U+0000)
 +
|-
 +
| VI3
 +
| +0x0008
 +
| 8
 +
| FILETIME
 +
| Volume creation time.
 +
|-
 +
| VI4
 +
| +0x0010
 +
| 4
 +
| DWORD
 +
| Volume serial number of volume indicated by volume string
 +
|-
 +
| VI5
 +
| +0x0014
 +
| 4
 +
| DWORD
 +
| Offset to sub section E
 +
|-
 +
| VI6
 +
| +0x0018
 +
| 4
 +
| DWORD
 +
| Length of sub section E (in bytes)
 +
|-
 +
| VI7
 +
| +0x001C
 +
| 4
 +
| DWORD
 +
| Offset to sub section F
 +
|-
 +
| VI8
 +
| +0x0020
 +
| 4
 +
| DWORD
 +
| Number of strings in sub section F
 +
|-
 +
| VI9
 +
| +0x0024
 +
| 4
 +
| ?
 +
| Unknown
 +
|-
 +
| <b>VI10</b>
 +
| <b>+0x0028</b>
 +
| <b>28</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
| <b>VI11</b>
 +
| <b>+0x0044</b>
 +
| <b>4</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
| <b>VI12</b>
 +
| <b>+0x0048</b>
 +
| <b>28</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 +
| <b>VI13</b>
 +
| <b>+0x0064</b>
 +
| <b>4</b>
 +
| <b>?</b>
 +
| <b>Unknown</b>
 +
|-
 
|}
 
|}
  
<div style="margin-top:0.5em; padding:0.5em 0.5em 0.5em 0.5em; background-color:#faf0ff; align:right; border:1px solid #ddccff;">
+
==== Volume information - version 26 ====
'''You can help!'''  We have a list of [[:Category:Articles_that_need_to_be_expanded|articles that need to be expanded]]. If you know anything about any of these topics, please feel free to chip in.
+
The volume information entry – version 26 appears to be similar to volume information – version 23.
</div>
+
 
+
=== Sub section E - NTFS file references ===
 +
This sub section can contain NTFS file references.
 +
 
 +
For more information see [https://googledrive.com/host/0B3fBvzttpiiSbl9XZGZzQ05hZkU/Windows%20Prefetch%20File%20(PF)%20format.pdf Windows Prefetch File (PF) format].
 +
 
 +
=== Sub section F - Directory strings ===
 +
This sub sections contains directory strings. The number of strings is stored in the volume information.
 +
 
 +
A directory string is stored in the following structure:
 +
{| class="wikitable"
 +
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
|
 +
| 0x0000
 +
| 2
 +
| DWORD
 +
| Number of characters (WORDs) of the directory name. The value does not include the end-of-string character.
 +
|-
 +
|
 +
| 0x0002
 +
|
 +
| USTR
 +
| The directory name as a Unicode (UTF-16 litte-endian string) terminated by an end-of-string character (U+0000).
 +
|-
 +
|}
  
 +
== See Also ==
 +
* [[Prefetch]]
  
 +
== External Links ==
 +
* [https://googledrive.com/host/0B3fBvzttpiiSbl9XZGZzQ05hZkU/Windows%20Prefetch%20File%20(PF)%20format.pdf Windows Prefetch File (PF) format], by the [[libssca|libssca project]]
 +
* [http://bitbucket.cassidiancybersecurity.com/prefetch-parser/wiki/Home Windows Prefetch file format], by the [http://bitbucket.cassidiancybersecurity.com/prefetch-parser prefetch-parser] project.
  
__NOTOC__
+
[[Category:File Formats]]

Revision as of 14:43, 14 June 2014

Information icon.png

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

A Windows Prefetch file consists of one file header and multiple file sections with different content. Not all content has an obvious forensic value.

As far as have been possible to ascertain, there is no public description of the format. The description below has been synthesised from examination of multiple prefetch files.

Characteristics

Integers stored in little-endian
Strings Stored as UTF-16 little-endian without a byte-order-mark (BOM).
Timestamps Stored as Windows FILETIME in UTC.

File header

The file header is 84 bytes of size and consists of:

Field Offset Length Type Notes
H1 0x0000 4 DWORD Format version (see format version section below)
H2 0x0004 4 DWORD Signature 'SCCA' (or in hexadecimal representation 0x53 0x43 0x43 0x4)
H3 0x0008 4 DWORD? Unknown - Values observed: 0x0F - Windows XP, 0x11 - Windows 7, Windows 8.1
H4 0x000C 4 DWORD Prefetch file size (or length) (sometimes referred to as End of File (EOF)).
H5 0x0010 60 USTR The name of the (original) executable as a Unicode (UTF-16 litte-endian string), up to 29 characters and terminated by an end-of-string character (U+0000). This name should correspond with the one in the prefetch file filename.
H6 0x004C 4 DWORD The prefetch hash. This hash value should correspond with the one in the prefetch file filename.
H7 0x0050 4 ? Unknown (flags)? Values observed: 0 for almost all prefetch files (XP); 1 for NTOSBOOT-B00DFAAD.pf (XP)

It's worth noting that the name of a carved prefetch file can be restored using the information in field H5 and H6, and its size can be determined by field H4.

Format version

Value Windows version
17 (0x11) Windows XP, Windows 2003
23 (0x17) Windows Vista, Windows 7
26 (0x1a) Windows 8.1 (note this could be Windows 8 as well but has not been confirmed)

File information

The format of the file information is version dependent.

Note that some other format specifications consider the file information part of the file header.

File information - version 17

The file information – version 17 is 68 bytes of size and consists of:

Field Offset Length Type Notes
0x0054 4 DWORD The offset to section A. The offset is relative from the start of the file.
0x0058 4 DWORD The number of entries in section A.
0x005C 4 DWORD The offset to section B. The offset is relative from the start of the file.
0x0060 4 DWORD The number of entries in section B.
0x0064 4 DWORD The offset to section C. The offset is relative from the start of the file.
0x0068 4 DWORD Length of section C.
0x006C 4 DWORD Offset to section D. The offset is relative from the start of the file.
0x0070 4 DWORD The number of entries in section D.
0x0074 4 DWORD Length of section D.
0x0078 8 FILETIME Latest execution time (or run time) of executable (FILETIME)
0x0080 16  ? Unknown ? Possibly structured as 4 DWORD. Observed values: /0x00000000 0x00000000 0x00000000 0x00000000/, /0x47868c00 0x00000000 0x47860c00 0x00000000/ (don't exclude the possibility here that this is remnant data)
0x0090 4 DWORD Execution counter (or run count)
0x0094 4 DWORD? Unknown ? Observed values: 1, 2, 3, 4, 5, 6 (XP)

File information - version 23

The file information – version 23 is 156 bytes of size and consists of:

Field Offset Length Type Notes
0x0054 4 DWORD The offset to section A. The offset is relative from the start of the file.
0x0058 4 DWORD The number of entries in section A.
0x005C 4 DWORD The offset to section B. The offset is relative from the start of the file.
0x0060 4 DWORD The number of entries in section B.
0x0064 4 DWORD The offset to section C. The offset is relative from the start of the file.
0x0068 4 DWORD Length of section C.
0x006C 4 DWORD Offset to section D. The offset is relative from the start of the file.
0x0070 4 DWORD The number of entries in section D.
0x0074 4 DWORD Length of section D.
0x0078 8 ? Unknown
0x0080 8 FILETIME Latest execution time (or run time) of executable (FILETIME)
0x0088 16  ? Unknown
0x0098 4 DWORD Execution counter (or run count)
0x009C 4 DWORD? Unknown
0x00A0 80 ? Unknown

File information - version 26

The file information – version 23 is 224 bytes of size and consists of:

Field Offset Length Type Notes
0x0054 4 DWORD The offset to section A. The offset is relative from the start of the file.
0x0058 4 DWORD The number of entries in section A.
0x005C 4 DWORD The offset to section B. The offset is relative from the start of the file.
0x0060 4 DWORD The number of entries in section B.
0x0064 4 DWORD The offset to section C. The offset is relative from the start of the file.
0x0068 4 DWORD Length of section C.
0x006C 4 DWORD Offset to section D. The offset is relative from the start of the file.
0x0070 4 DWORD The number of entries in section D.
0x0074 4 DWORD Length of section D.
0x0078 8  ? Unknown
0x0080 8 FILETIME Latest execution time (or run time) of executable (FILETIME)
0x0088 7 x 8 = 56 FILETIME Older (most recent) latest execution time (or run time) of executable (FILETIME)
0x00C0 16 ? Unknown
0x00D0 4 DWORD Execution counter (or run count)
0x00D4 4 ? Unknown
0x00D8 4 ? Unknown
0x00DC 88 ? Unknown

Section A

This section contains an array with 20 byte (version 17) or 32 byte (version 23 and 26) metrics entry records.

A metrics entry records conists of:

Field Offset Length Type Notes
0 4 DWORD Start time in ms
4 4 DWORD Duration in ms
8 4 DWORD Copy of duration in ms
12 4 DWORD Filename string offset
The offset is relative to the start of the filename string section
16 4 DWORD Filename string number of characters without end-of-string characters
20 4 DWORD Unknown flags
24 4 DWORD Unknown
28 4 DWORD Unknown

Section B

This section contains an array with 12 byte (version 17, 23 and 26) entry records.

The actual format and usage of these entry records is currently not known.

Section C - Filename strings

This section contains filenames strings, it consists of an array of UTF-16 little-endian formatted strings with end-of-string characters (U+0000).

At the end of the section there seems to be alignment padding that can contain remnant values.

Section D - Volumes information (block)

Section D contains one or more subsections, each subsection refers to directories on a volume.

If all the executables and libraries referenced in the C section are from one single disk volume, there will be only one section in the D section. If multiple volumes are referenced by section C, section D will contain multiple sections. (A simple way to force this situation is to copy, say, NOTEPAD.EXE to a USB drive, and start it from that volume. The corresponding prefetch file will have one D header referring to, e.g. \DEVICE\HARDDISK1\DP(1)0-0+4 (the USB drive), and one to, e.g. \DEVICE\HARDDISKVOLUME1\ (where the .DLLs and other support files were found).

In this section, all offsets are assumed to be counted from the start of the D section.

Volume information

The structure of the volume information is version dependent.

Volume information - version 17

The volume information – version 17 is 40 bytes in size and consists of:

Field Offset Length Type Notes
VI1 +0x0000 4 DWORD Offset to volume device path (Unicode, terminated by U+0000)
VI2 +0x0004 4 DWORD Length of volume device path (nr of characters, including terminating U+0000)
VI3 +0x0008 8 FILETIME Volume creation time.
VI4 +0x0010 4 DWORD Volume serial number of volume indicated by volume string
VI5 +0x0014 4 DWORD Offset to sub section E
VI6 +0x0018 4 DWORD Length of sub section E (in bytes)
VI7 +0x001C 4 DWORD Offset to sub section F
VI8 +0x0020 4 DWORD Number of strings in sub section F
VI9 +0x0024 4  ? Unknown

Volume information - version 23

The volume information entry – version 23 is 104 bytes in size and consists of:

Field Offset Length Type Notes
VI1 +0x0000 4 DWORD Offset to volume device path (Unicode, terminated by U+0000)
VI2 +0x0004 4 DWORD Length of volume device path (nr of characters, including terminating U+0000)
VI3 +0x0008 8 FILETIME Volume creation time.
VI4 +0x0010 4 DWORD Volume serial number of volume indicated by volume string
VI5 +0x0014 4 DWORD Offset to sub section E
VI6 +0x0018 4 DWORD Length of sub section E (in bytes)
VI7 +0x001C 4 DWORD Offset to sub section F
VI8 +0x0020 4 DWORD Number of strings in sub section F
VI9 +0x0024 4  ? Unknown
VI10 +0x0028 28 ? Unknown
VI11 +0x0044 4 ? Unknown
VI12 +0x0048 28 ? Unknown
VI13 +0x0064 4 ? Unknown

Volume information - version 26

The volume information entry – version 26 appears to be similar to volume information – version 23.

Sub section E - NTFS file references

This sub section can contain NTFS file references.

For more information see Windows Prefetch File (PF) format.

Sub section F - Directory strings

This sub sections contains directory strings. The number of strings is stored in the volume information.

A directory string is stored in the following structure:

Field Offset Length Type Notes
0x0000 2 DWORD Number of characters (WORDs) of the directory name. The value does not include the end-of-string character.
0x0002 USTR The directory name as a Unicode (UTF-16 litte-endian string) terminated by an end-of-string character (U+0000).

See Also

External Links