Difference between pages "Tools:Data Recovery" and "Windows Prefetch File Format"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
(Partition Recovery)
 
(Header)
 
Line 1: Line 1:
= Partition Recovery =
+
A Windows Prefetch file consists of one file header and multiple file sections with different content. Not all content has an obvious forensic value.
  
*[http://www.ptdd.com/index.htm Partition Table Doctor]
+
As far as have been possible to ascertain, there is no public description of the format. The description below has been synthesised from examination
: Recover deleted or lost partitions (FAT16/FAT32/NTFS/NTFS5/EXT2/EXT3/SWAP).
+
of multiple prefetch files.  
  
*[http://www.diskinternals.com/ntfs-recovery/ NTFS Recovery]
+
== Header ==
: DiskInternals NTFS Recovery is a fully automatic utility that recovers data from damaged or formatted disks.
+
  
*[http://www.stud.uni-hannover.de/user/76201/gpart/ gpart]
+
This format has been observed on Windows XP, ... will need to be modified for Vista/Win7 format
: Gpart is a tool which tries to guess the primary partition table of a PC-type hard disk in case the primary partition table in sector 0 is damaged, incorrect or deleted.
+
  
*[http://www.cgsecurity.org/wiki/TestDisk TestDisk]
+
{| class="wikitable"
: [[TestDisk]] is an OpenSource software and is licensed under the GNU Public License (GPL).  
+
|-
 +
! Field
 +
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
| H1
 +
| 0x0000
 +
| 4
 +
| DWORD
 +
| ? Probably a version number, identifying the file structure. Observed values: 0x11 - Windows XP; 0x17 - Vista, Windows 7
 +
|-
 +
| H2
 +
| 0x0004
 +
| 4
 +
| DWORD
 +
| ? Probably a file magic number. Only observed value: 0x41434353
 +
|-
 +
| H3
 +
| 0x0008
 +
| 4
 +
| DWORD?
 +
| ? Observed values: 0x0F - Windows XP, 0x11 - Windows 7
 +
|-
 +
| H4
 +
| 0x000C
 +
| 4
 +
| DWORD
 +
| Prefetch file length.
 +
|-
 +
| H5
 +
|0x0010
 +
| 60
 +
| USTR
 +
| Name of executable as Unicode string, truncated after character 29 if necessary, and terminated by U+0000. As it appears in the prefetch file file name.
 +
|-
 +
| H6
 +
|0x004C
 +
|4
 +
|DWORD
 +
|The prefetch hash, as it appears in the pf file name.
 +
|-
 +
| H7
 +
|0x0050
 +
|4
 +
|?
 +
|? Observed values: 0 for almost all prefetch files (XP); 1 for NTOSBOOT-B00DFAAD.pf (XP)
 +
|-
 +
| H8
 +
| 0x0054
 +
| 4
 +
| DWORD
 +
| Offset to section A
 +
|-
 +
| H9
 +
| 0x0058
 +
| 4
 +
| DWORD
 +
| ? Nr of entries in section A
 +
|-
 +
| H10
 +
| 0x005C
 +
| 4
 +
| DWORD
 +
| Offset to section B
 +
|-
 +
| H11
 +
| 0x0060
 +
| 4
 +
| DWORD
 +
| Nr of entries in section B
 +
|-
 +
| H12
 +
| 0x0064
 +
| 4
 +
| DWORD
 +
| Offset to section C
 +
|-
 +
| H13
 +
| 0x0068
 +
| 4
 +
| DWORD
 +
| Length of section C
 +
|-
 +
| H14
 +
| 0x006C
 +
| 4
 +
| DWORD
 +
| Offset to section D
 +
|-
 +
| H15
 +
| 0x0070
 +
| 4
 +
| DWORD
 +
| ? Probably the number of entries in the D section header
 +
|-
 +
| H16
 +
| 0x0074
 +
| 4
 +
| DWORD
 +
| Length of section D
 +
|-
 +
| H17
 +
| 0x0078
 +
| 8
 +
| FTIME
 +
| Latest execution time of executable (FILETIME)
 +
|-
 +
| H18
 +
| 0x0080
 +
| 16
 +
| ?
 +
| ? Possibly structured as 4 DWORD. Observed values: /0x00000000 0x00000000 0x00000000 0x00000000/, /0x47868c00 0x00000000 0x47860c00 0x00000000/
 +
|-
 +
| H19
 +
| 0x0090
 +
| 4
 +
| DWORD
 +
| Execution counter
 +
|-
 +
| H20
 +
| 0x0094
 +
| 4
 +
| DWORD?
 +
| ? Observed values: 1, 2, 3, 4, 5, 6 (XP)
 +
|-
 +
|}
  
*[http://www.stellarinfo.com/partition-recovery.htm Partition Recovery Software]
+
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.
: Partition Recovery software for NTFS & FAT system that examines lost windows partition of damaged and corrupted hard drive.
+
  
== See Also ==
+
== Section A and B ==
  
* [http://support.microsoft.com/?kbid=166997 Using Norton Disk Edit to Backup Your Master Boot Record]
+
The content of these two sections is unknown.
  
== Notes ==
+
== Section C ==
  
* "fdisk /mbr" restores the boot code in the [[Master Boot Record]], but not the partition itself. On newer versions of Windows you should use fixmbr, bootrec, mbrfix, or [[MBRWizard]]. You can also extract a copy of the specific standard MBR code from tools like bootrec.exe and diskpart.exe in Windows (from various offsets) and copy it to disk with dd (Use bs=446 count=1). For Windows XP SP2 c:\%WINDIR%\System32\diskpart.exe the MBR code is found between offset 1b818h and 1ba17h.
+
== Section D ==
 
+
= Data Recovery =
+
The term "Data Recovery" is frequently used to mean forensic recovery, but the term really should be used for recovering data from damaged media.
+
 
+
*[http://www.toolsthatwork.com/bringback.htm BringBack]
+
: BringBack offers easy to use, inexpensive, and highly successful data recovery for Windows and Linux (ext2) operating systems and digital images stored on memory cards, etc.
+
 
+
*[http://www.runtime.org/raid.htm RAID Reconstructor]
+
: Runtime Software's RAID Reconstructor will reconstruct RAID Level 0 (Striping) and RAID Level 5 drives.
+
 
+
*[http://www.salvationdata.com Salvation Data]
+
: Claims to have a program that can read the "bad blocks" of Maxtor drives with proprietary commands.
+
 
+
* [http://www.e-rol.com/en/ e-ROL]
+
: Erol allows you to recover through the internet files erased by mistake. Recover your files online for free.
+
 
+
* [http://www.recuva.com/ Recuva]
+
: Recuva is a freeware Windows tool that will recover accidentally deleted files.
+
 
+
* [http://www.snapfiles.com/get/restoration.html Restoration]
+
: Restoration is a freeware Windows software that will allow you to recover deleted files
+
 
+
* [http://www.undelete-plus.com/ Undelete Plus]
+
: Undelete Plus is a free deleted file recovery tool that works for all versions of Windows (95-Vista), FAT12/16/32, NTFS and NTFS5 filesystems and can perform recovery on various solid state devices.
+
 
+
* [http://www.data-recovery-software.net/ R-Studio]
+
: R-Studio is a data recovery software suite that can recover files from FAT(12-32), NTFS, NTFS 5, HFS/HFS+, FFS, UFS/UFS2 (*BSD, Solaris), Ext2/Ext3 (Linux) and so on.
+
 
+
* [http://www.stellarinfo.com/ Stellar Phoenix]
+
: Data recovery software services & tools to recover lost data from hard drive. Award winning data recovery software for Windows, Macintosh, Linux, Novell, and UNIX in India, USA, and Netherland.
+
 
+
 
+
See also [[Data Recovery Stories]]
+
 
+
=Carving=
+
*[http://www.datalifter.com/products.htm DataLifter® - File Extractor Pro]
+
: Data carving runs on multiple threads to make use of modern processors
+
 
+
*[http://www.simplecarver.com/ Simple Carver Suite]
+
: Simple Carver Suite is a collection of unique tools designed for a number of purposes including data recovery, forensic computing and eDiscovery. The suite was originally designed for data recovery and has since expanded to include unique file decoding, file identification and file classification.
+
 
+
*[http://foremost.sourceforge.net/ Foremost]
+
: Foremost is a console program to recover files based on their headers, footers, and internal data structures.
+
 
+
*[http://www.digitalforensicssolutions.com/Scalpel/ Scalpel]
+
: Scalpel is a fast file carver that reads a database of header and footer definitions and extracts matching files from a set of image files or raw device files. Scalpel is filesystem-independent and will carve files from FATx, NTFS, ext2/3, or raw partitions.
+
 
+
*[[EnCase]]
+
: EnCase comes with some enScripts that will do carving.
+
 
+
*[[CarvFs]]
+
: A virtual file system (fuse) implementation that can provide carving tools with the possibility to do recursive multi tool zero-storage carving (also called in-place carving). Patches and scripts for scalpel and foremost are provided. Works on raw and encase images.
+
 
+
*[[LibCarvPath]]
+
: A shared library that allows carving tools to use zero-storage carving on carvfs virtual files.
+
 
+
*[http://www.cgsecurity.org/wiki/PhotoRec PhotoRec]
+
: PhotoRec is file data recovery software designed to recover lost files including video, documents and archives from Hard Disks and CDRom and lost pictures (thus, its 'Photo Recovery' name) from digital camera memory.
+
 
+
*[http://www.datarescue.com/photorescue/ PhotoRescue]
+
: Datarescue PhotoRescue Advanced is picture and photo data recovery solution made by the creators of IDA Pro. PhotoRescue will undelete, unerase and recover pictures and files lost on corrupted, erased or damaged compact flash (CF) cards, SD Cards, Memory Sticks, SmartMedia and XD cards.
+
 
+
* [https://www.uitwisselplatform.nl/projects/revit RevIt]
+
: RevIt (Revive It) is an experimental carving tool, initially developed for the DFRWS 2006 carving challenge. It uses 'file structure based carving'. Note that RevIt currently is a work in progress.
+
 
+
* [http://jbj.rapanden.dk/magicrescue/ Magic Rescue]
+
: Magic Rescue is a file carving tool that uses "magic bytes" in a file contents to recover data.
+
 
+
* [[FTK]]
+
: FTK2 includes some file carvers
+

Revision as of 11:29, 14 September 2011

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.

Header

This format has been observed on Windows XP, ... will need to be modified for Vista/Win7 format

Field Offset Length Type Notes
H1 0x0000 4 DWORD  ? Probably a version number, identifying the file structure. Observed values: 0x11 - Windows XP; 0x17 - Vista, Windows 7
H2 0x0004 4 DWORD  ? Probably a file magic number. Only observed value: 0x41434353
H3 0x0008 4 DWORD?  ? Observed values: 0x0F - Windows XP, 0x11 - Windows 7
H4 0x000C 4 DWORD Prefetch file length.
H5 0x0010 60 USTR Name of executable as Unicode string, truncated after character 29 if necessary, and terminated by U+0000. As it appears in the prefetch file file name.
H6 0x004C 4 DWORD The prefetch hash, as it appears in the pf file name.
H7 0x0050 4 ? ? Observed values: 0 for almost all prefetch files (XP); 1 for NTOSBOOT-B00DFAAD.pf (XP)
H8 0x0054 4 DWORD Offset to section A
H9 0x0058 4 DWORD  ? Nr of entries in section A
H10 0x005C 4 DWORD Offset to section B
H11 0x0060 4 DWORD Nr of entries in section B
H12 0x0064 4 DWORD Offset to section C
H13 0x0068 4 DWORD Length of section C
H14 0x006C 4 DWORD Offset to section D
H15 0x0070 4 DWORD  ? Probably the number of entries in the D section header
H16 0x0074 4 DWORD Length of section D
H17 0x0078 8 FTIME Latest execution time of executable (FILETIME)
H18 0x0080 16  ?  ? Possibly structured as 4 DWORD. Observed values: /0x00000000 0x00000000 0x00000000 0x00000000/, /0x47868c00 0x00000000 0x47860c00 0x00000000/
H19 0x0090 4 DWORD Execution counter
H20 0x0094 4 DWORD?  ? Observed values: 1, 2, 3, 4, 5, 6 (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.

Section A and B

The content of these two sections is unknown.

Section C

Section D