Skip to main content
Mallory
HighCISA KEVExploited in the wildPublic exploit

NoPac Domain Controller Impersonation in Active Directory Domain Services

IdentifiersCVE-2021-42287CWE-269

CVE-2021-42287 is an Active Directory Domain Services elevation-of-privilege vulnerability in Microsoft Windows Server, commonly referred to as the Domain Controller Impersonation component of the NoPac attack chain. In practice, it is typically abused together with CVE-2021-42278 (sAMAccountName spoofing). The provided content indicates that, when chained, an attacker can manipulate account naming and Kerberos behavior to obtain a Kerberos service ticket for a Domain Controller computer account, effectively allowing a regular domain user to impersonate a domain administrator or domain controller context. The issue affects Windows Active Directory environments and is relevant to Kerberos ticket issuance and account identity handling in AD.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation, especially when combined with CVE-2021-42278, enables privilege escalation in Active Directory from a low-privileged domain user to highly privileged domain context. The content specifically states that attackers can obtain a Kerberos service ticket for a Domain Controller computer account, impersonate a domain administrator, and potentially take control of the domain controller or the broader domain environment. This can lead to full domain compromise, including administrative control over Active Directory.

Mitigation

If you can’t patch tonight, do this now.

In addition to patching, reduce attack preconditions by setting MachineAccountQuota for standard users to 0 where operationally feasible, since the content identifies a machine account quota greater than zero as a requirement for common exploitation paths. Monitor for suspicious computer-account creation, renaming, password reset, and Kerberos TGT/TGS activity on domain controllers. Splunk guidance in the content highlights correlation of account rename events with near-immediate Kerberos TGT requests as a useful detection pattern. Any evidence of exploitation attempts, especially following another enterprise compromise such as VPN appliance intrusion, should trigger incident response and broader environment investigation.

Remediation

Patch, then assume compromise.

Apply Microsoft's security updates released on 2021-11-09 for CVE-2021-42287 and the related CVE-2021-42278 across all domain controllers. The content specifically emphasizes verifying that all domain controllers are patched, because successful exploitation requires at least one unpatched domain controller. Organizations should also review domain controller logs for suspicious activity associated with exploitation attempts, including relevant Windows Security Event IDs such as 4741, 4742, 4781, 4768, 4724, 4673, and 5156 where applicable to their monitoring strategy.
PUBLIC EXPLOITS

Exploits

5 valid exploits after Mallory filtered fakes, detection scripts, and README-only repos (5 hidden).

VALID 5 / 10 TOTALView more in app
noPacMaturityPoCVerified exploit

This repository is a Python-based exploit for chaining CVE-2021-42278 and CVE-2021-42287 against Microsoft Active Directory Domain Controllers. The main exploit logic is in 'exp.py', which automates the attack chain: it creates a new computer account, renames it to impersonate the DC, obtains Kerberos tickets as a privileged user, and then uses these tickets to either execute commands (via 'smbexec.py') or dump password hashes (via 'secretsdump.py'). Supporting modules in the 'utils' directory handle Kerberos ticket requests, LDAP operations, and computer account management. The exploit is operational and provides both shell access and credential dumping capabilities if the target is vulnerable. The attack is performed over the network and targets the DC's IP address, requiring valid domain credentials and network access to the DC. The repository is structured with a clear separation between the main exploit, supporting scripts, and utility modules.

waterrrDisclosed Dec 13, 2021pythonnetwork
noPacMaturityPoCVerified exploit

This repository is a C# implementation of the 'noPac' exploit, targeting the combination of CVE-2021-42287 and CVE-2021-42278 in Microsoft Active Directory Domain Controllers. The exploit enables a low-privileged domain user to escalate privileges to Domain Admin by abusing flaws in the Kerberos protocol and Active Directory object management. The codebase is structured as a Visual Studio solution with a main entry point in 'noPac/Program.cs'. Supporting libraries handle ASN.1 parsing, Kerberos protocol operations, LDAP manipulation, cryptographic operations, and ticket forging. The exploit works by creating a new machine account, manipulating its attributes via LDAP, requesting Kerberos tickets (TGTs) for the new account, and then leveraging S4U (Service for User) functionality to impersonate privileged accounts. The tool communicates with Domain Controllers over standard ports (TCP 88 for Kerberos, TCP 389 for LDAP, and TCP 464 for kpasswd). The repository is mature and operational, providing a full exploit chain rather than just a proof of concept. It is not part of a larger exploitation framework but is a standalone tool. The README and code comments credit prior research and tools such as Rubeus and SharpMad, and recommend patching Domain Controllers to mitigate the vulnerabilities.

