Module 2 Part 2
Module 2 Part 2
Part – 1
Disk Partition
FAT
1
File Systems
The hard disks and other media provide the
physical space for storing data.
The file system provides the logical structure
of organizing data on a physical drive.
It provides the mechanism to locate data any
where on a given disk or drive.
It provides the hierarchical structure of
directories in which individual files are stored.
Microsoft File Structures
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
3
protected website for classroom use.
Microsoft File Structures
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
4
protected website for classroom use.
Disk Partitions
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
5
protected website for classroom use.
A hard drive can be divided into 1 or more partitions
that are identified by a letter such as drive 6C: or drive D:
Disk Partitions
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
7
protected website for classroom use.
Disk Partitions
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
8
protected website for classroom use.
The Master Boot Record
Address Description Size (Bytes)
Hex Dec
0x000 0 Bootstrap code area 446
Includes the starting
0x1BE 446 Partition Entry #1 16 LBA and length of the
0x1CE 462 Partition Entry #2 16 partition
0x1DE 478 Partition Entry #3 16
Total: 512
MBR
(ext3) (swap) (NTFS) (FAT32)
Disk 2
Partition 1
MBR
(NTFS)
9
Disk Partitions
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
10
protected website for classroom use.
Mounting a File System
1. Read the super block for the target file system
– Contains meta-data about the file system
– Version, size, locations of key structures on disk, etc.
2. Determine the mount point
– On Windows: pick a drive letter
– On Linux: mount the new file system under a
specific directory
12
Examining FAT Disks
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
13
protected website for classroom use.
• Stores basic info about the file system
• FAT version, location of boot files
• Total number of blocks
• Index of the root directory in the FAT
Super
Disk Block
14
Examining FAT Disks
The various FAT systems are:
FAT12 - used on volumes smaller than 16MB (Floppies)
FAT16 - used on volumes 16MB to 2GB (Hard Drives)
FAT32 - used on volumes 512MB to 2TB (Hard Drives)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
15
protected website for classroom use.
• Directories are special files
– File contains a list of entries inside
Windows the directory
• Possible values for FAT entries:
C:\ – 0 – entry is empty
Users – 1 – reserved by the OS
– 1 < N < 0xFFFF – next block in a chain
– 0xFFFF – end of a chain
2 3 4 5 6 7 8 9 2 3 4 5 6 7 8 9
Super
Disk Block C:\
Root directory
index = 2 . 2 Y rwx
Windows 3 Y rwx
Users 4 Y rwx 16
Fat Table Entries
• len(FAT) == Number of clusters on the disk
– Max number of files/directories is bounded
– Decided when you format the partition
• The FAT version roughly corresponds to the size in
bits of each FAT entry
– E.g. FAT16 each FAT entry is 16 bits
– More bits larger disks are supported
17
Fragmentation
• Blocks for a file need not be contiguous
56 57 58 59 60 61 62 63 64 65 67 68
FAT 0 0 65 0 0 0xFF 0 58 0 67 61 0
FF
d Sta
En rt
56 57 58 59 60 61 62 63 64 65 67 68
Blocks
Possible values for FAT entries:
• 0 – entry is empty
• 1 < N < 0xFFFF – next block in a chain
• 0xFFFF – end of a chain
18
FAT: The Good and the Bad
• The Good – FAT supports:
– Hierarchical tree of directories and files
– Variable length files
– Basic file and directory meta-data
• The Bad
– At most, FAT32 supports 2TB disks
– Locating free chunks requires scanning the entire FAT
– Prone to internal and external fragmentation
• Large blocks internal fragmentation
– Reads require a lot of random seeking
19
Lots of Seeking FAT may have very low spatial
• Consider the following code: locality, thus a lot of random
seeking
int fd = open(“my_file.txt”, “r”);
int r = read(fd, buffer, 1024 * 4 * 4); // 4 4KB blocks
56 57 58 59 60 61 62 63 64 65 67 68
56 57 58 59 60 61 62 63 64 65 67 68
Blocks
20
Examining FAT Disks
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
21
protected website for classroom use.
Examining FAT Disks
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
22
protected website for classroom use.
Examining FAT Disks
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
23
protected website for classroom use.
Examining FAT Disks
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
24
protected website for classroom use.
Examining FAT Disks
• When this first assigned cluster is filled and runs out of room
• FAT assigns the next available cluster to the file
• If the next available cluster isn’t contiguous to the current cluster
• File becomes fragmented
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
25
protected website for classroom use.
Deleting FAT Files
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
26
protected website for classroom use.
Examining NTFS Disks (1 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
27
protected website for classroom use.
Examining NTFS Disks (2 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
28
protected website for classroom use.
Examining NTFS Disks (3 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
29
protected website for classroom use.
NTFS System Files (1 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
30
protected website for classroom use.
NTFS File System (2 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
32
protected website for classroom use.
NTFS File System (3 of 3)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
33
protected website for classroom use.
MFT and File Attributes (1 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
34
protected website for classroom use.
MFT and File Attributes (2 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
35
protected website for classroom use.
MFT and File Attributes (3 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
36
protected website for classroom use.
MFT and File Attributes (3 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
37
protected website for classroom use.
MFT and File Attributes (4 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
38
protected website for classroom use.
MFT and File Attributes (5 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
39
protected website for classroom use.
MFT and File Attributes (6 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
40
protected website for classroom use.
MFT and File Attributes (7 of 7)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
41
protected website for classroom use.
MFT Structures for File Data (1 of 11 )
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
42
protected website for classroom use.
MFT Structures for File Data (2 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
43
protected website for classroom use.
MFT Structures for File Data (3 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
44
protected website for classroom use.
MFT Structures for File Data (4 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
45
protected website for classroom use.
MFT Structures for File Data (5 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
46
protected website for classroom use.
MFT Structures for File Data (6 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
47
protected website for classroom use.
MFT Structures for File Data (7 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
48
protected website for classroom use.
MFT Structures for File Data (8 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
49
protected website for classroom use.
MFT Structures for File Data (9 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
50
protected website for classroom use.
MFT Structures for File Data (10 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
51
protected website for classroom use.
MFT Structures for File Data (11 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
52
protected website for classroom use.
MFT Structures for File Data (12 of 11)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
57
protected website for classroom use.
NTFS Alternate Data Streams (1 of 2)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
58
protected website for classroom use.
NTFS Alternate Data Streams (2 of 2)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
59
protected website for classroom use.
NTFS Compressed Files
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
60
protected website for classroom use.
NTFS Encrypting File System (EFS)
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
61
protected website for classroom use.
EFS Recovery Key Agent
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
62
protected website for classroom use.
Deleting NTFS Files
• Using File explorer, When a file is deleted in Windows NT and later
• The OS renames it and moves it to the Recycle Bin
• Can use the del (delete) MS-DOS command
• Doesn't rename and move to recyle bin, but Eliminates the file from the MFT listing in
the same way FAT does
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
63
protected website for classroom use.
Deleting NTFS Files
• Following steps apply when a user empties the Recycle Bin
1. The associated clusters are designated as free—that is, marked as
available for new data.
2. The $Bitmap file attribute in the MFT is updated to reflect the file’s
deletion, showing that this space is available.
3. The file’s record in the MFT is marked as being available.
4. VCN/LCN cluster locations linked to deleted nonresident files are then
removed from the original MFT record.
5. A run list is maintained in the MFT of all cluster locations on the disk for
nonresident files. When the list of links is deleted, any reference to the links
is lost.
NTFS is more efficient than FAT at reclaiming deleted space. Deleted files are overwritten
more quickly
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
64
protected website for classroom use.
Resilient File System
• Resilient File System (ReFS) - designed to address very large data storage needs
• Such as the cloud
• Features incorporated into ReFS’s design:
• Maximized data availability
• Improved data integrity
• Designed for scalability
• ReFS uses disk structures similar to the MFT in NTFS
• Its main intention for storage, so it cannot be used for BOOT drive
• Supported on Window 8/8.1 and above windows server 2012 and above
• its storage engine uses a B+ tree sort method for fast access to large data sets
• It uses a method called “allocate-on-write” that copies updates of data files to new locations,
similar to shadow paging, it prevents overwriting the original data files
• The purpose of writing updates to new locations is to ensure that the original data can be
recovered easily if a failure occurs in the update write to disk
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
65
protected website for classroom use.
In NTFS, file names are limited to 255 characters, while ReFS allows up to
32768 characters in a file name
Solution
WHOLE DISK ENCYRPYION
WDE
Understanding Whole Disk Encryption (1
of 3)
• In recent years, there has been more concern about loss of
• Personal identity information (PII) and trade secrets caused by computer theft
• Of particular concern is the theft of laptop computers and handheld devices
• To help prevent loss of information, software vendors now provide whole disk
encryption
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
69
protected website for classroom use.
Understanding Whole Disk Encryption (2
of 3)
• Current whole disk encryption tools offer the following features:
Preboot authentication -single sign-on password, fingerprint scan, or
token (USB device)
• Full or partial disk encryption with secure hibernation
• Advanced encryption algorithms
• Key management function
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
70
protected website for classroom use.
Understanding Whole Disk Encryption (3
of 3)
• Whole disk encryption tools encrypt each sector of a drive separately
• Many of these tools encrypt the drive’s boot sector
• To prevent any efforts to bypass the secured drive’s partition
• To examine an encrypted drive, decrypt it first
• Run a vendor-specific program to decrypt the drive
• Many vendors use a bootable CD or USB drive that prompts for a one-time
passphrase
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
71
protected website for classroom use.
Examining Microsoft BitLocker
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
73
protected website for classroom use.
BitLocker™ Drive Encryption
BitLocker™ Drive Encryption gives you improved data
protection on your Windows Vista and Windows Server
codenamed “Longhorn” systems
Notebooks – Often stolen, easily lost in transit
Desktops – Often stolen, difficult to safely decommission
Servers – High value targets, often kept in insecure locations
All three can contain very sensitive IP and customer data
Designed to provide a transparent user experience that
requires little to no interaction on a protected system
Prevents thieves from using another OS or software hacking
tool to break OS file and system protections
Prevents offline viewing of user data and OS files
Provides enhanced data protection and boot validation
through use of a Trusted Platform Module (TPM) v1.2
TPM Services Architecture
(Simplified)
Feature Map
TPM Admin Third Party
Tools Applications
Windows Vista BitLocker™
Enterprise
Ultimate
TPM WMI Provider TSS*
TPM Driver
Trusted Platform
Module (TPM)
*TCG Software Stack
What Is A Trusted Platform
Module (TPM)?
Smartcard-like module on the motherboard
Protects secrets
Performs cryptographic functions
RSA, SHA-1, RNG
Meets encryption export requirements
Can create, store and manage keys
Provides a unique Endorsement Key (EK)
Provides a unique Storage Root Key (SRK) TPM 1.2 spec:
www.trustedcomputinggroup.org
Performs digital signature operations
Holds Platform Measurements (hashes)
Anchors chain of trust for keys
and credentials
Protects itself against attacks
BitLocker™ Drive Encryption Architecture
Static Root of Trust Measurement of boot components
Disk Layout And Key Storage
OS Volume Contains Where’s the Encryption Key?
Encrypted OS 1. SRK (Storage Root Key)
Encrypted Page File contained in TPM
3
OS Volume
2
FV 1
SRK
System EK
System Volume Contains:
MBR, Boot manager, Boot Utilities
(Unencrypted, small)
Spectrum of Protection
BitLocker™ offers a spectrum of
TPM Only
“What it is”
TPM + PIN
TPM + USB USB Only “What it is + what
“What it is + what “What you have” you know”
you have” Protects Against: Protects Against:
Protects Against: Protects Against: Many HW attacks Most SW attacks
HW attacks HW attacks Vulnerable To: Vulnerable To:
Vulnerable To: Vulnerable To: Hardware attacks Hardware attacks
Stolen USB key Stolen USB key
No boot validation User Must: User Must:
User Must: User Must: Enter PIN to boot N/A
Protect USB key Protect USB key No user impact
Examining Third-Party Disk Encryption
Tools
• Some available third-party WDE utilities:
• Endpoint Encryption
• Voltage SecureFile
• Jetico BestCrypt Volume Encryption
© 2019 Cengage. All Rights Reserved. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a certain product or service or otherwise on a password-
81
protected website for classroom use.