FAT Structure. File Allocation Table (FAT) File Systems Used with all flavors of Windows Supported by all Windows and UNIX varieties Used in flash cards.

Slides:



Advertisements
Similar presentations
Windows File Systems CGS2564. Who Cares? C:\Documents\Taxes\Tax04.DOC.
Advertisements

Operating Systems File Management.
Volume Analysis. What is a volume?  Carrier defines a volume: “… a collection of addressable sectors that an Operating System (OS) or application can.
Chapter 4 : File Systems What is a file system?
Computer System Basics 2 Hard Drive Storage & File Partitions Computer Forensics BACS 371.
Text Searches Slack Space Unallocated Space
SEMINAR ON FILE SLACK AND DISK SLACK
BACS 371 Computer Forensics
Computer Forensics NTFS File System.
The Sleuth Kit Brian Carrier Set of tools to analyze device images.
The FAT File System CSC 414. Objectives  Understand the structure and components of the FAT (12/16/32) File Systems  Understand what happens when a.
Operating Systems File Systems CNS 3060.
Digital Forensics Module 11 CS /26/2004Module 112 Outline of Module #11 Overview of Windows file systems Overview of ProDiscover Overview of UNIX.
Lecture 10: The FAT, VFAT, and NTFS Filesystems 6/17/2003 CSCE 590 Summer 2003.
Ceng Operating Systems
1 File Management in Representative Operating Systems.
Wince File systems. File system on embedded File system choice on embedded is important –File system size can be an issue –Different media are used –
1 CSCD 496 Computer Forensics Lecture 7 File Systems – Windows Winter 2010.
Metadata Files Excellent reference:
Files & Partitions BACS 371 Computer Forensics. Data Hierarchy Computer Hard Disk Drive Partition File Physical File Logical File Cluster Sector Word.
BACS 371 Computer Forensics
Implementing Hard Drives Chapter 10
Computer Forensics DOS Partitioning. Partitioning Practices  We separate partition practices into those used by Personal Computers:  DOS  Apple Servers.
New Technologies File System
Mastering Windows Network Forensics and Investigation Chapter 7: Windows File Systems.
LIS508 lecture 5: storage devices Thomas Krichel
®® Microsoft Windows 7 for Power Users Tutorial 5 Comparing Windows 7 File Systems.
 FILE S SYSTEM  DIFFERENT FILE SYSTEMS  FILE SYSTEM COMPONENTS  FILE OPERATIONS  LOG STRUCTERD FILE SYSTEM  FILE EXAMPLES.
