Exploiting stale ADIDNS entries
Stale ADIDNS entries for disconnected workstations allow an attacker to take over their IP address and hostname, enabling coercion of authentication to the attacker's machine and subsequent RBCD or Shadow Credentials attacks. The attacker can then compromise the computer account without modifying any DNS entry.
Published on blog.scrt.ch
I realise this article will not help me with my colleagues who believe I just happen to get lucky on every assessment I’m on. Nevertheless, during a recent internal pentest, our first objective was to attempt to bypass the Network Access Control (NAC) mechanism.
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 lack of DNS scavenging for stale ADIDNS records, combined with default permissions allowing any authenticated user to create child DNS entries, lets an attacker claim an unused IP and its associated hostname.
Impact
An attacker could take over a computer account via RBCD or Shadow Credentials, but this requires LDAP signing and channel binding to be disabled and a coercion technique to trigger authentication.
What the attacker needed
Access to the local network; ability to assign an IP address; LDAP signing and channel binding disabled; a coercion technique available
The fix
Microsoft provides the option to scavenge stale resource records after a predetermined period, and other RBCD/Shadow Credentials mitigations should also be applied.
How it was found
- Retrieve all DNS entries from ADIDNS.
- Determine which entries are located on the current subnet.
- Check whether anything currently responds to that IP on the subnet.
- Statically configure your network interface with that IP.
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.
When a computer leaves the network, its DNS record (its name-to-IP mapping) often stays behind. If an attacker later gets that same IP address, they inherit the old computer's name. Other machines may still trust that name and send authentication requests to it, which the attacker can relay to take over the computer account.
What is Misconfiguration?
Settings left unsafe: exposed panels, open storage buckets, debug modes, default credentials.