Windows is a proprietary operating system developed by Microsoft, first launched in 1985. It has since evolved into a dominant platform powering:

  • Personal computers (desktops, laptops, tablets)
  • Enterprise endpoints (workstations and domain-joined machines)
  • Servers running Microsoft technologies (Exchange, SQL Server, Active Directory)
  • Embedded systems (e.g., POS terminals, ATMs)

Unlike Linux — which is open-source, community-driven, and Unix-based — Windows is closed-source and heavily reliant on its own subsystems, drivers, and services.

Most enterprise environments run on Windows. That means:

  • You’ll spend most of your time on Windows boxes — either attacking them, moving through them, or abusing their misconfigurations.
  • Privilege escalation paths are unique to Windows — involving the Registry, services, access tokens, and user rights assignments.
  • Understanding the OS is critical for:
    • Spotting misconfigurations
    • Knowing where credentials are stored
    • Recognizing high-value targets like SYSTEM, LSASS, SAM, and the Registry
    • Navigating Active Directory environments

You won’t just “use” Windows — you’ll need to know how it ticks. That includes:

  • How users log in (locally vs. domain)
  • How permissions are enforced
  • How services run and interact with the OS
  • What a “normal” Windows environment looks like (so you can detect and abuse the abnormal)

You’re not learning Windows like a helpdesk technician — you’re learning it like a cyber-surgeon: to dissect, probe, and manipulate the system in stealthy, precise ways.

Awesome — here’s the refined and expanded Windows Architecture section:

Understanding how Windows is structured under the hood helps you identify which components to target or abuse during privilege escalation. The OS is divided into User Mode and Kernel Mode, with each handling different layers of execution and security.

ModeDescription
User ModeWhere applications and most software run. Processes are sandboxed and can’t directly access hardware or kernel memory.
Kernel ModeFull system access. Handles low-level operations like device drivers, memory management, and process scheduling. SYSTEM-level processes operate here.

If you can execute code in Kernel Mode, you can own the entire system. As a pentester, you’re usually in User Mode, trying to work your way toward Kernel-level access or SYSTEM privileges.

ComponentRole
Windows KernelManages low-level tasks like thread scheduling, memory access, and device I/O.
Executive ServicesHigh-level kernel modules that handle security, process management, and drivers.
HAL (Hardware Abstraction Layer)Allows Windows to run on many types of hardware by abstracting the hardware layer.
Win32 APIA massive API used by applications to interact with the OS — from GUI rendering to file access.
  • Services and system processes (like lsass.exe, winlogon.exe) often run in Kernel Mode or with SYSTEM privileges.
  • Understanding process isolation helps you avoid detection and escalation errors.
  • Knowing how the OS switches between User Mode and Kernel Mode (via syscalls and API calls) helps you recognize privilege boundaries — and how to cross them.
  • Administrator = High-level user in User Mode. Can install apps, create users, configure settings — but still subject to UAC and restricted access to certain protected processes.
  • SYSTEM = Kernel-level account. Can access every process, including credential stores like LSASS.

Pentesting Windows without understanding this architecture is like trying to pick a lock without knowing how tumblers work — you might get lucky, but you’ll never be precise.

Let’s level up your understanding of the Windows file system.


The file system is where everything lives — executables, documents, configuration files, registry hives, scripts, tools, credentials. If you’re a pentester, knowing your way around this structure is crucial.

NTFS (New Technology File System) is the default file system used by modern Windows systems. It supports:

  • File and folder permissions (via ACLs)
  • File compression
  • Encryption (EFS)
  • Disk quotas
  • Journaling (for recovery after crashes)

Why does this matter to you?

Because misconfigured permissions, encrypted content, or leftover shadow copies are often targets during exploitation.