Lecture 9: The FAT and VFAT Filesystems 6/16/2003 CSCE 590 Summer 2003.
Mastering Windows Network Forensics and Investigation Chapter 7: Windows File Systems.
Files CS Spring Overview Example: FAT File System File Organization File System Organization –File Directories and File Sharing –Record Blocking.
Bits, Bytes, Files, Hard Drives. Bits, Bytes, Letters and Words ● Bit – single piece of information ● Either a 0 or a 1 ● Byte – 8 bits of information.
File System Management File system management encompasses the provision of a way to store your data in a computer, as well as a way for you to find and.
Windows NTFS Introduction to Operating Systems: Module 15.
Investigation of a USB Storage Device (FAT16)
Chapter 3 Partitioning Drives using NTFS and FAT32 Prepared by: Khurram N. Shamsi.
File Systems in Real-Time Embedded Applications March 5th Eric Julien Understanding How the File Allocation Table (FAT) Operates 1.
Lecture 11: The FAT, VFAT, and NTFS Filesystems 6/19/2003 CSCE 590 Summer 2003.
File Storage Organization The majority of space on a device is reserved for the storage of files. When files are created and modified physical blocks are.
Operating System Concepts and Techniques Lecture 18 Information management-2* FFS, UFS2, NTFS M. Naghibzadeh Reference M. Naghibzadeh, Operating System.
DISK THEORY. Disk Theory n How information is stored on disk n How we can take advantage of that when bad things happen.
1 Floppy Drive Formatting ©Richard Goldman February, 2001.
OPERATING SYSTEMS Frans Sanen.  Analyze a FAT file system manually  FAT12 first and simplest version  Still used on smaller disks (e.g. floppies) 
University of Pennsylvania 10/31/00CSE 3801 Windows File System - FAT originally invented as a method for storing data on floppy disks. later used by MS-DOS.
FAT File Allocation Table
BOOT SECTOR, RDE AND FAT ANALYSIS AND STUDY. FLOPPY CONSTRUCTION 1.Write - Protect Notch. 2.Hub. 3.Shutter. 4.Outer Jacket. 5.Protective Woolen Film.
Computer Forensics Hard Drive Format.
Web File System Meeting Presentation October 06. NTFS New Technology File System Muhammad Talha Ekram 2185.
NTFS Filing System CHAPTER 9. New Technology File System (NTFS) Started with Window NT in 1993, Windows XP, 2000, Server 2003, 2008, and Window 7 also.
Digital Forensics Dr. Bhavani Thuraisingham The University of Texas at Dallas Lecture #8 File Systems September 22, 2008.
File system and file structures
Chapter 8 File Systems FAT 12/16/32. Defragmentation Defrag a hard drive – Control Panel  System and Security  Administration tools  Defrag hard drive.
BACS 371 Computer Forensics
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
BITS Pilani Pilani Campus Pawan Sharma Lecture ES C263 INSTR/CS/EEE F241 Microprocessor Programming and Interfacing.
Master Boot Record (MBR)
Day 28 File System.
Advanced Computer Forensics
UMBC CMSC 421 Spring 2017 The FAT Filesystem.
Computer Forensics NTFS File System.
MODERN OPERATING SYSTEMS Third Edition ANDREW S
A “Walk Through” Experiment
Windows XP File Systems
File Structure 2018, Spring Pusan National University Joon-Seok Kim
FILE SYSTEM ANALYSIS Dr Fudong Li
Computer Forensics NTFS File System.
Disk Structure Analysis
Sector 25 from the Root Directory (in 32 byte chunks)
FAT File System.
Chapter 5 File Systems -Compiled for MCA, PU
Presentation transcript:

FAT Structure

File Allocation Table (FAT) File Systems Used with all flavors of Windows Supported by all Windows and UNIX varieties Used in flash cards and USB thumb drives

The FAT Family FAT12, FAT16, FAT32 –12, 16, and 32 are the number of bits used in the FAT for cluster addresses

Sectors The sector is minimum data storage unit –A sector is usually 512 bytes –A sector is the minimum size read from, or written to, a disk –A sector is the minimum I/O unit –This is a HW thing

Clusters Files are allocated space in clusters –A cluster is a fixed number of sectors Must be a power of 2 (1,2,…,64,…) –A cluster is the minimum file allocation unit –This is a SW/OS thing

Cluster sizes for FAT

Slack Slack is the space allocated to a file, but unused –Space at the end of a sector that remains unused by the file –Sectors allocated to the file that the file hasn’t yet used Slack space often contains useful evidence –Unused bytes in an allocated sector are less useful –Unused sectors in an allocated cluster retain their original contents and are very useful

Unallocated Clusters When a file is deleted it’s allocated clusters become unallocated Many clusters on a modern hard drive are unallocated Unallocated clusters may have been allocated earlier though –These clusters retain their data until they are reallocated to a new file –Deleted files are still recoverable!

Cluster Allocation Algorithms First available Best fit Next available

Partitions Review The drive is partitioned Each extended partition has its own partition table Each non-extended partition is referred to as a volume Each volume has a volume boot record or a boot sector Recovery tools can often find data even if the disk was repartioned –Sectors ending in 0x55AA

DOS Disk Partition 1Partition 2 Master Boot Record Including Partition Table & Signature

Creating a File System High-level formatting creates file system data structures –Boot sector –Cluster allocation File Allocation Table (FAT) $Bitmap in the Master File Table (MFT) for NTFS –Exact details depend on operating system –Root Directory

