In a traditional file system such as FAT32 or NTFS information about the file system is stored at the physical sector 0 of the hard drive. This sector would contain information about the partitions on the drive as well as the location of the operating system boot files.
On
examination of the Xbox360 however we note that it is capable of booting into
the Operating System without any media or USB drives attached. Before we take a look at the drive image we
will investigate the FTK Imager log file to ascertain some initial basic
information about the image. From Fig 4.1 we identified that the drive
image contains 39,070,080 sectors which are 512Bytes in size.
Fig 4.1 - FTK Imager Log File
Armed
with the sector size information we look at the drive image and notice that
there is no information in the first 15 sectors. Each of these sectors has a
zero value as per the image below:
Fig 4.2 Sector 0 of the drive image using 010 Editor
Due
to the fact that here is no information located in sector zero as well as the
fact that the Xbox can boot independent of media; we can deduce that the Xbox360
operating system is stored elsewhere within the system.
FATX Partition Header
The first sector that contains information is sector 16
beginning at offset 0x000002000
Fig 4.3 Sector 16 of the drive image - Security Sector
Using the partition information[1] (fig 4.4) we are able to identify the details of the partitions on the XBox Drives as well as their offsets. From this information we established that the information provided in Sector 16 is the beginning of the Security Sector.
Fig 4.4 Partition Information of the XBox360 Drive
Offset
|
Length
|
Information
|
Format
|
0x2000
|
0x204 - 0x80000
|
Security Sector
|
Binary
|
0x80000
|
0x80000000
|
System Cache
|
SFCX (Secure File Cache for Xbox)
|
0x80080000
|
0xA0E30000
|
Game Cache
|
SFCX (Secure File Cache for Xbox)
|
0x10C080000
|
0xCE30000
|
SysExt
|
FATX ("Sub"-Partition)
|
0x118EB0000
|
0xCE30000
|
SysExt2
|
FATX ("Sub"-Partition)
|
0x120eb0000
|
0x10000000
|
Xbox 1 Backwards Compatibility
|
FATX
|
0x130eb0000
|
end of drive
|
Data
|
FATX
|
The security sector is used by the XBox to identify the size, type and authenticity of the hard drive in question. It allows Microsoft to control the hardware being used by the XBox and will prevent unauthorized equipment from being used. To do this the security sector contains information such as the drive Serial Number, Size, Firmware revision, model number and the number of hash values. it begins at the 16th sector on the drive at offset 0x2000.
Using the security sector offset details[2] (Fig 4.5) we constructed a template for the 010 editor to identify and extract the security sector details from the drive image
Fig 4.5 Security Sector Header Information
Offset
|
Length
|
Type
|
Information
|
0x0
|
0x14
|
ascii string
|
Serial Number
|
0x14
|
0x8
|
ascii string
|
Firmware Revision
|
0x1C
|
0x28
|
ascii string
|
Model Number
|
0x44
|
0x14
|
bytes
|
MS Logo Hash
|
0x58
|
0x4
|
unsigned int
|
Number of Sectors on drive
|
0x5C
|
0x100
|
bytes
|
RSA Signature
|
0x200
|
0x4
|
signed int
|
MS Logo Size
|
0x204
|
MS Logo Size
|
image
|
MS Logo
|
The template when applied to the drive image provided us with the drive information as follows.
Fig 4.6 Results of 010 FATX Template
As you can see we were able to identify the following details of the drive.
Serial Number = 3NT08WA5
Firmware Version = 3.01
Model Number = ST920217AS
A quick search reveals the following details from the http://www.memory4less.com website [3]
Fig 4.7 Technical Specifications of the Seagate LD25 Series Hard Disk Drive P/N ST920217AS
Further down the drive we identified the Magic Number for the beginning and end tag for a PNG file.
Fig 4.8 PNG Format Magic Number Details [4]
The area of the file was extracted and resulted in the PNG file shown in Fig 4.9.
Fig 4.9 PNG File extraction file and Details
When we looked at the properties of this file we identified the file had a size of 2,754bytes which corresponded exactly to that identified in the 010 template in Fig 4.6 for LogoSize.
One final point of note was the number of sectors on the disk identified by the FTK Imager log file. If you remember FTK identified that the drive image contains 39,070,080 sectors which are 512Bytes in size. You probably noticed from the 010 template above that the drive header details that there are 2150,192,130 sectors on the disk. Why the discrepancy?
During our investigation we identified that the data was stored on the drive in Big Endian format which means the first byte is the most significant bit. In essence we read from the drive from left to right. This resulted in the drive header details we read from the 010 template. On further investigation however we discovered that the Number of Sectors is written in Little Endian format with the first byte signifying the least significant bit. On reading the value from right to left we get a Sector number of 39,070,080 as can be seen in Fig 4.10 below.
Fig 4.10 Sector Number Reading using Little Endian Format
This Security Sector was copied from a smaller hard
drive (20GB) and placed in the same location on a bigger one (250GB). When it was connected to the XBox it was recognised and functioned. The Xbox however only recognised it as a 20GB drive. This is expected behaviour due to the fact that the size of the drive is depicted by the number of 512byte sectors defined in the Security Sector.
When the field holding the number of sectors on the drive was edited to allow a larger drive to be referenced the XBox360 crashed and failed to recognise the drive. From this experiment we deduce that the RSA Signature that is contained in the header information is a form of hash of the header fields. When the header field is altered the resulting hash is different from that stored on the drive and as such is no longer trusted by the XBox. More investigation is needed into this area.


No comments:
Post a Comment