LDAPNightmare, a PoC exploit targets Windows LDAP flaw CVE-2024-49113

Pierluigi Paganini January 03, 2025

Experts warn of a new PoC exploit, LDAPNightmare, that targets a Windows LDAP flaw (CVE-2024-49113), causing crashes & reboots.

The vulnerability CVE-2024-49113 (CVSS score of 7.5), named LDAPNightmare, is a Windows Lightweight Directory Access Protocol (LDAP) Denial of Service flaw that was discovered by the researcher Yuki Chen.

An attacker can exploit the now-patched vulnerability to trigger a denial of service condition.

On December 10, 2024, two critical LDAP vulnerabilities (CVE-2024-49112, CVSS 9.8, and CVE-2024-49113) were disclosed by Yuki Chen in Microsoft’s Patch Tuesday update.

Researchers at SafeBreach Labs developed a proof of concept exploit for this vulnerability that crashes any unpatched Windows Server (not just Domain Controllers) with Internet connectivity.

“SafeBreach Labs developed a proof of concept exploit for CVE-2024-49113 that crashes any unpatched Windows Server (not just DCs) with no pre-requisites except that the DNS server of the victim DC has Internet connectivity.” states the report published by SafeBreach.

The attack devised by the researchers involves an attacker manipulating a victim server to send DNS and LDAP requests, culminating in a crafted LDAP response that crashes the LSASS process and reboots the server.

Below is the attack sequence devised by the researchers:

  • The Attacker sends a CLDAP referral response packet with a specific value resulting in LSASS to crash and force a reboot of the Victim server
  • The attacker sends a DCE/RPC request to the Victim Server Machine
  • The Victim is triggered to send a DNS SRV query about SafeBreachLabs.pro
  • The Attacker’s DNS server responds with the Attacker’s hostname machine and LDAP port 
  • The Victim sends a broadcast NBNS request to find the IP address of the received hostname (of the Attacker’s)
  • The Attacker sends an NBNS response with its IP Address
  • The Victim becomes an LDAP client and sends a CLDAP request to the Attacker’s machine
LDAPNightmare

The researchers speculate that the same attack could allow a remote attacker to execute arbitrary code on vulnerable servers by modifying the CLDAP packet. 

“This research set out to explore whether  the LDAP CVE-2024-49113 vulnerability could be exploited. Our research proved that not only can it be exploited  against Domain Controllers, it also affects any unpatched Windows Server.” concludes SafeBreach. “In addition, we provided an exploit PoC for testing purposes, noted in the section above.
We also believe that this will make exploitation of CVE-2024-49112 more likely in the near future, so we recommend patching both vulnerabilities.”

Organizations are urged to apply Microsoft’s patch to address the vulnerability. Due to the critical nature of patching domain controllers and Windows Servers, organizations should proceed cautiously. In the interim, implementing detections for suspicious CLDAP referral responses, DsrGetDcNameEx2 calls, and DNS SRV queries is recommended until the patch is applied.

The report includes a technical deep dive for CVE-2024-49113.

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, newsletter)



you might also like

leave a comment