Runas Stored Credentials Privilege Escalation
Windows stores credentials for network resources, RDP sessions, and runas targets in the Windows Credential Manager. The runas /savecred command allows executing any program as a stored credential user without re-entering the password. If Administrator credentials are cached, you get immediate privilege escalation with a single command.
Prerequisites Check
List all stored credentials:
Look for entries with:
Target: DOMAIN\AdministratororTarget: BUILTIN\AdministratorTarget: MicrosoftAccount\...(Microsoft accounts)Target: Domain:interactive=...(RDP or runas targets)Type: Genericwith a username indicating a privileged account
If cmdkey /list shows no entries, this technique does not apply.
Step 1 — Identify High-Value Stored Credentials
Currently stored credentials:
Target: DOMAIN\Administrator
Type: Domain Password
User: DOMAIN\Administrator
Target: WindowsLive:target=virtualapp/didlogical
Type: Generic
User: Administrator
Any entry with Administrator, SYSTEM, or a privileged username is worth targeting.
Step 2 — Execute Commands as the Stored User
The /savecred flag tells runas to use the stored credential without prompting for a password:
Add a new admin user:
Open an elevated command prompt:
Reverse shell:
First transfer your payload:
Start your listener, then:
Domain format:
Step 3 — Verify Escalation
In the new shell:
PowerShell Alternative
Credential Manager GUI Access
If you have a GUI session (RDP), open Credential Manager directly:
Control Panel → User Accounts → Credential Manager
Or via run dialog:
This shows all stored credentials including Windows Credentials and Certificate-Based Credentials. Passwords are retrievable only by the owning user — but using /savecred for execution does not require reading the password.
Enumerating Other Users' Stored Credentials
If you escalated to SYSTEM or another user, check their credential store:
For DPAPI-protected credential decryption see https://hackindex.io/platforms/windows/privilege-escalation/dpapi-credential-decryption.
References
-
runasdocs.microsoft.com/en-us/windows-server/administration/windows-commands/runas (opens in new tab)
Microsoft Docs /savecred flag behavior and credential manager integration.
-
cmdkeydocs.microsoft.com/en-us/windows-server/administration/windows-commands/cmdkey (opens in new tab)
Microsoft Docs Credential listing, creation, and deletion.
Was this helpful?
Your feedback helps improve this page.