Obtaining the CA Signing Certificate
In order to execute DPERSIST1, we must first obtain the CA signing certificate. This can be done in a plethora of ways:CA Backup Feature
CA Backup Feature
- Open
certsrv.msc - Right click the CA ->
All Tasks->Back up CA... - Follow the wizard but make sure to check
Private key and CA certificate - The certificate should now exist at the chosen location (
CA-NAME.p12)
CA Server's Machine Certificate Store
CA Server's Machine Certificate Store
- Open
certlm.msc - Go to
Personal->Certificates - Right click the CA signing certificate ->
All Tasks->Export... - Follow the wizard but make sure to choose
Yes, export the private key - The certificate should not exist at the chosen location (
CA-NAME.pfx)
Windows Certificate Services certutil.exe
Windows Certificate Services certutil.exe
This feature has been implemented in Certify with the
manage-self --dump-certs command.Dumping Certificates with Certify
Forging Certificates
Once the CA signing certificate has been obtained, we can start forging our own certificates for arbitrary users. This can be done using theforge --ca-cert <pfx-path/base64-pfx> command from Certify.
Using the Forged Certificate
When the certificate has been forged, it can be used to persistently authenticate as the target account using theasktgt command from Rubeus.