Difference between pages "Sim Filesystem" and "Windows Prefetch File Format"

From Forensics Wiki
(Difference between pages)
Jump to: navigation, search
(Information)
 
(Section D)
 
Line 1: Line 1:
''Under Construction''
+
A Windows Prefetch file consists of one file header and multiple file sections with different content. Not all content has an obvious forensic value.
  
The [[SIM Card]] is the basic memory device inside of many mobile phones in use today. This small piece of hardware has been key to solving many cases in the world of [[SIM Card Forensics]]. However, without the proper knowledge of the SIM card's filesystem, the user will be missing out on all the valuable information the [[SIM Card]] holds.
+
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 ==
  
== Getting Started ==
+
This format has been observed on Windows XP, ...  will need to be modified for Vista/Win7 format
  
[[File:What_you_need.jpg|250px|thumb|Items you'll need]]
+
{| class="wikitable"
 +
|-
 +
! 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)
 +
|-
 +
|}
  
This is a list of items to get you started on reading SIM Cards and their information:
+
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.
  
# [[Windows]] operating system
+
== Section A and B ==
# [[SIMCon]]
+
#* Program used to read SIM Cards
+
# [[SIM Cards]]
+
# SIM Card Reader
+
  
== Quick Guide for SIMCon ==
+
The content of these two sections is unknown.
  
# Make sure the SIM Card Reader with SIM Card is connected
+
== Section C ==
# Open [[SIMCon]]
+
# Click File > Read SIM or Click [[File:Simcon.png]] in the upper left corner of [[SIMCon]]
+
# Click OK when the next dialog box pops up
+
#* '''Note''', some SIM cards are locked. This is where the PIN needs to be entered if known.
+
#* If the PIN is unknown, the SIM cannot be read.
+
# Click OK again when the next dialog box pops up
+
  
== Definitions ==
+
== Section D ==
  
=== MF ===
+
Section D begins with one or more headers. The number is (most likely) determined by the DWORD at file offset 0x0070. Each header refers to a hard drive.
* Only '''one''' MF
+
* The Master File (MF)
+
* Root of the SIM Card file system
+
* Equivalent to the root directory or "/" in the Linux filesystem
+
  
=== DF ===
+
In this sections, all offsets are assumed to be counted from the start of the D section.
* Dedicated Files (DF)
+
* Equivalent to a folder in a Windows/Linux filesystem
+
* Usually three DF's
+
** DF_GSM / DF_DCS1800 / DF_TELECOM
+
  
==== DF_DCS1800 / DF_GSM ====
+
{| class="wikitable"
* Contains network related information
+
|-
* Specifying data in DF_GSM writes only to DF_GSM on the SIM
+
! Field
* The SIM is expected to mirror GSM and DCS1800
+
! Offset
 +
! Length
 +
! Type
 +
! Notes
 +
|-
 +
| DH1
 +
| 0x0000
 +
| 4
 +
| DWORD
 +
| Offset to volume string (Unicode, terminated by U+0000)
 +
|-
 +
|}
  
==== DF_TELECOM ====
+
If all the executables and libraries referenced in the C section are from one single disk volume, there will be only one header in the D section. If multiple volumes are referenced by section C, section D will contain multiple headers.  (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 with 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).
* Contains the service related information
+
 
+
=== EF ===
+
* Elementary Files (EF)
+
* Holds one to many records
+
* Represent the leaf node of the filesystem
+
* EF's sit below the DF's in the filesystem hierarchy
+
 
+
=== PLMN ===
+
* Public Land Mobile Network
+
** A PLMN is a network that is established and operated by an administration or by a recognized operating agency (ROA) for the specific purpose of providing land mobile telecommunications services to the public. [http://en.wikipedia.org/wiki/Public_land_mobile_network]
+
 
+
=== LAI ===
+
* Location Area Identity
+
** Each location area of a public land mobile network (PLMN) has its own unique identifier which is known as Location Area Identity (LAI). [http://en.wikipedia.org/wiki/Location_Area_Identity]
+
 
+
== Information ==
+
 
+
=== EF_ICCID ===
+
 
+
This displays the ID or Card Identity of the SIM Card, this can also be found on the SIM card itself.
+
 
+
[[File:Ef_iccid.png|350px|thumb|EF_ICCID]]
+
 
+
=== DF_GSM ===
+
 
+
==== EF_IMSI ====
+
 
+
[[File:Ef_imsi.png|350px|thumb|EF_IMSI]]
+
 
+
* International Mobile Subscriber Identity (IMSI)[http://en.wikipedia.org/wiki/IMSI]
+
* 310  - 260  -  653235860
+
* MCC  -  MNC  -  MSIN
+
** MCC[http://en.wikipedia.org/wiki/List_of_mobile_country_codes] (3 Digits)
+
*** Mobile Country Code
+
** MNC[http://en.wikipedia.org/wiki/Mobile_Network_Code] (2 Digits EU / 3 Digits NA)
+
*** Mobile Network Code
+
** MSIN[http://en.wikipedia.org/wiki/MSIN] (Remaining Digits)
+
*** Mobile Subscription Identification Number
+
*** Within the network's customer base
+
 
+
==== EF_PLMNSEL ====
+
[[File:Plmnsel.png|350px|thumb|EF_PLMNSEL]]
+
* List of all PLMN's (see [[Sim_Filesystem#PLMN]])
+
 
+
==== EF_LOCI ====
+
* Location Information
+
** Contains Location Area Identity (see [[Sim_Filesystem#LAI]])
+
*** LAI Network Code (see [[Sim_Filesystem#PLMN]] / [[Sim_Filesystem#LAI]])
+
 
+
[[File:Ef_loci.png|350px|thumb|EF_LOCI]]
+
 
+
=== DF_TELECOM ===
+
 
+
==== EF_ADN ====
+
[[File:EF_adn.png|350px|thumb|EF_ADN]]
+

Revision as of 03:04, 16 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.

Contents

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

Section D begins with one or more headers. The number is (most likely) determined by the DWORD at file offset 0x0070. Each header refers to a hard drive.

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

Field Offset Length Type Notes
DH1 0x0000 4 DWORD Offset to volume string (Unicode, terminated by U+0000)

If all the executables and libraries referenced in the C section are from one single disk volume, there will be only one header in the D section. If multiple volumes are referenced by section C, section D will contain multiple headers. (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 with 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).