Credentials Manager

Resources

  1. MITRE ATT&CK

  1. Additional resources (The Hacker Recipes)

  1. Get-WebCredentials.ps1 (nishang)

  1. cmdkey

(1) Enumeration

1.1 vaultcmd

1.1.1 /list

By default, Windows has two vaults: Web and Windows machine credentials. The following command displays the two vaults:

1.1.2 /listproperties

The following commands will list the properties of the web and windows machine credentials respectively:

1.1.3 /listcreds

List more information about the stored credentials (for web and windows machine respectively):

1.2 cmdkey

(2) Retrieving/exploiting stored credentials

2.1 runas.exe

We can use the runas.exe command to run commands (eg. cmd.exe) as a particular user with stored credentials.

  • /savecred: Indicates if the credentials have been previously saved by this user

    • This option is required to tell runas.exe to pull the stored credentials

2.2 GetWebCredentials.ps1

The vaultcmd and cmdkey commands does not provide methods to show the password. Thus, we have to realy on external PowerShell scripts such as Get-WebCredentials.ps1arrow-up-right:

Ensure to run powershell with the bypass policy

2.3 mimikatz

  1. sekulrsa::credman

  1. vault::list, vault::cred

If error is encountered:

Overview of differences between vaultcmd and cmdkey

  1. vaultcmd /list

a. Displays both the Web Credentials and Windows Credentials

2. cmdkey /list

a. Displays the credentials stored under Windows Credentials only

b. Displays the entries added via cmdkey /add or runas.exe /savecred commands

c. The output from the vaultcmd /list may overlap with the results from vaultcmd /listcreds

Last updated