ESC8 - coerce to domain admin
Last updated
Last updated
Active Directory Certificate Services (AD CS) in Windows Server® 2012. AD CS is the Server Role that allows you to build a public key infrastructure (PKI) and provide public key cryptography, digital certificates, and digital signature capabilities for your organization.
PetitPotam is a classic NTLM Relay Attack, and such attacks have been previously documented by Microsoft along with numerous mitigation options to protect customers. For example: Microsoft Security Advisory 974926.
To make this attack work we will need :
ADCS running on the domain with web enrollment enabled.
A working coerce method (here we use petitpotam unauthent, but an authenticated printerbug or other coerce methods will work the same)
There is a useful template to exploit ESC8, by default on an active directory, its name is DomainController
Let’s check if the web enrollement is up and running at : http://192.168.56.23/certsrv/certfnsh.asp
Add a listener to relay SMB authentication to HTTP with impacket ntlmrelayx
Launch the coerce with petitpotam unauthenticated (this will no more work on an up to date active directory but other coerce methods authenticated will work the same)
ntlmrelayx will relay the authentication to the web enrollment and get the certificate
Ask for a TGT with the certificate we just get (we copied it to the file cert.b64)
download it from here: https://raw.githubusercontent.com/dirkjanm/PKINITtools/master/gettgtpkinit.py
And now we got a TGT for baltimore so we can launch a DCsync and get all the ntds.dit content.