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
Hunting Credentials in Process Arguments
Just likeps 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, orNetworkService
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.SERVICE_CHANGE_CONFIG, repoint the binary and restart:
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.C:\Program Files\Some App\service.exe, Windows tries in order:
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 underHKLM\SYSTEM\CurrentControlSet\Services\. If you can write to a service’s key, you can change its ImagePath:
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).
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.