FAT Partition Reserved Area FAT Area Directories and Files FAT12/16 – Reserved area is one sector, the Boot Sector or Volume Boot Record FAT32 – Reserved area contains many sectors, VBR, FSINFO sector and a backup VBR Measured in SectorsMeasured in Clusters First Cluster of FAT File System Starting LBA from partition table VBR

VBR Layout 0 – 2Assembly instruction to jump to boot code Essential if a boot partition 3 – 10OEM in ASCIINo 11 – 12Bytes/sector (512, 1024, 2048, 4096)Yes 13 – 13Sectors/cluster n where n <= 32K and is a power of 2Yes 14 – 15Size in sectors of reserved areaYes 16 – 16Number of FATsYes 17 – 18Maximum number of files in root dir.Yes FAT16 typically 512, 0 for FAT32 19 – 20Number of sectors in file system. If not big enoughYes set to 0, a 4 byter is coming soon 21 – 21Media type: MS states 0xf8 for fixed disks and 0xf0No for removable 22 – 2316-bit size in sectors for each FAT in FAT12/16Yes 0 for FAT32 24 – 27Number of sectors/track and headsNo 28 – 31Number of sectors before start of partitionNo 32 – 35Number of sectors in the file systemYes

VBR Layout (cont) FAT12 and FAT16 36 – 36BIOS INT13h drive numberYes 37 – 37Not usedNo 38 – 38Extended boot signature to identify if the next threeNo values are valid. Signature is 0x29 39 – 42Volume serial numberNo 43 – 53Volume label in ASCIINo 54 – 61File system label in ASCII, FAT, etc.No 62 – 509Not used 510 – 511Signature value, 0xAA55No

VBR Layout (cont) FAT32 36 – 3932-bit size in sectors of one FAT.Yes 40 – 41Defines how multiple FAT structures are written to.Yes 42 – 43Major and minor version number.Yes 44 – 47Cluster where roor directory can be found.Yes 48 – 49Sector where FSINFO structure can be found.No 50 – 51Sector where backup boot sector can be foundNo (usually 6) 52 – 63ReservedNo 64 – 64BIOS INT13h drive numberYes 65 – 65Not usedNo 66 – 66Extended boot signature to identify if the next threeNo values are valid. Signature is 0x29 67 – 70Volume serial numberNo 71 – 81Volume label is ASCIINo 82 – 89File system label in ASCII, FAT, etc.No 90 – 509Not used 510 – 511Signature value, 0xAA55No

Reference

FAT32 FSINFO 0 – 3Signature 0x No 4 – 483Not UsedNo 484 – 487Signature 0x No 488 – 491Number of free clustersNo 492 – 495Next free clusterNo 496 – 507Not usedNo 508 – 511Signature 0xAA550000No

Start of Data Cluster address of start of data is 2 Microsoft mandated no “Cluster 0 or 1” addresses LBA Address of the first cluster of the data area Start of Partition + Reserved Area + # FATS * FAT Size LBA of root directory

File Allocation Table FAT Entry 000 … … … 072 FFF … … next cluster Cluster 001 … not allocated next cluster end of file MS says nothing in the first 2 clusters.

Data Area Reserved Area FAT Area Directories and Files Root Directory Data Area