PathDescription
C:\Root of the system drive
C:\Windows\Core OS files — kernels, services, drivers
C:\Windows\System32\Critical executables, DLLs, and tools (like cmd.exe, reg.exe, net.exe)
C:\Program Files\64-bit installed applications
C:\Program Files (x86)\32-bit applications on 64-bit systems
C:\Users\User profiles (Documents, Desktop, etc.)
C:\Users\Public\Shared directory — often world-readable
%TEMP% / C:\Temp\Temporary files — great for payloads, dumps
%APPDATA%Per-user config and tokens — often juicy
%SystemRoot%Usually points to C:\Windows
%PATH%A list of folders searched when running commands
  • Check Downloads, Documents, Desktop, and %APPDATA% for sensitive files or misconfigured credentials.
  • Many applications store API keys, tokens, or passwords in %APPDATA% or .config files.
  • Dropping payloads in writable folders in %PATH% can enable path hijacking — a form of persistence or escalation.
  • Misconfigured permissions on C:\Program Files\SomeApp\ can allow DLL or binary hijacking.
dir /a /s C:\Users\victim\AppData\       :: Lists **all files (including hidden/system)** in AppData and subdirectories — great for finding saved credentials, config files, or cached data.
icacls "C:\Program Files\App"           :: Shows **permissions on the App folder** — useful to check for misconfigurations like write access for non-admin users (potential privilege escalation).
echo %APPDATA%                          :: Prints the **current user's AppData\Roaming path** — a common location for malware persistence or saved credentials.

Understanding NTFS paths and permission structures makes it easier to escalate privileges, hide in plain sight, or uncover sensitive data that was never meant to be public.


The Windows Registry is a massive, hierarchical database used to store settings, configurations, and options for the operating system, users, services, hardware, and applications.

Think of it as the control panel for the entire OS — just hidden beneath the surface.

The Registry is divided into five root “hives”:

HiveDescription
HKEY_LOCAL_MACHINE (HKLM)System-wide settings — applies to all users
HKEY_CURRENT_USER (HKCU)Settings for the currently logged-in user
HKEY_CLASSES_ROOT (HKCR)File extension and COM object associations
HKEY_USERSSettings for every user profile on the system
HKEY_CURRENT_CONFIGActive hardware profile in use

Each hive contains keys (folders), values (settings), and data types (REG_SZ, REG_DWORD, etc.).

PathWhy it Matters
HKLM\Software\Microsoft\Windows\CurrentVersion\RunAdd persistence (startup programs run at boot)
HKCU\...\RunStartup for specific user — often used in malware
HKLM\SYSTEM\CurrentControlSet\ServicesDefines Windows services — used for service hijacking
HKLM\SAM & HKLM\SYSTEMUsed together to extract and crack password hashes
HKLM\SECURITYStores LSA secrets (e.g., cached credentials, service passwords)
  • Persistence: Write a reverse shell to a Run key = code runs at every login.
  • Privilege Escalation: Hijack services defined in the Registry to run your binary.
  • Credential Access: Extract cleartext or hashed passwords from SAM, SYSTEM, and SECURITY hives.
  • Recon: Learn what software is installed, who logged in recently, or what the system is used for.
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKLM\SYSTEM\CurrentControlSet\Services
reg save HKLM\SAM sam.save
reg save HKLM\SYSTEM system.save

Use tools like RegEdit, reg.exe, or PowerShell to explore and manipulate the Registry.

Misconfigured permissions on keys (e.g., allowing “Users” to write to a SYSTEM-level key) = escalation opportunity.

Check with:

accesschk.exe -w -s HKLM\SYSTEM\CurrentControlSet\Services

The Registry is not just configuration — it’s a battlefield of persistence, privilege escalation, and credential access. Get comfortable with it, and you’ll unlock a hidden layer of the Windows OS.


Windows is a multi-user operating system. It’s built to support many users — each with different levels of access, and specific rights controlled through groups and permissions.

As a pentester, your job is to identify who you are, who has power, and how to abuse the gap between them.

TypeDescription
Standard UserLimited permissions. Can’t install software or modify system settings. Your starting point in many CTFs or real-world breaches.
AdministratorFull user-mode privileges. Can install software, create users, and modify many system settings. Still restricted by UAC.
SYSTEMKernel-level access. Higher than Administrator. Can access any file, process, or setting. It’s the “God mode” of Windows.

Users are assigned to groups, which control their access.

GroupPurpose
AdministratorsFull system access (often targeted for privesc)
UsersDefault group with limited rights
Power UsersLegacy group with some admin-like capabilities
Remote Desktop UsersCan log in via RDP
GuestsVery restricted — often disabled

Check group memberships:

whoami /groups
net user <username>
net localgroup administrators

