CVE-2021-42278

7.5 HIGH

📋 TL;DR

CVE-2021-42278 is an elevation of privilege vulnerability in Active Directory Domain Services (AD DS) that allows an authenticated attacker to gain domain administrator privileges by exploiting a flaw in how AD handles security identifiers (SIDs). It affects Windows Server systems running AD DS, particularly when combined with CVE-2021-42287. This vulnerability enables attackers to escalate from a standard domain user to full domain control.

💻 Affected Systems

Products:
  • Windows Server
Versions: Windows Server 2008 SP2 and later versions, including Server 2012, 2016, 2019, and 2022.
Operating Systems: Windows Server
Default Config Vulnerable: ⚠️ Yes
Notes: Vulnerability is present in default AD DS configurations; exploitation often involves combining with CVE-2021-42287 for full domain compromise.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker gains domain administrator privileges, leading to complete compromise of the Active Directory environment, including data theft, ransomware deployment, and persistent backdoors.

🟠

Likely Case

Attackers exploit this to escalate privileges within a domain, often as part of a chain with other vulnerabilities, resulting in lateral movement and credential harvesting.

🟢

If Mitigated

With proper patching and monitoring, impact is limited to isolated incidents, but unpatched systems remain at high risk of domain takeover.

🌐 Internet-Facing: LOW, as exploitation typically requires authenticated access to internal AD services, not directly internet-exposed.
🏢 Internal Only: HIGH, as internal attackers or compromised accounts can exploit this to gain domain-wide control from within the network.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires authenticated domain user access and knowledge of AD internals; tools like SamTheAdmin are publicly available for demonstration.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Patches released in November 2021; specific KB numbers vary by OS version (e.g., KB5007206 for Windows Server 2019).

Vendor Advisory: https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-42278

Restart Required: Yes

Instructions:

1. Apply the latest security updates from Microsoft for your Windows Server version. 2. Restart the server to complete the installation. 3. Ensure all domain controllers are patched to prevent exploitation.

🔧 Temporary Workarounds

Enable SID Filtering

windows

Configure SID filtering on trust relationships to block malicious SID manipulations, though this may impact legitimate cross-domain operations.

Use PowerShell or Group Policy to adjust trust settings; specific commands depend on environment.

🧯 If You Can't Patch

  • Monitor for unusual account modifications and SID-related events in AD logs.
  • Restrict domain user privileges and implement least-privilege access to limit potential damage.

🔍 How to Verify

Check if Vulnerable:

Check if patches for November 2021 or later are installed on domain controllers; use 'systeminfo' or PowerShell to verify KB numbers.

Check Version:

wmic qfe list | findstr KB5007206 (adjust KB number for your OS version)

Verify Fix Applied:

Confirm that the patch KB is listed in installed updates and test with known exploit tools in a controlled environment.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SID history modifications in AD event logs (Event ID 4765, 4766).
  • Suspicious account creation or privilege escalation events.

Network Indicators:

  • Anomalous LDAP queries related to SID manipulation from non-trusted sources.

SIEM Query:

EventID=4765 OR EventID=4766 | where SIDHistory contains suspicious patterns

🔗 References

📤 Share & Export