Skip to content

Lab 04 — Windows Privilege Escalation

Welcome to Lab 04 — Windows Privilege Escalation.

In the previous lab, you learned how to assess privilege boundaries on Linux.

Now you will apply the same methodology to a Windows host.

The central question is:

I HAVE A LOW-PRIVILEGED
WINDOWS ACCOUNT.
WHAT SECURITY WEAKNESSES
COULD ALLOW THIS ACCOUNT
TO GAIN MORE AUTHORITY?

A professional Windows privilege escalation assessment should examine:

IDENTITY
GROUPS
USER RIGHTS
LOCAL ADMINISTRATION
SERVICES
SCHEDULED TASKS
FILESYSTEM
REGISTRY
APPLICATIONS
CREDENTIAL EXPOSURE
UAC
TOKENS
SECURITY CONTROLS
PRIVILEGE PATH

The objective is not simply to gain Administrator or SYSTEM access.

You should be able to explain:

Why the Boundary Failed
Which Permission Enabled It
Which Privileged Component Trusted It
What the Business Impact Is
How the Organization Should Fix It

Perform every activity only inside the GoHackersCloud lab, a Windows system you own, a purpose-built vulnerable training environment, or another system where you have explicit authorization.

Lab: 04 — Windows Privilege Escalation
Track: OffSec Labs
Difficulty: Intermediate → Advanced
Estimated Time: 3–5 Hours
Environment: Isolated Windows Training VM
Primary Role: Penetration Tester / Security Consultant
Focus: Local Windows Privilege Escalation
Starting Position: Authorized Standard User Session
Target Privilege: Local Administrator / SYSTEM in the training lab
Deliverable: Windows Privilege Escalation Assessment Report

During an authorized internal penetration test, your team has obtained a standard Windows account on:

APPWIN01

Example:

Hostname:
APPWIN01
Operating System:
Windows Server / Windows Workstation
Current User:
NOVATECH\analyst
Privilege:
Standard User

The organization wants to know whether a compromised ordinary user could gain additional local privileges through insecure Windows configuration.

Your mission is to assess:

Current Identity
Group Membership
Token Privileges
Local Administrators
Services
Scheduled Tasks
Filesystem Permissions
Registry Permissions
Application Configuration
Stored Credentials
Environment Configuration
UAC
Security Controls

and identify any unintended privilege path.

PENTEST VM
|
|
v
+-------------+
| APPWIN01 |
|-------------|
| Windows |
| Application |
| Server |
+-------------+
|
|
Authorized User
|
v
+-------------+
| analyst |
|-------------|
| Standard |
| User |
+-------------+
|
?
|
v
+-------------+
| Administrator|
| / SYSTEM |
+-------------+

Your job is to determine whether a legitimate path exists between:

analyst

and:

Administrator / SYSTEM

By completing this lab, you should be able to:

  • Establish the current Windows security context
  • Review local and domain group membership
  • Understand Windows access tokens
  • Identify sensitive token privileges
  • Review local administrator assignments
  • Analyze Windows services
  • Review scheduled tasks
  • Inspect filesystem permissions
  • Inspect registry permissions
  • Review application configuration
  • Identify credential exposure
  • Understand UAC
  • Review environment variables
  • Identify writable privileged resources
  • Build a privilege escalation path
  • Validate findings safely
  • Recommend remediation
  • Produce professional evidence

You should understand:

Windows Users and Groups
NTFS Permissions
Windows Services
Task Scheduler
Registry
PowerShell
Command Prompt
UAC
Processes
Access Tokens
Active Directory Basics

Avoid:

Run Tool
Try Every Exploit
Hope for SYSTEM

Instead:

IDENTIFY
ENUMERATE
UNDERSTAND
CORRELATE
HYPOTHESIZE
VALIDATE
DOCUMENT
REMEDIATE

Record:

Assessment:
Target Host:
Authorized Account:
Allowed Techniques:
Restricted Techniques:
Testing Window:
Evidence Location:
Cleanup Requirements:

Example:

Target:
APPWIN01
Starting Identity:
NOVATECH\analyst
Objective:
Assess local Windows privilege boundaries.
Environment:
GoHackersCloud Training Lab
Destructive Testing:
Not Permitted

Phase 02 — Create the Evidence Workspace

Section titled “Phase 02 — Create the Evidence Workspace”

From PowerShell:

Terminal window
New-Item -ItemType Directory -Path C:\Temp\WinPrivEscLab -Force

