NTFS Flashcards

1
Q

Explain how to write a file in NTFS

A
  • Read $BOOT to find location for $MFT
  • read first entry of $MFT to find $MFT layout
  • Allocate $MFT entry for new file
  • Initialize $STANDARD_INFORMATION attribute
  • Find free clusters in $BITMAP
  • Set cluster status to 1 (allocated)
  • Write contents to clusters and update $DATA attribute in $MFT
  • Read the root directory, and find dir1/
  • Read $INDEX_ROOT attribute for dir1/ and determine where file1.txt should go
  • Create new index entry, Resort index tree
    Enter all steps in $LogFile (as each one is taken)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Explain how to Delete a file in NTFS

A
  • Read volume boot record to locate $MFT
  • Determine layout of $MFT
  • Locate dir1 in the Root Directory
  • Find file1.txt in dir1’s $INDEX_ROOT entry
  • Remove filename from index, resort index.
  • Unallocate the $MFT entry
  • Set $Bitmap entries to 0
  • Record steps in $Logfile as each is taken
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is NTFS

A

NTFS - New Technology File System

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the files that make up an NTFS File System

A
  • MFT (Master file table)
  • MFTMirror (copy of MFT)
  • LogFile (logs all metadata file changes)
  • Volume (information about file system)
  • . (information on root directory)
  • Bitmap (1 bit for each cluster showing its allocation status)
  • Boot (similar to FAT boot sector)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Where is $BOOT stored

A

$BOOT is stored in same location for every NTFS volume (Sector 0)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What endian are multi bytes stored in for NTFS

A

All multibyte structures are stored in LE for NTFS unless otherwise states

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain how to identify $MFT starting location

A

Bytes per Sector / Sector Size: 0x0002 (LE) -> 0x0200 = 512 bytes per sector
Number of Sectors per Cluster = 0x08 (BE) -> 8 = 8 sectors per cluster
Cluster size = 512*8 = 4,096 bytes

Starting Cluster of MFT = 0x0400 0000 0000 0000 (LE) = 4
First cluster of MFT is at cluster 4

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the $MFT file

A

$MFT - master file table
- Similar to FAT Directory entries
- Contains one file record entry for each file
- Each file entry is usually 1024 bytes
- File Record contains header, and then attributes (metadata)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Explain how to identify the number of attributes for a file

A

File Record Entry Example:

File Signature: 0x4649 = FILE0
Offset to first attribute: 0x3800 (LE) = 0x0038 (number of bytes in hex of header)
Allocation status: 0x0100 (LE) = 0x01 = Allocated
Number of Attributes: 0400 (LE) = 0x04 = 4 attributes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the two types of attributes in NTFS

A
  • Resident: data is stored in attribute
  • Non-Resident: contains pointer to data (using run lists)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is a run list

A

tells how many clusters are in it and where they are located (by finding two byes at 0x20 in Non-Resident Attribute)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Interpret this run list:

21 03 03 22

A

21 - add the nibbles of the first byte to get the number of bytes in this portion
- 2 , 1 = nibbles
- 2+1 = 3
- 3 is the number of bytes of run list

The high order nibble(2) = number of bytes in starting cluster
Starting cluster = 03 22 -> (LE) -> 2203 -> 8707(decimal)

Low order nibble (1) = number of bytes in run list length

Number of clusters (length of run list) = 03

Run list contains 3 clusters beginning at 8707
- Would be 8707, 8708, 8709 in total
- Can check with istat ntfs.dd 65

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What information is stored in $Standard_Information

A

-Creation: File creation time
- Modification: File content modification time
- Change: File metadata modification time
- Access: File access / read time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly