Certipy
- Capabilities
- Credential theftPrivilege escalationReconnaissancePost exploitation
- Platforms
- Windows
Certipy is a Python-based, dual-use security tool for discovering and abusing Active Directory Certificate Services (AD CS). It supports legitimate security assessments as well as offensive post-exploitation activity against Windows Active Directory environments. Its functions include enumerating certificate services and certificate templates, identifying exploitable misconfigurations such as ESC1, requesting authentication certificates, performing certificate-based authentication, relaying authentication, and conducting shadow credential attacks. These capabilities can enable credential acquisition and privilege escalation, including access as highly privileged domain accounts. Certipy also supports exporting discovery information for analysis with BloodHound.
Certipy has been used by APT28, also known as Forest Blizzard and associated with Russia’s GRU Unit 26165, during post-compromise operations against Western logistics and technology organizations supporting Ukraine. UAT-8837 has deployed it for Active Directory discovery and abuse in intrusions targeting North American critical infrastructure. GOLD OGRE-associated Aur0ra ransomware operations have also used Certipy for authentication-certificate abuse. It is typically introduced after attackers obtain access to a victim environment; it is not inherently malware or a standalone initial-access payload.
Associated vulnerabilities
2 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
4 distinct threat actors Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
After dumping the NTDS.dit, GRU’s operators employed two key tools, ADExplorer and Certipy, to harvest and exfiltrate directory data. They also installed Python on compromised hosts to run Certipy.
"Certipy identifies misconfigured certificate templates (ESC1). Certificate request submitted for Domain Admin."
Techniques & procedures
27 distinct techniques documented for this family, organized by ATT&CK tactic.
Resource Development
1 technique
Resource Development
They unleashed hundreds of AI agents built on OpenAI’s Codex harness paired with a DeepSeek model, combined with publicly available offensive tools such as Mimikatz, Certipy, Rubeus, and Impacket.
Initial Access
1 technique
Initial Access
Finally, I authenticated using the issued certificate... Authentication succeeded, allowing me to impersonate the Domain Administrator without ever knowing the Administrator’s password.
Persistence
5 techniques
Persistence
Finally, I authenticated using the issued certificate... Authentication succeeded, allowing me to impersonate the Domain Administrator without ever knowing the Administrator’s password.
Add Shadow Credentials Same as before, we’ll create shadow credentials using Certipy: certipy-ad shadow auto ... Adding shadow creds to james account | Modify the UPN ... we’ll set it to a DC machine account — in this case, LAB-DC.LAB.LOCAL for Schannel certificate-based authentication. certipy-ad account update ... -upn 'lab-dc$@lab.local'
By default, most Active Directory domains allow authenticated users to create up to ten computer accounts. The exploit takes advantage of this default configuration by creating a machine account that the attacker legitimately owns.
By default, most Active Directory domains allow authenticated users to create up to ten computer accounts. The exploit takes advantage of this default configuration by creating a machine account that the attacker legitimately owns.
If the certificate template lacks the required security extension (objectSid), and we control a user account, we can manipulate its attributes to request a certificate that gets mapped to a different identity, like a DA.
Privilege Escalation
5 techniques
Privilege Escalation
Where memory dumping came up empty, the agent fell back to the noPac vulnerabilities, CVE-2021-42278 and CVE-2021-42287. | “Where memory dumping came up empty, the agent fell back to the noPac vulnerabilities, CVE-2021-42278 and CVE-2021-42287.”
Finally, I authenticated using the issued certificate... Authentication succeeded, allowing me to impersonate the Domain Administrator without ever knowing the Administrator’s password.
Add Shadow Credentials Same as before, we’ll create shadow credentials using Certipy: certipy-ad shadow auto ... Adding shadow creds to james account | Modify the UPN ... we’ll set it to a DC machine account — in this case, LAB-DC.LAB.LOCAL for Schannel certificate-based authentication. certipy-ad account update ... -upn 'lab-dc$@lab.local'
Since the UPN now matches that of the administrator, the certificate will be mapped to the administrator account during authentication, allowing us to impersonate them.
If certificate templates are misconfigured, attackers can request certificates for other users, including Domain Administrators, leading to privilege escalation. In this lab, I exploited an ESC1 certificate template misconfiguration.
Stealth
2 techniques
Stealth
Finally, I authenticated using the issued certificate... Authentication succeeded, allowing me to impersonate the Domain Administrator without ever knowing the Administrator’s password.
Since the UPN now matches that of the administrator, the certificate will be mapped to the administrator account during authentication, allowing us to impersonate them.
Defense Impairment
1 technique
Defense Impairment
If the certificate template lacks the required security extension (objectSid), and we control a user account, we can manipulate its attributes to request a certificate that gets mapped to a different identity, like a DA.
Credential Access
10 techniques
Credential Access
This method relies on the ability to obtain the user’s NTLM hash using the PKINIT mechanism... Got NT hash for 'administrator@contoso.com'
Once operating as a Domain Controller, the attacker inherits one of the most sensitive privileges within Active Directory: directory replication. That privilege enables DCSync, a technique that requests password data directly through the Directory Replication Service Remote Protocol rather than reading the NTDS database from disk.
Instead of first validating the destination, the CA attempted to communicate with the supplied host using SMB and LDAP. That design decision created the opportunity for attackers to position themselves directly inside the enrollment workflow.
If the certificate template lacks the required security extension (objectSid), and we control a user account, we can manipulate its attributes to request a certificate that gets mapped to a different identity, like a DA.
«ESC8 (NTLM relay на HTTP enrollment endpoint) работает даже с непривилегированной учётной записью»
Once that certificate has been issued, it can be used with Kerberos PKINIT authentication to obtain Domain Controller credentials, enabling DCSync attacks that expose the krbtgt account and effectively hand over control of the domain.
“[The agent] exploited the S4U2self flaw to impersonate the domain controller, and forged a high-privilege service ticket.”
If an attacker obtains the krbtgt secret, they can forge Kerberos tickets that are trusted by every Domain Controller in the forest until the account password is reset appropriately. | Under specific deployment conditions, the CA can be convinced to issue a certificate containing the identity of a legitimate Domain Controller even though the request originated from an attacker-controlled machine.
It requested a ticket-granting ticket through the PaperCut server’s own domain computer account, exploited the S4U2self flaw to impersonate the domain controller, and forged a high-privilege service ticket.
« Attaques sur certificats via Certipy » ; « T1649 — Steal or Forge Authentication Certificates (Credential Access) »
Discovery
5 techniques
Discovery
Step 1 — Enumerate AD CS First, I looked for vulnerable certificate templates using Certipy.
The first step for threat actors after initial access is usually enumeration. Threat actors need to enumerate the certificate templates available for their compromised user as well as other AD attributes, in order to determine whether any of the ESC techniques is viable.
Python scripts ... ensure [tasks] have actually completed. These include tasks like administrator access, account verification, Active Directory collection, domain and network discovery.
"BloodHound uses graph theory to reveal the hidden and often unintended relationships within an Active Directory or Azure environment. Attackers can use BloodHound to easily identify highly complex attack paths"
Rather than inventing an entirely fake identity, the attacker returns carefully chosen information belonging to the real Domain Controller, including its objectSid and dNSHostName.
Lateral Movement
3 techniques
Lateral Movement
Use the auth command to authenticate as administrator and grab the NT hash: certipy auth -pfx administrator.pfx -domain lab.local -dc-ip 10.129.228.236 ... Retrieved the Administrator NT hash
Now using this hash, authenticate to Machine with evil-winrm... evil-winrm -i 10.10.11.41 -u management_svc -H a091c1832bcdd4677c28b5a6a1295584
Set RBCD on the DC ... the command modifies the msDS-AllowedToActOnBehalfOfOtherIdentity attribute on the DC’s computer object to include our new machine account.
Collection
2 techniques
Collection
«ESC8 (NTLM relay на HTTP enrollment endpoint) работает даже с непривилегированной учётной записью»
It leverages endpoint process and filesystem data to spot the creation of files with specific names or extensions associated with Certipy's information gathering and exfiltration activities.
Observables
2 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
8 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.