Create a structure:

Terminal window
$folders = @(
"Identity",
"Groups",
"Privileges",
"Services",
"Tasks",
"Filesystem",
"Registry",
"Applications",
"Credentials",
"Evidence",
"Report"
)
foreach ($folder in $folders) {
New-Item -ItemType Directory `
-Path "C:\Temp\WinPrivEscLab\$folder" `
-Force | Out-Null
}

For every important observation record:

Timestamp:
Current User:
Host:
Resource:
Command / Method:
Observation:
Security Significance:
Potential Privilege:
Evidence:
Recommended Fix:

Run:

Terminal window
whoami

Then:

Terminal window
whoami /all

Review:

User SID
Groups
Privileges
Integrity Level
Authentication Information

Run:

Terminal window
hostname

Then:

Terminal window
systeminfo

Record:

Hostname
Operating System
Edition
Build
Architecture
Domain / Workgroup
System Role

Check:

Terminal window
$env:USERDOMAIN

and:

Terminal window
$env:USERDNSDOMAIN

Record whether the host is:

Standalone
Workgroup Joined
Domain Joined

Your notes should answer:

WHO AM I?
WHICH HOST AM I ON?
WHICH DOMAIN AM I IN?
WHAT GROUPS DO I HAVE?
WHAT TOKEN PRIVILEGES DO I HAVE?
WHAT IS THIS SYSTEM USED FOR?

Use:

Terminal window
Get-LocalUser

If unavailable:

Terminal window
net user

Identify:

Administrator Accounts
Service Accounts
Support Accounts
Dormant Accounts
Application Accounts

Use:

Terminal window
Get-LocalGroup

or:

Terminal window
net localgroup

Focus especially on:

Administrators
Remote Desktop Users
Backup Operators
Event Log Readers
Remote Management Users
Custom Application Groups

Phase 09 — Review Current Group Membership

Section titled “Phase 09 — Review Current Group Membership”

Run:

Terminal window
whoami /groups

Ask:

Am I Already in a Sensitive Group?
Does a Custom Group Grant Access
to a Privileged Resource?
Is the Group Used by a Service?
Does the Group Control an Application?

Run:

Terminal window
Get-LocalGroupMember Administrators

or:

Terminal window
net localgroup administrators

Document:

Local Accounts
Domain Accounts
Domain Groups
Service Accounts

When Windows authenticates a user, the session receives an access token.

Conceptually:

USER
ACCESS TOKEN
|
+-- SID
|
+-- Groups
|
+-- Privileges
|
+-- Integrity Level

Windows uses the token during access-control decisions.

Run:

Terminal window
whoami /priv

You may see privileges such as:

SeChangeNotifyPrivilege
SeShutdownPrivilege
SeBackupPrivilege
SeRestorePrivilege
SeImpersonatePrivilege
SeDebugPrivilege

Do not assume that the presence of a privilege automatically means exploitation is possible.

Analyze:

Is It Enabled?
Why Does the User Have It?
What Security Boundary Does It Affect?
Is It Appropriate for This Role?

From:

Terminal window
whoami /groups

identify the mandatory integrity level.

Common concepts include:

Low
Medium
High
System

Conceptually:

STANDARD USER
=
MEDIUM INTEGRITY

while elevated administrators commonly operate at:

HIGH INTEGRITY

User Account Control separates normal administrative activity from elevated administrative activity.

Conceptually:

ADMIN ACCOUNT
STANDARD TOKEN
UAC APPROVAL
ELEVATED TOKEN

UAC is a security boundary aid but should not replace proper least privilege.

In the authorized lab, inspect:

