certsync: Dump NTDS with golden certificates and UnPAC the hash
certsync
certsync is a new technique in order to dump NTDS remotely, but this time without DRSUAPI: it uses a golden certificate and UnPAC the hash. It works in several steps:
- Dump user list, CA information, and CRL from LDAP
- Dump CA certificate and private key
- Forge offline a certificate for every user
- UnPAC the hash for every user in order to get nt and lm hashes
Why
DSRUAPI is more and more monitored and sometimes restricted by EDR solutions. Moreover, certsync does not require to use of a Domain Administrator, it only requires a CA Administrator.
Requirements
This attack needs:
- A configured Enterprise CA on an ADCS server in the domain,
- PKINIT working,
- A domain account which is a local administrator on the ADCS server, or export of the CA certificate and private key.
Limitations
Since we cannot PKINIT for users that are revoked, we cannot dump their hashes.
OPSEC
Some options were added to customize the behaviour of the tool:
-ldap-filter
: change the LDAP filter used to select usernames to certsync.-template
: use an already delivered certificate to mimic it when forging users’ certificates.-timeout
and-jitter
: change timeout between PKINIT authentication requests.-randomize
: By default, every forged user certificate will have the same private key, serial number, and validity dates. This parameter will randomize them, but the forging will take longer.
Install
git clone https://github.com/zblurx/certsync
cd certsync
pip install .
or
pip install certsync
Use
Copyright (c) 2018 Tamas Jos
Source: https://github.com/zblurx/