Every file, folder, and registry key in Windows has an ACL — a list of users/groups and what actions they can perform (read, write, execute, delete).

Key permissions to watch:

  • WRITE_DAC → Can change permissions
  • WRITE_OWNER → Can take ownership
  • FULL CONTROL → Can do anything (instant red flag)

Check with:

icacls "C:\targetfolder"
  • Find users in the wrong group (e.g., a standard user in “Power Users”).
  • Look for writable objects owned by SYSTEM/admin.
  • Escalate from a low-priv account to a higher one via misconfigured ACLs.

If you understand how Windows decides “who can do what,” you can redefine the rules — and escalate privileges with precision.


Every application, background task, and core function in Windows runs as a process. These processes are governed by privileges, tied to users, and managed by the operating system.

Some of these processes are interactive apps (like Chrome or Explorer), while others are background services that run with high privileges. Understanding the difference — and how to abuse it — is essential for privilege escalation.

A process is an instance of a running program. Each process has:

  • A PID (Process ID)
  • A user context (which user started it)
  • A privilege level (standard, admin, SYSTEM)
  • A set of loaded DLLs and handles

Check running processes with CMD:

tasklist /v

or Powershell:

Get-Process

Use Process Explorer from Sysinternals for detailed inspection.


A service is a special kind of process that:

  • Runs in the background
  • Starts at boot (or on-demand)
  • Often runs with SYSTEM privileges
  • Is managed by the Service Control Manager (SCM)

List all services:

sc query

Check details for a specific one:

sc qc <ServiceName>

Many privilege escalation techniques rely on misconfigured services. Look out for:

MisconfigDescription
Unquoted pathsNo quotes + space in path = executable hijack opportunity
Writable binariesCan replace service binary with your payload
Config change rightsCan point service to a new binary
DLL loadingService loads DLLs from writable paths (DLL hijack)
Running as SYSTEMHigh-value target: escalate if you can control it
wmic service get name,displayname,pathname,startmode
accesschk.exe -uwcqv "Authenticated Users" *

If your user can write to the service binary or path — it’s game on.

  • SYSTEM-owned services are gold mines — if you can hijack one, you’re in.
  • Some services restart automatically — so you don’t even need to trigger them.
  • Misconfigured third-party apps (like backup agents, updaters) are often the weakest link.

These aren’t the main categories taught in IT textbooks — but they’re critical for real-world privilege escalation, post-exploitation, and evasion in Windows environments.

What it is:
A security feature that limits application privileges — even for admin users — unless explicitly allowed.

Why it matters:
Even if you’re in the Administrators group, UAC may block your code from executing with full privileges.

Pentester Angle:
UAC can often be bypassed via:

  • Auto-elevated binaries (like fodhelper.exe)
  • Registry hijacks
  • Tools like UACMe

Check UAC settings:

reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

These hold hashed user credentials and decryption keys. Together, they allow tools like Mimikatz or secretsdump.py to extract passwords.

Paths:

C:\Windows\System32\config\SAM
C:\Windows\System32\config\SYSTEM

You must be SYSTEM or booted into another OS to copy them:

reg save HKLM\SAM sam.save
reg save HKLM\SYSTEM system.save

Logs are stored in:

C:\Windows\System32\winevt\Logs\

They contain information on:

  • Logon events
  • Software installation
  • Failed privilege escalation attempts
  • Scheduled tasks and service starts

Why it matters:

  • Helps with recon
  • Can track lateral movement
  • Can be cleared (carefully) to cover tracks

Even without dropping external tools, you can gather tons of intel with built-ins:

whoami                   :: Shows the **current user context** — helpful for verifying privilege level (e.g., low-priv or SYSTEM).
systeminfo               :: Displays **detailed OS info** — patch level, architecture, domain, and hotfixes (useful for vulnerability assessment).
tasklist                 :: Lists **all running processes** — helps identify AV software, potential targets, or high-privilege processes to hijack.
net user                 :: Lists **all local user accounts** — used to spot hidden accounts or potential escalation targets.
net localgroup           :: Shows **local groups and members** — useful for identifying who has admin or special rights.
ipconfig                 :: Reveals **network configuration** — IP address, default gateway, and possible internal ranges for lateral movement.
netstat                  :: Displays **network connections and listening ports** — great for spotting services, tunnels, or C2 channels.