cube0x0Disclosed Dec 11, 2021csharpnetwork
noPacMaturityPoCVerified exploit

This repository is a C# implementation of the 'noPac' exploit, which targets a combination of two critical Active Directory vulnerabilities: CVE-2021-42278 (sAMAccountName spoofing) and CVE-2021-42287 (KDC confusion). The exploit allows an attacker with domain user credentials to escalate privileges to domain admin by manipulating machine accounts and Kerberos tickets. The codebase is structured as a Visual Studio solution with a main entry point in 'noPac/Program.cs', and supporting libraries for Kerberos protocol manipulation, ASN.1 parsing, cryptography, and ticket forging. The exploit works by creating or modifying a machine account, requesting a TGT as that account, and then leveraging the vulnerabilities to obtain a TGT for the domain controller. The attacker can then use Pass-the-Ticket (PTT) to inject the ticket and gain access to domain resources as a privileged user. The repository is operational and provides a working exploit, not just a proof of concept. It is not part of a larger exploitation framework, but is a standalone tool. The code is well-structured and modular, with clear separation between Kerberos protocol logic, cryptographic operations, and exploit orchestration. The README provides detailed usage instructions and example commands, as well as environmental requirements (Windows, .NET 4.0+).

TryA9ainDisclosed Dec 22, 2022csharpnetwork
sam-the-adminMaturityPoCVerified exploit

This repository is a Python-based exploit chain targeting Microsoft Active Directory environments vulnerable to CVE-2021-42278 and CVE-2021-42287. The main script, 'sam_the_admin.py', orchestrates the attack by creating a new computer account, renaming its sAMAccountName to match a Domain Controller, obtaining a Kerberos TGT as the DC, and then using S4U2self/S4U2proxy to impersonate a Domain Admin. The exploit leverages impacket and related libraries for LDAP and Kerberos operations. After successful exploitation, the attacker can use impacket-smbexec to obtain a shell or impacket-secretsdump to extract secrets from the DC. The code is modular, with helper scripts in the 'utils' directory handling LDAP, Kerberos, and SAMR operations. The exploit is operational and provides a practical attack path for privilege escalation from a standard domain user to Domain Admin in unpatched environments.

safebufferDisclosed Dec 11, 2021pythonnetwork
noPacMaturityPoCVerified exploit

This repository is a Python-based exploit toolkit targeting Microsoft Active Directory environments vulnerable to CVE-2021-42278 and CVE-2021-42287. The main exploit script is `noPac.py`, which chains these vulnerabilities to escalate privileges from a standard domain user to Domain Admin by manipulating computer account attributes and abusing Kerberos delegation (S4U2Self/S4U2Proxy). The toolkit allows attackers to: - Add or rename computer accounts in the domain (abusing MachineAccountQuota or CreateChild permissions) - Request Kerberos service tickets as privileged users (impersonation) - Dump domain hashes (NTDS.dit) using secretsdump techniques - Obtain a remote shell on the domain controller via SMB (smbexec) The repository includes supporting modules for LDAP/Kerberos operations, computer account management, hash dumping, and remote command execution. There is also a `scanner.py` script for vulnerability detection. The exploit is operational and provides real post-exploitation capabilities, including hash extraction and shell access. The code is modular, leveraging Impacket and ldapdomaindump libraries, and is intended for use in penetration testing or red teaming against unpatched Windows AD environments.

RidterDisclosed Dec 13, 2021pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Microsoft CorporationWindows Server 2004operating_system
Microsoft CorporationWindows Server 2008operating_system
Microsoft CorporationWindows Server 2008 R2operating_system
Microsoft CorporationWindows Server 2008 Sp2operating_system
Microsoft CorporationWindows Server 2012operating_system
Microsoft CorporationWindows Server 2012 R2operating_system
Microsoft CorporationWindows Server 2016operating_system
Microsoft CorporationWindows Server 2019operating_system
Microsoft CorporationWindows Server 2022operating_system
Microsoft CorporationWindows Server 20h2operating_system

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence2

Every observed campaign linking this CVE to a named adversary.

Associated malware3

Malware families riding this exploit, with evidence and IOCs.

Detection signatures1

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.