In a recent discovery, researchers have identified a critical vulnerability in Windows LDAP services, specifically the CVE-2024-49112, which poses a serious threat to unpatched Domain Controllers. This vulnerability, when exploited, allows remote code execution on vulnerable systems, creating a gateway for malicious actors to gain unauthorized access to critical systems and data.
The exploit takes advantage of a zero-click attack scenario, where attackers can craft malicious LDAP requests that exploit a memory corruption vulnerability within the LDAP service. This remote code execution flaw resides within the wldap32.dll library, a core component of the LDAP client implementation in Windows systems.
Upon receiving the malicious request, the vulnerable Domain Controller attempts to process it, leading to a memory crash and potential system instability. This instability can be exploited by threat actors to gain initial access to the domain, opening up possibilities for further compromising sensitive information and systems.
To execute this attack, the attacker utilizes the DsrGetDcNameEx2 function to trigger remote LDAP requests on the victim’s Domain Controller. By manipulating the DomainName parameter to a domain controlled by the attacker, the attacker can deceive the victim DC into sending DNS queries to a subdomain controlled by the attacker. This manipulation ultimately leads to the victim DC sending an LDAP request to the attacker’s controlled domain.
Furthermore, the attacker crafts a malicious LDAP response packet to take advantage of the LdapChaseReferral vulnerability. By manipulating specific values within the packet, the attacker triggers a vulnerability check within the LdapChaseReferral function, potentially leading to remote code execution on the victim’s DC.
The impact of this vulnerability stretches beyond just Domain Controllers, as SafeBreach research has demonstrated successful exploitation on any unpatched Windows Server. By manipulating LDAP referrals with specific values, researchers were able to create an exploit chain that leverages DNS SRV queries and DsrGetDcNameEx2 calls to trigger memory corruption and potential remote code execution.
In response to this critical security threat, organizations are advised to implement necessary patches and detection mechanisms to safeguard their systems against potential exploitation. Mitigation strategies include monitoring and blocking suspicious LDAP referrals and system calls, along with deploying the latest security updates to patch the CVE-2024-49112 vulnerability.
As cyber threats continue to evolve, it is crucial for organizations to stay vigilant and proactive in defending against such sophisticated attacks. By understanding the mechanisms behind these exploits and taking appropriate security measures, businesses can strengthen their cybersecurity posture and protect themselves from potential data breaches and system compromises.