Useful for understanding the user context, running software, network interfaces, and local user groups.

Important files like SAM, SYSTEM, and others may be hidden or protected.

Use these tools:

  • takeown: Take ownership
  • icacls: Change permissions
  • Boot into recovery or mount the drive from another OS to bypass file protection

Modern Windows has solid built-in security. Here’s what to watch for:

FeatureDescription
Windows DefenderBuilt-in antivirus/EDR
Credential GuardProtects LSASS and credentials from dumping
BitLockerDisk encryption — limits offline access
SmartScreen / ASLR / DEPPrevent basic exploits or unsigned binaries from running

Tip: You may need bypass techniques or non-suspicious payloads to get past these.

Most enterprise Windows machines are domain-joined. This means:

  • Centralized user management via Domain Controllers
  • Authentication with Kerberos
  • Policies pushed through Group Policy (GPO)

Why it matters:
Once inside, you’re playing in a much bigger and riskier arena — where one misstep can alert the entire network.

(We’ll cover Active Directory in detail later.)


You’ve learned the parts — now let’s walk through how Windows functions as a whole system, from boot to shutdown. Understanding these workflows helps you see where privilege escalation opportunities appear in real-time.

  • The system powers on and runs the bootloader (like BOOTMGR).
  • Windows loads the kernel, essential drivers, and system services.
  • The GUI (explorer.exe) launches for user interaction.
  • Services run in the background, some with SYSTEM privileges.
  • The Registry provides configuration — it dictates which services start and how.

🔎 Privesc angle: Misconfigured boot services or autoruns can be hijacked before a user even logs in.

  • You log in with a local or domain account.
  • Credentials are checked against the SAM (local) or Active Directory (domain).
  • If successful, Windows loads:
    • Your profile from C:\Users\YourName
    • Your HKCU Registry hive
    • Startup apps and Registry autorun keys

🔎 Privesc angle: Autoruns and profile-based persistence live here. Also check %APPDATA% and Startup folders for backdoors.


  • Every app becomes a process running in User Mode.
  • It interacts with the system using the Win32 API.
  • Permissions and token privileges determine what it can do.

🔎 Privesc angle: Processes with unnecessary permissions or high-integrity levels are great escalation targets.

  • When an app reads or writes files, Windows checks ACLs (NTFS permissions).
  • If access is denied, UAC may prompt for elevation.

🔎 Privesc angle: If a folder or file is writable by a low-privileged user, and it’s executed by a SYSTEM-level process — it’s exploitable.


  • Services run persistently, often under SYSTEM.
  • Scheduled tasks can run scripts as SYSTEM or Admin — if misconfigured.

🔎 Privesc angle: Hijack unquoted service paths, DLL loads, or scheduled task scripts.

  • Windows constantly logs:
    • Logons
    • Process starts
    • Security events
  • Security features like Defender, Credential Guard, and SmartScreen protect the system.

🔎 Privesc angle: Logs can help you identify escalation paths — or be wiped to cover tracks. Security features may need bypassing.

  • Windows uses:
    • DNS to resolve domains
    • TCP/IP to connect over the network
    • Windows Firewall to enforce traffic rules
  • Remote features like WinRM, RDP, and SMB provide remote access

🔎 Privesc angle: Remote management interfaces are often overlooked and may let you reuse stored credentials for lateral movement.

Understanding Windows internals gives you:

✅ Awareness of how the system operates
✅ Clarity on why a misconfig matters
✅ Insight into how to escalate, persist, and pivot like a pro


Windows may seem familiar on the surface, but under the hood, it’s a complex operating system packed with moving parts — each of which can open a door for privilege escalation if misconfigured.

As a pentester, you don’t just need to use Windows — you need to understand it deeply:

  • How the OS starts and what controls execution
  • Where users and services live — and how they’re isolated or not
  • What permissions matter — and how to bypass or exploit them
  • Where sensitive files, tokens, and credentials are stored
  • How the Registry, file system, and service manager all tie together

This knowledge transforms you from a tool-user into a system operator — someone who can analyze, exploit, and own a Windows box with purpose and precision.

Scroll to Top