FAT Directories 0 – 0First character of file name in ASCII.Yes 0x5e or 0x00 if unallocated 1 – 10Characters 2 – 11 of file name in ASCII.Yes 11 – 11File attributesYes 12 – 12ReservedNo 13 – 13Create time (tenths of second)No 14 – 15Create time ( hours, minutes, seconds)No 16 – 17Create dayNo 18 – 19Access dayNo 20 – 21High 2 bytes of first cluster addressYes (0 for FAT12/16) 22 – 23Write time (( hours, minutes, seconds)No 24 – 25Write dayNo 26 – 27Low 2 bytes of first cluster address from startYes of data area 28 – 31Size of file (0 for directories) in bytesYes The period is not included in the short name (fixed format.)

File Attributes Flag ValueDescription Essential = 0x01Read onlyNo = 0x02Hidden fileNo = 0x04System fileNo = 0x08Volume labelYes = 0x0fLong file nameYes = 0x10DirectoryYes = 0x20ArchiveNo

FAT Directories 0 – 0First character of file name in ASCII.Yes 0x5e or 0x00 if unallocated 1 – 10Characters 2 – 11 of file name in ASCII.Yes 11 – 11File attributesYes 12 – 12ReservedNo 13 – 13Create time (tenths of second)No 14 – 15Create time ( hours, minutes, seconds)No 16 – 17Create dayNo 18 – 19Access dayNo 20 – 21High 2 bytes of first cluster addressYes (0 for FAT12/16) 22 – 23Write time (( hours, minutes, seconds)No 24 – 25Write dayNo 26 – 27Low 2 bytes of first cluster address from startYes of data area 28 – 31Size of file (0 for directories) in bytesYes The period is not included in the short name (fixed format.)

Create Time (bytes 14 & 15) Byte 15Byte 14 HourMinuteSecond Bit Data hex 0x530xf6 Data binary Hour = = 0x0a = 10 Minute = = 0x1f = 31 Seconds = = 0x16 = 22 (2 second intervals) Seconds = 44

0 – 0First character of file name in ASCII.Yes 0x5e or 0x00 if unallocated 1 – 10Characters 2 – 11 of file name in ASCII.Yes 11 – 11File attributesYes 12 – 12ReservedNo 13 – 13Create time (tenths of second)No 14 – 15Create time ( hours, minutes, seconds)No 16 – 17Create dayNo 18 – 19Access dayNo 20 – 21High 2 bytes of first cluster addressYes (0 for FAT12/16) 22 – 23Write time (( hours, minutes, seconds)No 24 – 25Write dayNo 26 – 27Low 2 bytes of first cluster address from startYes of data area 28 – 31Size of file (0 for directories) in bytesYes The period is not included in the short name (fixed format.) FAT Directories

Create Date (bytes 17 & 16) Byte 17Byte 16 Year (From 1980)MonthDay Bit Data hex 0x320x81 Data binary Year = = 0x19 = 25 (+ 1980) = 2005 Month = = 0x04 = April Day = = 0x01 = 1

Long File Names 0 – 0Sequence number of the LFN structuresYes Last structure is OR’ed with 0x40 Deleted is 0xe5 1 – 10First 5 (Unicode) file name characters.Yes 11 – 11File attributes (0x0f)Yes 12 – 12ReservedNo 13 – 13ChecksumYes 14 – 25Characters 6 – 11 (Unicode)Yes 26 – 27ReservedNo 28 – 31Characters 12 – 13 (Unicode)Yes The period is included in the long file name.

Long File Names

Root Directory ((0x3E + 0x20 + 0x2*0xEDF) + 0x2*8)*0x200

Deleting a FAT File Deleting root\file1.txt 1.Read Fat Boot Sector (sector 0 of the volume) to understand structure and location of Reserved, FAT, and Data areas 2.Locate file1.txt in the Root Directory to determine its starting cluster 3.Set FAT entries for file1.txt to 0 4.Change filename to  ile1.txt in root directory –Set first character to 0xE5 or 0x00

02C 02D 02E 0 2 D 0 2 E F F F … file2 file3 file ……………… … 000 O2Cfile1.txt Directory and FAT Existing File First cluster used by file FAT Directory

Directory and FAT Deleted file  ile1.txt First cluster used by file 02C 02D 02E … FAT Directory file2 file3 file ……………… … 000 O2C

Deleted File Recovery All Cluster Pointers in the FAT are gone! Option 1 Grab the next n-1 consecutive clusters. Call it the file. May have allocated or unallocated clusters from other files. WinHex uses this option. Option 2 Grab the next n-1 unallocated clusters using the FAT. Call it the file. May have unallocated clusters from other deleted files. EnCase uses this option. Get the first cluster from the directory entry Get size from directory entry Calculate the number of clusters allocated to the file, n.