Windows PrivEsc with Kerberos
First off, download two PS scripts in local machine..
wget https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Recon/PowerView.ps1
wget https://raw.githubusercontent.com/Kevin-Robertson/Powermad/master/Powermad.ps1
Copied!Then upload them to the target machine.
# Evil-WinRM
upload PowerView.ps1
Import-Module .\PowerView.ps1
upload Powermad.ps1
Import-Module .\Powermad.ps1
Copied!Check if users are allowed to create a new computer object on the domain.
Get-DomainObject -Identity "dc=example,dc=com" -Domain example.com
# -------------------------
# Result
ms-ds-machineaccountquota: 10
Copied!And check if the machine is at least Windows Server 2012.
Additionally, check if the target computer does not have the attributes “msds-allowedtoactionbehalfofotheridentity” set.
Now you can create a new computer object.
Create a new raw security descriptor.
Download Rubeus.exe in local machine.
Then upload it to the target machine and generate a RC4 hash.
We can request a Kerberos ticket for a new machine account while impersonating an administrator.
Then generate a ticket (.kirbi).
Download “ticket_converter.py”.
Destroy any tickets in local machine, and convert the ticket to Linux usable, then set the new ticket’s path.
We can use the ticket to get a shell.
Last updated