Terminal window
Get-ItemProperty `
"HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System"

Review relevant configuration conceptually.

Do not modify UAC during enumeration.

Run:

Terminal window
Get-Process

A useful view:

Terminal window
Get-Process |
Select-Object Name, Id, Path

Access to some information may be restricted for a standard user.

Focus on:

Application Processes
Management Tools
Security Software
Custom Services

Run:

Terminal window
Get-Service

For richer configuration details:

Terminal window
Get-CimInstance Win32_Service |
Select-Object Name, StartName, State, PathName

Build a table:

Service Identity State Executable
AppService LocalSystem Running C:\Program Files\App\service.exe
BackupAgent LocalSystem Running C:\Tools\backup.exe

Phase 18 — Prioritize Privileged Services

Section titled “Phase 18 — Prioritize Privileged Services”

Focus on services running as:

LocalSystem
LocalService
NetworkService
Privileged Domain Service Account

Then ask:

Can My User Influence
the Service?
Executable?
Directory?
Configuration?
Registry?
Arguments?
Dependencies?

Phase 19 — Inspect Service Configuration

Section titled “Phase 19 — Inspect Service Configuration”

For a selected training service:

Terminal window
sc.exe qc <ServiceName>

Review:

BINARY_PATH_NAME
SERVICE_START_NAME
START_TYPE

Phase 20 — Inspect Service Executable Permissions

Section titled “Phase 20 — Inspect Service Executable Permissions”

Suppose the service executes:

C:\Program Files\NovaApp\NovaService.exe

Inspect:

Terminal window
Get-Acl "C:\Program Files\NovaApp\NovaService.exe" |
Format-List

Also inspect the directory:

Terminal window
Get-Acl "C:\Program Files\NovaApp" |
Format-List

Phase 21 — Understand the Service Permission Relationship

Section titled “Phase 21 — Understand the Service Permission Relationship”

A dangerous relationship may look like:

analyst
Write Permission
Service Executable
Service Runs As
SYSTEM

The key issue is:

LOW-PRIVILEGE USER
CAN MODIFY
RESOURCE TRUSTED BY
PRIVILEGED SERVICE

Prioritize:

Company Applications
Backup Agents
Deployment Agents
Monitoring Tools
Custom Scripts
Legacy Software

These are usually more useful to examine than standard operating-system services.

For each interesting service:

Terminal window
Get-ChildItem "C:\Path\To\Service" -Force

Review permissions:

Terminal window
Get-Acl "C:\Path\To\Service"

Ask:

Can I Create Files?
Can I Modify Existing Files?
Can I Rename Files?
Who Owns the Directory?

Phase 24 — Review Service Configuration Files

Section titled “Phase 24 — Review Service Configuration Files”

Look for:

*.config
*.xml
*.ini
*.json
*.yaml
*.yml
.env

within the authorized application’s directory.

Ask:

Does the Service Read It?
Does It Run Privileged?
Can I Modify It?
Does It Reference Another Executable?
Finding ID:
WPE-001
Title:
Privileged Service Uses Writable
Application Directory
Starting Identity:
NOVATECH\analyst
Affected Service:
NovaService
Service Identity:
LocalSystem
Observation:
The standard user can modify resources
inside a directory consumed by a
LocalSystem service.
Impact:
A compromised standard user may be able
to influence privileged service behavior.
Recommendation:
Restrict service directories so only
authorized administrators and the
required service identity can modify them.

Run:

Terminal window
Get-ScheduledTask

For more context:

Terminal window
Get-ScheduledTask |
Select-Object TaskName, TaskPath, State

For a selected authorized task:

Terminal window
Get-ScheduledTask -TaskName "<TaskName>" |
Format-List *

Review:

Principal
Actions
Triggers
Run Level

Phase 28 — Understand Scheduled Task Privilege

Section titled “Phase 28 — Understand Scheduled Task Privilege”

A task may conceptually be:

SYSTEM
TASK SCHEDULER
maintenance.ps1

If:

analyst
Can Modify
maintenance.ps1

then the relationship becomes:

analyst
Writable Script
SYSTEM Scheduled Task

If the task references:

C:\Scripts\maintenance.ps1

inspect:

Terminal window
Get-Acl "C:\Scripts\maintenance.ps1"

and:

Terminal window
Get-Acl "C:\Scripts"

Before any controlled validation, record:

File Hash
Owner
Permissions
Content
Task Configuration

For example:

Terminal window
Get-FileHash "C:\Scripts\maintenance.ps1"

Phase 31 — Review Filesystem Permissions

Section titled “Phase 31 — Review Filesystem Permissions”

Important areas may include:

C:\Program Files
C:\Program Files (x86)
C:\Scripts
C:\Tools
C:\Applications
C:\inetpub
Custom Application Locations

Do not broadly modify anything.

Review:

Terminal window
Get-Acl "<PATH>" |
Format-List

Focus on permissions such as:

Write
Modify
FullControl

granted to:

Users
Authenticated Users
Everyone
Custom Low-Privilege Groups

A finding may exist when:

STANDARD USER
MODIFY
SCRIPT / BINARY
EXECUTED BY
SYSTEM / ADMINISTRATOR

Phase 34 — Review Writable Application Directories

Section titled “Phase 34 — Review Writable Application Directories”

In your training environment:

Terminal window
Get-ChildItem "C:\Program Files" -Directory

Prioritize custom software.

You can inspect known directories with:

Terminal window
Get-Acl "<APP_DIRECTORY>"

The Windows Registry can contain:

Service Configuration
Application Configuration
Startup Settings
Security Policy
Credentials or Secrets
Environment Settings

For an authorized application key:

Terminal window
Get-Item "HKLM:\SOFTWARE\NovaTech"

Review permissions:

Terminal window
Get-Acl "HKLM:\SOFTWARE\NovaTech" |
Format-List

Phase 37 — Registry Privilege Relationship

Section titled “Phase 37 — Registry Privilege Relationship”

A dangerous pattern might be:

LOW-PRIVILEGE USER
MODIFY REGISTRY CONFIGURATION
PRIVILEGED SERVICE READS CONFIGURATION
PRIVILEGED BEHAVIOR CHANGES

Again, the key is the trust relationship.

Applications can be configured to start automatically through several mechanisms.

In the lab, review standard startup configuration using approved Windows tools.

Focus on:

Executable
Owner
Permissions
Execution Context

Review:

Terminal window
Get-ChildItem Env:

Pay attention to:

PATH
TEMP
TMP
Application-Specific Variables

Run:

Terminal window
$env:Path -split ';'

Investigate non-standard directories.

Ask:

Can My User Write There?
Does a Privileged Process
Search That Directory?
Does Software Use Relative
Executable Names?

Common locations include:

%TEMP%
C:\Windows\Temp

Inspect:

Terminal window
$env:TEMP

and relevant permissions.

Temporary directories are not vulnerabilities by themselves.

The question is:

Does a Privileged Application
Trust User-Controlled Temporary Data?

Phase 42 — Review Installed Applications

Section titled “Phase 42 — Review Installed Applications”

Use:

Terminal window
Get-CimInstance Win32_Product

only cautiously because it can be intrusive in some environments.

A safer lab approach is to review:

Installed application directories
Start Menu entries
Known service paths
Application management inventory

Focus on business-relevant custom applications.

Phase 43 — Review Application Configuration

Section titled “Phase 43 — Review Application Configuration”

For an authorized application, inspect configuration such as:

XML
JSON
INI
PowerShell Scripts
Batch Files
Service Configuration

Look for:

Service Accounts
File Paths
Database Endpoints
Management Functions
Secrets
Administrative Settings

Windows systems can expose synthetic lab credentials through poor operational practices such as:

Scripts
Configuration Files
Deployment Files
Backups
Documentation
Command History

If discovered:

DO NOT REUSE THEM
OUTSIDE THE LAB

For the current training account:

Terminal window
(Get-PSReadLineOption).HistorySavePath

If available and authorized:

Terminal window
Get-Content (Get-PSReadLineOption).HistorySavePath

Look for insecure operational behavior, but redact secrets from evidence.

Inspect:

Terminal window
Get-ChildItem $env:USERPROFILE -Force

Potentially relevant lab content includes:

Scripts
Configuration
Remote Access Files
Backups
Developer Files

Phase 47 — Review Saved Windows Credentials

Section titled “Phase 47 — Review Saved Windows Credentials”

Within the authorized lab:

Terminal window
cmdkey /list

This shows whether Windows has stored credential references.

Do not attempt to extract unrelated credentials.

Document only what is necessary to explain exposure.

Run:

Terminal window
netstat -ano

or:

Terminal window
Get-NetTCPConnection

Identify:

Listening Services
Internal Applications
Local Management Interfaces
Application Dependencies

For a specific PID:

Terminal window
Get-Process -Id <PID>

Ask:

Which User Runs the Process?
Is It Privileged?
Can My User Influence Its Files?

Run:

Terminal window
net share

Assess only authorized shares.

Look for:

Deployment Shares
Application Shares
Administrative Data
Backup Locations

Phase 51 — Review Share and NTFS Permissions

Section titled “Phase 51 — Review Share and NTFS Permissions”

Remember:

Effective Access
=
Share Permissions
+
NTFS Permissions

Both should be considered when assessing access.

Phase 52 — Understand Windows Service Accounts

Section titled “Phase 52 — Understand Windows Service Accounts”

Services may run as:

LocalSystem
LocalService
NetworkService
Virtual Account
Local User
Domain User
gMSA

Each has different security implications.

Document:

Account
Purpose
Privilege
Interactive Logon Need
Password Management
Network Access
Application Dependencies

Phase 54 — Review Token Privilege Relationships

Section titled “Phase 54 — Review Token Privilege Relationships”

Certain service or support roles may have sensitive privileges.

Do not treat privilege names as automatic exploitation instructions.

Instead ask:

Why Does This Account Have It?
Does the Business Role Require It?
Can the Privilege Influence
Higher-Privilege Processes?
Can the Permission Be Removed?

Phase 55 — Review Windows Security Controls

Section titled “Phase 55 — Review Windows Security Controls”

Document:

Microsoft Defender
Firewall
Application Control
Credential Protection
Audit Policy
UAC

Examples:

Terminal window
Get-MpComputerStatus

where available.

Phase 56 — Do Not Disable Security Controls

Section titled “Phase 56 — Do Not Disable Security Controls”

During this lab:

DO NOT:
Disable Defender
Disable Firewall
Disable Logging
Disable UAC
Disable EDR

Your objective is to assess the environment, not weaken it unnecessarily.

Where authorized:

Terminal window
Get-NetFirewallProfile

Document:

Domain
Private
Public

profiles and their state.

You can inspect:

Terminal window
auditpol /get /category:*

Look for coverage around:

Logon
Account Management
Privilege Use
Process Creation
Policy Change

Before using automated tools, manually review:

Identity
Groups
Privileges
Local Administrators
Services
Scheduled Tasks
Filesystem
Registry
Applications
Credentials
Environment
Security Controls

This builds understanding.

Phase 60 — Automated Enumeration as Cross-Check

Section titled “Phase 60 — Automated Enumeration as Cross-Check”

If your training lab provides an approved Windows enumeration utility, use it only after the manual review.

For every generated observation verify:

Does It Exist?
Can My User Reach It?
Does It Cross a Privilege Boundary?
What Is the Root Cause?
What Is the Business Impact?

Phase 61 — Build the Windows Privilege Matrix

Section titled “Phase 61 — Build the Windows Privilege Matrix”

Create:

Vector Observation User Influence Privileged Context Priority
Service Writable app directory Yes SYSTEM Critical
Scheduled task Writable script Yes SYSTEM Critical
Registry Writable service config Yes SYSTEM High
Token Sensitive privilege Review Elevated High
Credential Synthetic admin secret exposed Yes Admin High

Use only findings actually present in your training environment.

Example:

NOVATECH\analyst
|
| MemberOf
v
ApplicationSupport
|
| Modify
v
C:\NovaApp\maintenance.ps1
|
| Executed By
v
SYSTEM Scheduled Task

This explains the privilege path clearly.

For the previous example:

Root Cause:
A script executed by a SYSTEM-level
scheduled task is writable by a
lower-privileged support group.

Not:

Windows Scheduled Tasks
Are Vulnerable

The problem is:

Incorrect Access Control

Once you identify a valid lab privilege path:

DOCUMENT
VERIFY SCOPE
CAPTURE ORIGINAL STATE
USE MINIMUM-IMPACT VALIDATION
CONFIRM PRIVILEGED EXECUTION
COLLECT EVIDENCE
RESTORE STATE

For example, if a training scheduled task running as SYSTEM consumes a script that your account can modify, use a harmless proof of execution rather than making broad system changes.

Conceptually:

STANDARD USER
AUTHORIZED WRITABLE SCRIPT
SYSTEM SCHEDULED TASK
HARMLESS MARKER
VERIFY EXECUTION CONTEXT

Afterward:

Restore Original Script
Remove Marker
Verify Hash
Verify Task State

Phase 66 — Confirm the Privilege Boundary

Section titled “Phase 66 — Confirm the Privilege Boundary”

Your evidence should show:

Starting Context:
NOVATECH\analyst

and:

Controlled Result:
Privileged execution occurred
through the identified trusted resource.

That is enough to demonstrate the finding.

Finding ID:
WPE-001
Title:
Writable SYSTEM-Executed Scheduled Script
Affected Host:
APPWIN01
Starting Identity:
NOVATECH\analyst
Observation:
The analyst user receives modification
rights to a maintenance script through
the ApplicationSupport group.
The script is executed by a scheduled
task using the SYSTEM identity.
Privilege Path:
analyst
→ ApplicationSupport
→ writable maintenance script
→ SYSTEM scheduled task
Impact:
A compromised standard user could
influence privileged code execution.
Severity:
Critical
Recommendation:
Restrict the script and its parent
directory so only authorized
administrators can modify them.
Finding ID:
WPE-002
Title:
Privileged Windows Service Uses
Writable Application Resource
Observation:
A LocalSystem service depends on
application files writable by a
non-administrative support group.
Impact:
A lower-privileged account may be able
to influence privileged service behavior.
Recommendation:
Apply least-privilege ACLs to service
executables, directories, configuration,
and dependencies.
Finding ID:
WPE-003
Title:
Insecure Registry Permissions Affect
Privileged Service Configuration
Observation:
A low-privileged identity can modify
registry configuration consumed by a
privileged service.
Impact:
Unauthorized configuration changes may
alter privileged application behavior.
Recommendation:
Restrict registry modification rights to
authorized administrators and required
service identities.
Finding ID:
WPE-004
Title:
Sensitive Administrative Credential
Stored in User-Accessible Configuration
Observation:
A synthetic administrative credential is
stored in a configuration file readable
by standard users.
Impact:
Compromise of a standard account could
lead to unintended administrative access.
Recommendation:
Remove plaintext credentials and use
approved secret-management or managed
identity mechanisms.
Finding ID:
WPE-005
Title:
Excessive Local Administrative Group
Membership
Observation:
A support account or group has local
administrator access beyond documented
business requirements.
Impact:
Compromise of the support identity would
provide unnecessary high privilege.
Recommendation:
Remove unnecessary membership and use
role-specific delegated administration.
Finding Likelihood Impact Severity
Writable SYSTEM task script High Critical Critical
Writable service resources High Critical Critical
Writable privileged registry config Medium High High
Credential exposure High High High
Excessive local admin High Critical Critical

Adjust according to your actual lab results.

Apply:

Protected Executable
Protected Service Directory
Protected Configuration
Restricted Registry Keys
Dedicated Service Identity
Least Privilege

The key principle is:

If SYSTEM Executes It,
Standard Users Should
Not Control It.

Review:

Task Principal
Script Ownership
Executable Ownership
Directory Permissions
Arguments
Environment
Triggers

Privileged scheduled-task resources should have tightly restricted modification rights.

Use:

Least Privilege
Correct Ownership
Role-Based Access
Separate Administrative Groups
Periodic ACL Reviews

Avoid granting:

Users
Everyone
Authenticated Users

write access to privileged execution paths unless explicitly required.

Phase 76 — Remediate Registry Permissions

Section titled “Phase 76 — Remediate Registry Permissions”

Review:

Service Keys
Application Keys
Startup Configuration
Security-Sensitive Settings

Restrict modification to:

Administrators
SYSTEM
Required Service Identity

Avoid:

Passwords in Scripts
Passwords in Configuration
Passwords in PowerShell History
Shared Administrative Credentials

Prefer:

Managed Service Accounts
gMSA
Credential Vaults
Secret Management
Rotation
Short-Lived Credentials

Phase 78 — Remediate Administrative Access

Section titled “Phase 78 — Remediate Administrative Access”

Use:

Least Privilege
Dedicated Admin Accounts
Windows LAPS
Administrative Tiering
Privileged Access Management
Access Reviews

Prefer:

Least Privilege
Non-Interactive Accounts
Managed Passwords
Restricted Logon Rights
Restricted Network Access
Dedicated Application Identity

Windows privilege escalation may create evidence in:

Security Event Logs
PowerShell Logs
Service Control Manager Logs
Task Scheduler Logs
File Auditing
Registry Auditing
Endpoint Security Logs

Security teams should pay attention to events around:

Process Creation
Service Installation / Change
Scheduled Task Change
Local Group Membership
Privilege Use
Logon
Account Changes

Phase 82 — Useful Windows Security Events

Section titled “Phase 82 — Useful Windows Security Events”

Examples include:

Event ID Security Context
4624 Successful logon
4625 Failed logon
4672 Special privileges assigned
4688 Process creation
4697 Service installed
4698 Scheduled task created
4702 Scheduled task updated
4732 Member added to local group
4733 Member removed from local group

Exact telemetry depends on audit policy and Windows version.

Changes to:

Service Binary
Service Account
Startup Type
Service Configuration

should be monitored for privileged services.

Watch for:

New Tasks
Modified Tasks
New Task Actions
Changed Principals
Unexpected SYSTEM Tasks

Consider file-integrity monitoring for:

Privileged Scripts
Service Executables
Application Configuration
Administrative Tools

After validation:

Restore Modified Scripts
Restore File ACLs
Restore Registry Values
Remove Test Files
Remove Temporary Accounts
Remove Test Tasks If Created
Restore Service Configuration
Terminate Test Processes
Secure Evidence
  • Original file content restored
  • Original hashes verified
  • ACLs restored
  • Registry restored
  • Services operational
  • Scheduled tasks operational
  • Test artifacts removed
  • Evidence secured

After remediation:

ORIGINAL PRIVILEGE PATH
REPEAT ENUMERATION
VERIFY ACL
VERIFY SERVICE / TASK
VERIFY USER CANNOT MODIFY
CONFIRM PATH BROKEN

Example:

Before:
analyst
→ ApplicationSupport
→ writable script
→ SYSTEM task

After:

analyst
→ ApplicationSupport
→ X
→ SYSTEM task

Use:

01 Executive Summary
02 Scope
03 Starting Access
04 Environment
05 Methodology
06 Identity Assessment
07 Group Assessment
08 Token Privileges
09 Local Administrator Review
10 Service Assessment
11 Scheduled Task Assessment
12 Filesystem Assessment
13 Registry Assessment
14 Application Assessment
15 Credential Exposure
16 Security Control Review
17 Privilege Paths
18 Findings
19 Risk Ratings
20 Remediation
21 Retest
22 Cleanup
The Windows privilege escalation
assessment identified weaknesses in local
access control that could allow a
compromised standard user to influence
operations executed with elevated
privileges.
The most significant findings involved
privileged services, scheduled tasks,
filesystem permissions, and administrative
access relationships.
The remediation priority is to ensure
that low-privileged identities cannot
modify resources consumed by SYSTEM,
administrative users, or privileged
services.

Windows Privilege Escalation Finding Template

Section titled “Windows Privilege Escalation Finding Template”
Finding ID:
Title:
Affected Host:
Starting Identity:
Affected Resource:
Privileged Context:
Description:
Privilege Path:
Evidence:
Required Conditions:
Impact:
Likelihood:
Severity:
Root Cause:
Recommendation:
Retest Procedure:
Path ID:
Starting Identity:
Group Membership:
Token Privileges:
Initial Permission:
Affected Resource:
Privileged Consumer:
Execution Identity:
Required Conditions:
Potential Privilege:
Evidence:
Root Cause:
Recommended Path Break:

Complete:

  • Scope record
  • Initial identity assessment
  • Local user inventory
  • Local group inventory
  • Token privilege assessment
  • Local administrator assessment
  • UAC review
  • Service inventory
  • Service permission assessment
  • Scheduled task assessment
  • Filesystem ACL review
  • Registry ACL review
  • Application configuration review
  • Credential exposure review
  • Environment review
  • Network service review
  • Security control review
  • Privilege escalation matrix
  • Privilege path diagram
  • Findings register
  • Risk matrix
  • Remediation plan
  • Cleanup confirmation
  • Final report
  • whoami
  • whoami /all
  • Hostname
  • OS identified
  • Domain context identified
  • Integrity level identified
  • Local users reviewed
  • Local groups reviewed
  • Current memberships reviewed
  • Local Administrators reviewed
  • Custom groups reviewed
  • whoami /priv
  • Sensitive privileges documented
  • Business requirement reviewed
  • Privilege state understood
  • UAC concept understood
  • Configuration reviewed
  • No unnecessary changes made
  • Services enumerated
  • Privileged services prioritized
  • Service identities recorded
  • Executable paths reviewed
  • Directory ACLs reviewed
  • Configuration reviewed
  • Registry dependencies reviewed
  • Tasks enumerated
  • Privileged principals identified
  • Actions reviewed
  • Scripts reviewed
  • ACLs reviewed
  • Original state recorded
  • Application directories reviewed
  • Writable privileged files identified
  • Writable privileged directories identified
  • Ownership reviewed
  • ACLs documented
  • Application keys reviewed
  • Service keys reviewed
  • Writable sensitive keys identified
  • ACLs documented
  • Custom applications identified
  • Configuration reviewed
  • Service dependencies reviewed
  • Administrative functions reviewed
  • PowerShell history reviewed
  • User profile reviewed
  • Stored credential references reviewed
  • Configuration secrets reviewed
  • Evidence redacted
  • Listening services reviewed
  • Ports mapped to processes
  • Local-only applications identified
  • Shares reviewed
  • Defender state reviewed
  • Firewall state reviewed
  • Audit policy reviewed
  • Security controls left enabled
  • Privilege path documented
  • Scope revalidated
  • Original state captured
  • Minimum-impact validation used
  • Root cause established
  • Cleanup completed

40 Windows Privilege Escalation Interview Questions

Section titled “40 Windows Privilege Escalation Interview Questions”
  1. What is Windows privilege escalation?
  2. What is vertical privilege escalation?
  3. What is horizontal privilege escalation?
  4. What is an access token?
  5. What information is stored in an access token?
  6. What is an integrity level?
  7. What is UAC?
  8. Does UAC replace least privilege?
  9. What does whoami /priv show?
  10. Why are token privileges security-sensitive?
  11. What is LocalSystem?
  12. What is LocalService?
  13. What is NetworkService?
  14. Why are Windows services important during privilege assessment?
  15. What should you inspect in service configuration?
  16. Why is a writable service executable dangerous?
  17. Why is a writable service directory dangerous?
  18. Why are scheduled tasks security-sensitive?
  19. What should you review in a scheduled task?
  20. Why are writable SYSTEM task scripts dangerous?
  21. What are NTFS ACLs?
  22. What is the difference between Modify and Full Control?
  23. Why should custom application directories be reviewed?
  24. Why can writable registry keys create security risk?
  25. What role does the Registry play in Windows configuration?
  26. Why should environment variables be reviewed?
  27. Why can PATH configuration matter?
  28. Why are plaintext credentials dangerous?
  29. What can PowerShell history expose?
  30. What does cmdkey /list provide?
  31. Why is local administrator membership important?
  32. What is privilege creep?
  33. What is Windows LAPS?
  34. What is a gMSA?
  35. Why should privileged service accounts have minimal rights?
  36. Why should EDR or Defender not be disabled during a standard assessment?
  37. Why is automated enumeration not a replacement for manual analysis?
  38. What is controlled privilege validation?
  39. Why should original files and hashes be captured before validation?
  40. How do you verify that remediation actually broke the privilege path?

Final Windows Privilege Escalation Mental Model

Section titled “Final Windows Privilege Escalation Mental Model”

Remember:

LOW-PRIVILEGE SESSION
CURRENT IDENTITY
GROUPS
ACCESS TOKEN
USER RIGHTS
LOCAL ADMINISTRATION
UAC
SERVICES
SCHEDULED TASKS
FILESYSTEM
REGISTRY
APPLICATIONS
CREDENTIALS
ENVIRONMENT
SECURITY CONTROLS
CORRELATE
BUILD PRIVILEGE PATH
CONTROLLED VALIDATION
ROOT CAUSE
REMEDIATION
RETEST

Do not think only:

How Do I Become SYSTEM?

Think:

Which Resource Can
My Current Identity Control
That Is Trusted by
a More Privileged Identity?

For example:

STANDARD USER
SUPPORT GROUP
MODIFY PERMISSION
PRIVILEGED SCRIPT
SYSTEM TASK

or:

STANDARD USER
WRITABLE APPLICATION FILE
PRIVILEGED SERVICE
SYSTEM CONTEXT

The most important lesson is:

Windows Privilege Escalation
Is Often a Trust and
Permission Problem

A strong penetration tester should be able to explain:

WHERE THE PATH STARTS
WHICH PERMISSION ENABLES IT
WHICH PRIVILEGED COMPONENT
TRUSTS THE RESOURCE
WHY THE SECURITY BOUNDARY FAILS
WHAT SECURITY IMPACT EXISTS
HOW TO BREAK THE PATH

➡️ Lab 05 — Web Application Privilege Escalation

In the next lab, you will move from operating-system privilege escalation to application-level privilege and authorization testing.

The workflow will cover:

LOW-PRIVILEGE USER
APPLICATION MAPPING
AUTHENTICATION
ROLES
OBJECT OWNERSHIP
SERVER-SIDE AUTHORIZATION
ADMINISTRATIVE FUNCTIONS
API ACCESS CONTROL
SESSION CONTEXT
PRIVILEGE BOUNDARY
CONTROLLED VALIDATION
ROOT CAUSE
REMEDIATION

The main objective will be to determine whether an ordinary application user can reach functions, data, or administrative capabilities beyond the permissions intended for that role.