Windows PrivEsc

Password Harvesting

The easiest way to elevate your privileges is to steal credentials from an application.

Unattended Windows Installations:

Credentials left by automatic windows installations may be in:

  • C:\Unattend.xml

  • C:\Windows\Panther\Unattend.xml

  • C:\Windows\Panther\Unattend\Unattend.xml

  • C:\Windows\system32\sysprep.inf

  • C:\Windows\system32\sysprep\sysprep.xml

<Credentials>
    <Username>Administrator</Username>
    <Domain>thm.local</Domain>
    <Password>MyPassword123</Password>
</Credentials>

Powershell History

type %userprofile%\AppData\Roaming\Microsoft\Windows\PowerShell\PSReadline\ConsoleHost_history.txt

Saved Windows Creds

IIS Config

  • C:\inetpub\wwwroot\web.config

  • C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\web.config

From putty:

Quick wins

Scheduled Tasks

AlwaysInstallElevated

Create a malicious msi to abuse the install perms:

Run the msi on the windows instance:

Service based

Permission abuse

Attacker:

Last updated