DFOR510 Week03 Drives FileSys Windows
DFOR510 Week03 Drives FileSys Windows
2
3
LECTURE 3
❑ File systems
❑ Understand basic anatomy of a file system and what it is
❑ Understand file system structure primarily associated with Windows OSs
7
http://www.tldp.org/LDP/sag/html/hard-disk.html
https://www.extremetech.com/extreme/210492-extremetech-explains-how-do-ssds-work
https://www.cactus-tech.com/assets/images/1/Detailed-SSD-Diagram-b8cdb421.png
8
SSD NAND Chips
Controller
9
https://www.cactus-tech.com/resources/blog/details/solid-state-drive-primer-7-controller-architecture-basic-overview
1. Power-On-Self-Test (POST) – checks basic system devices are functioning
2. BIOS* determines boot device (e.g. hard drive, USB, network, etc.)
3. First physical sector from the boot device (in 2) is loaded into memory
▪ Control transfers to OS, starting at this location
Designed for Old systems (1984) Old systems (1996) New devices (2006)
but more storage Flash Drives, SD cards
Use Today IoT & SD cards IoT & SD cards Removable devices, cameras
16
Source:
https://social.technet.microsoft.com/wiki/contents/articles/67
71.the-fat-file-system.aspx
* Navigate here for important information – the BPB 17
Finding the first cluster of content:
▪ Prepend the MSB to the LSB, where:
▪ MSB (Most Significant Bit) – always 0 for FAT
12/16 systems
▪ LSB (Least Significant Bit)
Example:
MSB = 0x2B; LSB = 0x56.
Therefore 1st data cluster is located at:
0x2B 56 = 11,094
https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Fat32_structure.svg/1200px-Fat32_structure.svg.png 18
Source: https://social.technet.microsoft.com/wiki/contents/articles/6771.the-fat-file-system.aspx
Source: https://social.technet.microsoft.com/wiki/contents/articles/6771.the-
fat-file-system.aspx https://upload.wikimedia.org/wikipedia/commons/thumb/6/60/Fat32_structure.svg/1200px-Fat32_structure.svg.png 19
▪ Supports Encrypted File System (EFS)
▪ Master File Table (MFT)
▪ Contains hidden system files
▪ Can contain small files (512 bytes or smaller) – resident
files
▪ MFT slack might contain evidence
▪ Read-only for Mac & Linux (some distros) OSs
20
* Byte Field Length Field Name
Offset
* Source:
0x0B 25 bytes BPB
https://technet.microsoft.com/en-
us/library/cc781134(v=ws.10).aspx#w2k3tr_ntfs_how_rxtc 0x24 48 bytes Extended BPB
Go here for the BPB break down:
https://www.ntfs.com/ntfs-partition-boot-sector.htm 0x54 426 bytes Boostrap Code
* Source:
https://technet.microsoft.com/en-
us/library/cc781134(v=ws.10).aspx#w2k3tr_ntfs_how_rxtc
24
http://kb.digital-detective.net/download/attachments/1343960/Cluster_and_RAM_Slack.png?version=1&modificationDate=1322147016032&api=v2
FAT NTFS
▪ 0xE5 replaces first letter of file ▪ Filename is changed (e.g. $D03)
name in root directory and moved to Recycle Bin
▪ Recycle Bin will have folders for
each SID (i.e. user ID numbers)
25
http://www.flexhex.com/docs/articles/img/file.png 26
QUICK CHECK 2
1. What is the primary purpose of a file system?
2. Name the mapping scheme for FAT file system? NTFS?
a. Where are the primary and secondary locations of these file system
(mapping) files/information
3. What happens to the file content when a file is deleted:
a. FAT?
b. NTFS?
32
These files populate the Windows Registry Root Keys:
Filename & Path Description
Windows\system32\config\Default.dat Contains the computer’s system settings
Windows\system32\config\SAM.dat Holds user account management and security settings
Windows\system32\config\Security.dat Stores computer’s security settings
Windows\system32\config\Software.dat Has installed programs’ settings and associated usernames
and passwords
Windows\system32\config\System.dat Contains Additional computer system settings
Windows\system32\config\systemprofile Has additional NTUSER information
33
Filename & Path Description
Users\user-account\Ntuser.dat User-protected storage area; contains the list of most recently
used files and desktop configuration settings (shellbags)
C:\Users\user- More user configuration data (Shellbags)
account\AppData\Local\Microsoft\Windows\
UsrClass
34
Hives
Values – name and data
Keys
Subkeys
Branch
NOTE:
This is a snapshot of an active (live) registry.
In a static (non-active) registry, there will NOT be a
HKEY_CURRENT_USER hive.
35
▪ Finding Security IDentifiers (SIDs):
▪ HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\ProfileList
▪ Every account has a unique SID (S-1-5-xxxxxxx – 50x, S-1-5-xxxxx-100x)
▪ Well-known SIDs can be found here (also located in Supplemental Material)
▪ Time Zone
▪ Analyzing non-active image, determine which ControlSet (001 or 002) to use:
▪ HKEY_LOCAL_MACHINE\SYSTEM \ControlSet00x\TimeZoneInformation
▪ HKEY_LOCAL_MACHINE\SYSTEM \Select\Current
38
▪ SAM file
▪ Contains user’s password hash
▪ Use in tools to crack passwords (e.g. OrphCrack, Cain and Abel, John the
Ripper, etc.)
▪ Most Recently Used… (filenames, commands, etc.)
▪ HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
(Ntuser.dat)
▪ Checks what user executed from the Run (CMD) window (if enabled)
▪ Typed URLS
▪ HKCU\Software\Microsoft\Internet Explorer\TypedURLs (Ntuser.dat)
▪ Numbered from ‘url1 (most recently typed) – url25’
39
40
▪ Prefetch (Win XP) → Superfetch (Win Vista)→ SysMain (Win 10)
▪ Purpose: optimize OS by pre-loading application in RAM (caching
app’s code)
▪ Limited storage:
▪ Win XP & 7 – 128 pf
▪ Win 8 & 10 – 1024 pf
Are Prefetch/Superfetch files
▪ Naming convention: generated?
0 = disabled (no prefetch files)
▪ executable_name.pf
41
▪ Populated by: C:\Windows\Prefetch
▪ HKLM\SYSTEM\CurrentControlSet\Control\Session\Manager\
Memory Management\PrefetchParameters
▪ Information contained:
▪ Time of last execution, last modified (-10 seconds)
▪ Number of runs
▪ Device & file handles used by program (.dll)
▪ Time .pf was first created (- 10seconds)
▪ Win 8 & 10 – contains last 8 times of execution
42
2 3 4 5
1
48
Download (into the SAME directory) nps-2009-jean.e01 and nps-2009-jean.e02
from blackboard or DigitalCorpora.
In Sleuthkit Autopsy (v4.19.1*) ▪ Select the .e01 file → Next
▪ “New Case File” → Fill in Case
Name → “Browse” to directory ▪ Deselect:
where .e01 files are located → ▪ Virtual Machine Extractor,
“Next”
▪ Android Analyzer,
▪ Enter “Case Number” →
▪ DJI Drone Analyzer,
▪ Leave Host info as is
▪ iOS Analyzer
▪ Select “Disk Image or VM file” →
“Next” ▪ Click “Next”
▪ Browse to .e01 and .e02 files ▪ Wait for Autopsy to finish parsing
and analyzing image
* - indicates version I will be using 49
Download (in the SAME directory) nps-2009-jean.e01 and nps-2009-jean.e02 from blackboard or
Again, using nps-2009-jean.e01 and nps-2009-jean.e02
DigitalCorpora.
52
Textbooks:
▪ Carrier, B. (2005). File system forensic analysis. Upper Saddle River, NJ: Addison-Wesely
▪ Anson, S., Bunting, S., Johnson, R., & Pearson, S. (2012). Mastering Windows network forensics and
investigation. Hoboken, NJ: John Wiley & Sons, Inc
Bootstrap
https://neosmart.net/wiki/mbr-boot-process
https://www.marksei.com/bios-uefi-explained/
https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf
http://osxdaily.com/2018/08/25/visualizing-mac-startup-boot-process/
https://www.thegeekstuff.com/2011/02/linux-boot-process
https://www.techwalla.com/articles/the-five-steps-of-the-boot-sequence
https://www.lifewire.com/what-is-a-master-boot-record-mbr-2625936
FAT
http://www.forensicswiki.org/wiki/FAT
https://www.youtube.com/watch?v=V2Gxqv3bJCk
https://social.technet.microsoft.com/wiki/contents/articles/6771.the-fat-file-system.aspx
53
NTFS
https://technet.microsoft.com/en-us/library/cc781134(v=ws.10).aspx#w2k3tr_ntfs_how_rxtc
https://www.youtube.com/watch?v=xW5UwDztkX4 (22 min)
https://social.technet.microsoft.com/wiki/contents/articles/5375.windows-file-systems.aspx#FAT
Windows Registries
https://docs.microsoft.com/en-us/windows/win32/sysinfo/registry-hives
https://social.technet.microsoft.com/wiki/contents/articles/4557.windows-registry.aspx
APFS
https://www.lifewire.com/apple-apfs-file-system-4117093
https://developer.apple.com/documentation/foundation/file_system/about_apple_file_system
https://www.youtube.com/watch?v=9I7fg930Deg
https://developer.apple.com/support/downloads/Apple-File-System-Reference.pdf
54
Windows Registry Artifacts
https://docs.Microsoft.com
https://www.sans.org/security-resources/posters/windows-forensic-analysis/170/download (Cheat sheet)
https://www.digitalforensics.com/blog/an-overview-of-web-browser-forensics/ (Browser)
https://medium.com/@ismailtasdelen/windows-lnk-file-analysis-in-forensic-it-reviews-75b3dfd49f36 (.lnk Files)
Prefetch/Superfetch/SysMain
https://helpdeskgeek.com/help-desk/delete-disable-windows-prefetch/
https://winbuzzer.com/2020/03/14/windows-10-how-to-disable-enable-prefetch-and-superfetch-xcxwbt/
Tools
Prefetch analysis tools
Windows: https://www.nirsoft.net/utils/win_prefetch_view.html
*nix & Windows: https://tzworks.net/download_links.php
55
56
57
Source: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2003/cc781134(v=ws.10)?redirectedfrom=MSDN#w2k3tr_ntfs_how_rxtc 58