GPOddity: Exploiting Active Directory GPOs Through NTLM Relaying, And More!
The article describes how an attacker who can relay a user's NTLM authentication to LDAP can abuse that user's write permissions on a Group Policy Object to escalate privileges, because existing GPO exploitation tools fail in relaying contexts. It introduces a new technique that spoofs the GPO's file system path attribute so the malicious template is fetched from an attacker-controlled share, enabling domain takeover.
Published on synacktiv.com
Written by Quentin Roland - 04/09/2023 - in Pentest - Download
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the GPO's file location is stored in an LDAP attribute (gPCFileSysPath) that a user with write rights on the GPO can change, so the client fetches the policy template from an attacker-controlled share instead of SYSVOL.
Impact
An initially unauthenticated attacker could escalate from a relayed standard user to domain administrator, relying only on default Active Directory configurations and vulnerable GPO ACLs.
What the attacker needed
Network man-in-the-middle position; LDAP signing and channel binding disabled; relayed user has write rights on a GPO; GPO linked to sensitive objects
How it was found
- Place yourself in a man-in-the-middle position on the network to capture authentication.
- Relay the captured authentication of a user with write rights on the target GPO to the LDAP server.
- Use the relayed LDAP session to modify the GPO so its template is fetched from an attacker-controlled location.
- Wait for the GPO to be applied (about 5 minutes on domain controllers) so the malicious settings execute.
- Check that the attacker's account was added as a domain administrator.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
In a Windows domain, administrators push settings to computers using Group Policy Objects (GPOs), which are stored partly as directory entries and partly as files on a shared folder. If a normal user is allowed to edit one of these objects, an attacker who can impersonate that user's login (without knowing the password) can change the settings so that every affected machine runs the attacker's commands. This article shows a new way to do that impersonation trick, which older tools could not handle.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.