The Mindset
The Windows file system isn’t just trivia — it’s a map. As a pentester you care about:- Where can I write? —
C:\ProgramData,C:\Temp, userAppData— writable spots for payloads and hijacks - Where do credentials hide? —
AppData, registry hives, config files - Where does the OS keep its core files? —
System32,WinSxS— for DLL hijacking and binary replacement
The Root Directory
In Windows the root directory is a drive letter, usuallyC:\ (the boot partition where the OS is installed). Other drives get other letters — D:, E:, and so on.
The key directories on the boot partition:
AppData — Where User Secrets Live
Each user profile has a hiddenAppData folder with three subfolders:
AppData is where applications stash saved passwords, session tokens, and config files — always worth digging through during pillaging.
File Systems
Windows supports several file systems. Three are relevant today: FAT32, exFAT, and NTFS. NTFS is the one that matters most for pentesting because it carries the permission model.
Why NTFS matters to you:
- It enforces granular file and folder permissions (the ACLs you analyze with
icacls) - It has journaling — file additions, modifications, and deletions are logged
- Permissions inherit from parent folders by default, which is exactly how the writable-script misconfigs happen (a loose permission high up gets inherited all the way down)
Exploring the File System — Command Line
dir — List Directory Contents
/a flag shows hidden and system entries you’d otherwise miss — including things like $Recycle.Bin, pagefile.sys, and hidden config folders.
tree — Visualize Directory Structure
tree is useful for quickly understanding how an application or directory is laid out without clicking through it.
PowerShell Equivalents
Hunting Interesting Locations
A quick tour of where to look once you’ve got a shell:Next: NTFS Permissions & icacls — reading ACLs, spotting writable misconfigurations, and turning them into escalation.