Disk Structures: File System Abstraction Model
Disk Structures: File System Abstraction Model
! Disk
! Volumes and partitions
Disk Structures ! Others (covered later)
! File system
COMP 2555: Principles of Computer Forensics ! Data unit
Autumn 2014
http://www.cs.du.edu/2555
! Metadata
! File name
! A physical storage device ! Conventional disk drives are made up of one or more
! SCSI or SATA hard drive platters coated with magnetic material
! Secure Digital card from a digital camera
! Disk drive geometry
! Analysis requires ! Head
! extensive specialized training and knowledge ! Tracks
! clean room ! Cylinders
! expensive electron microscopy equipment ! Sectors
L3: Disk Structure
! The first sector of the disk contains special code called BIOS loads MBR into memory and executes
the Master Boot Record (MBR) Executed code on MBR loads and executes the OS related boot code
512 bytes
! MBR stores information about partitions on a disk and
their locations, size, and other important items MBR OS dependent boot code
BIOS loads MBR into memory and executes MBR code (GRUB) loads GRUB Stage 2 code
MBR code identifies active partition GRUB Stage 2 asks user to choose one VBR
MBR code loads VBR of active partition and transfers control
Execution proceeds as in the case of single OS method
512 bytes 512 bytes
MBR VBR OS dependent boot code MBR VBR OS dependent boot code
Partition 1
Partition 1
Other system files and data Other system files and data
Partition 2
Data files Other system files and data
! Disk editor utility can alter information in partition table ! Hex dumps are meaningless unless you know what you
! To hide a partition are reading
! Can examine a partition at the physical level with an ! The structure of the stored data must be known
editor: before reading a hex dump
! Norton DiskEdit, WinHex, Hex Workshop
! Structures are usually specified using offsets
! Analyze the key hexadecimal codes the OS uses to ! An offset specifies the location of a specific piece of data
relative to
identify and maintain partitions
! the beginning of the hex dump
! or the beginning of another structure
! The first byte in a hex dump is at offset zero
L3: Disk Structure
! Say we have stored a character (1 byte), followed by an ! The date bytes are 09 0F DE 07
integer (4 bytes), followed by a date (4 bytes) in a file ! If the date was stored as the number of seconds since Jan 1,
1970, then 0x07DE0F09 would be Mar 3, 1974
hex dump 4B CD 34 AB 12 09 0F DE 07
0x0 0x1 0x2 0x3 0x4 0x5 0x6 0x7 0x8
! Say the date was stored as MM DD YY YY
offset
! Offset 0x0 (in the date bytes): month MM
! 0x09 (September)
! Offset 0x0: character (1 byte) ! Offset 0x1: day DD
! 0x4B (the character K in ASCII) ! 0x0F (15)
! Offset 0x1: integer (4 byte) ! Offset 0x2: year YYYY
! 0x12AB24CD (the bytes CD 34 AB 12 arranged in little- ! DE 07 (= 0x07DE = 2014)
endian format)
! Offset 0x5: date (4 bytes)
18 A Typical MBR
19 Partition Table
! First 440 bytes: bootloader code ! Each 16 byte entry tells us about a partition
! instructions to locate bootable partition, load first sector of ! Structure
that partition (VBR) and execute ! Offset 0x0: 0x80 if bootable partition (has VBR), otherwise
! Offset 0x1B8 0x00
! Disk identifier – 4 bytes ! Offset 0x1: CHS values of first sector
! Offset 0x1BE ! Offset 0x4: partition type code
! Partition table – 16x4 = 64 bytes ! http://en.wikipedia.org/wiki/Partition_type#List_of_partition_IDs
! Offset 0x5: CHS values of last sector
! Offset 0x1FE
! Offset 0x8: LBA of first sector
! Boot record signature – 2 bytes
! Offset 0xC: number of sectors in partition
! 0xAA55
! Total of 512 bytes ! Little-endian format: multi-byte values are stored in last
L3: Disk Structure
! http://thestarman.pcministry.com/asm/mbr/PartTables.htm
! Has much more than what is covered here