Skip to main content

The Mindset

Processes and services matter for the same reasons they do on Linux, plus a Windows-specific bonus:
  • Attack surface — services running as SYSTEM with known vulnerabilities
  • Credential exposure — passwords passed as process arguments, credentials in memory (LSASS)
  • Service misconfigurations — weak permissions on the service itself, its binary, or its registry key → run your code as SYSTEM

Processes

Listing Processes

tasklist /v shows the user each process runs as — spot anything running as a high-privilege account that you might be able to interact with or inject into. Processes running as SYSTEM are the prize.

Hunting Credentials in Process Arguments

Just like ps aux on Linux, Windows processes often have passwords passed as arguments:

Services

A Windows service is a background program managed by the Service Control Manager (SCM). Each service has:
  • A name and display name
  • A binary path (the executable it runs)
  • A start mode (Auto, Manual, Disabled)
  • A service account it runs as — often LocalSystem (SYSTEM), LocalService, or NetworkService

Listing Services


Service Misconfigurations — The Escalation Paths

There are four classic service misconfigs. Each one ends with your code running as the service account (usually SYSTEM).

1. Weak Service Permissions

If your user can change a service’s configuration, you can repoint its binary to your own payload.
The service’s permissions are stored as an SDDL string. View it with:
If you have SERVICE_CHANGE_CONFIG, repoint the binary and restart:
Note the space after binpath=sc config requires a space between the = and the value, or it silently fails. This trips people up constantly.

2. Weak Service Binary Permissions

If you can’t change the service config but you can overwrite the binary it runs, do that instead:

3. Unquoted Service Paths

If a service’s binary path has spaces and isn’t wrapped in quotes, Windows searches each space-delimited segment in order. You exploit this by planting a payload at one of the earlier paths.
For C:\Program Files\Some App\service.exe, Windows tries in order:
If you can write to C:\ or C:\Program Files\, drop a payload named Program.exe or Some.exe and it runs instead of the real binary.

4. Weak Registry Permissions

Service config lives in the registry under HKLM\SYSTEM\CurrentControlSet\Services\. If you can write to a service’s key, you can change its ImagePath:
winPEAS automates the discovery of all four of these misconfigs in one run. Run it first, then manually verify and exploit whatever it flags. It’s covered on the Pillaging page.

Scheduled Tasks

Covered briefly in System Enumeration, but worth repeating in the escalation context. A task that runs as Administrator/SYSTEM and executes a script you can write to is the same win as a service misconfig.

LSASS — Dumping Credentials from Memory

The Local Security Authority Subsystem Service (lsass.exe) handles authentication and holds credentials in memory — password hashes, Kerberos tickets, and sometimes plaintext passwords. Dumping it is a primary credential-theft technique. Requires admin/SYSTEM (or SeDebugPrivilege).
Once you have the dump, extract credentials offline with mimikatz or pypykatz:
LSASS dumping is heavily monitored by EDR and Defender. The comsvcs.dll method is built-in (lives off the land) but still frequently flagged. On a defended box, expect this to trigger alerts — know it’s noisy before you reach for it.

Sysinternals — The Essential Toolkit

Microsoft’s Sysinternals Suite contains advanced tools that go far beyond the built-ins. The ones you’ll use most:

Next: Remote Access & Sessions — RDP, WinRM, and the difference between session types that determines what credentials you can steal.