Pass the Certificate
Pass the Certificate
Tools: gettgtpkinit.py , Rubeus , certipy
Pass the Certificate in order to get a TGT, this technique is used in "UnPAC the Hash" and "Shadow Credential"
PKINIT
Rubeus.exe asktgt /user:"USERNAME" /certificate:"PFX_FILE" [/password:"CERTIFICATE_PASSWORD] /domain:"FQDN_DOMAIN" /dc:"DC" /showcertipy auth -pfx CRT_FILE -dc-ip DC_IPgettgtpkinit.py -cert-pfx "PFX_FILE" [cert-pfx-pass "CERT_PASSWORD"] "FQDN_DOMAIN/USER "TGT_CCACHE_FILE"These 3 techniques can be performed for a Pass-the-Ticket attack
Schannel (Secure Channel)
Extract the .key and .crt files from the .pfx file (Extract the .key file. Leave import password blank and put something like 1234 for PEM pass.)
Extract the .crt file
Authenticate against LDAPS using Schannel. In this example, we give the computer account we control RBCD, AKA delegation rights over the DC. Enter the PEM phrase we used when extracting the .key file earlier
With this technique, we can now perform an RBCD attack
Pass-the-Certificate
Windows
PEM certificates can be exported to a PFX format with openssl. Rubeus doesn't handle PEM certificates.
Certipy uses DER encryption. To generate a PFX for Rubeus, openssl can be used.
Linux
The ticket obtained can then be used to
Alternate Method: PassTheCert https://github.com/AlmondOffSec/PassTheCert/blob/main/Python/passthecert.py
Last updated