Skip to content
Info disclosure Write-up Beginner

‍♂️How I Escalated From Domain User to Domain Admin

A domain controller allowed unauthenticated SMB null sessions, exposing a Group Policy Preferences file that held a service account password encrypted with a key Microsoft published. The attacker decrypted the password, logged in as the service account, read a user flag from the Users share and began enumerating the domain.

jabaribrown62 Follow

Published on medium.com

If you’re interested in more Active Directory fun, check out my previous article on over-permissive file shares: https://medium.com/@jabaribrown62/the-danger-of-over-permissive-file-shares-bea10fab5190

Jabaribrown, on medium.com

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 domain controller permitted anonymous SMB null sessions and stored a Group Policy Preferences cpassword, which is encrypted with a publicly known key.

Impact

An unauthenticated attacker could recover a valid service account password and read files on the domain controller, and the account could then be used to enumerate the domain.

What the attacker needed

Network access to SMB port 445; null session allowed on the DC

The fix

Anonymous SMB access should be blocked and Group Policy Preferences passwords should be removed, since the encryption key is public.

How it was found

  1. Scan the host and identify the domain, LDAP, Kerberos and SMB services
  2. Connect to SMB with empty username and password to get a null session
  3. List shares and find the Replication share is readable
  4. Spider the share and download the policy files, including Groups.xml
  5. Decrypt the cpassword from Groups.xml to recover the service account password
  6. Log in as the service account, read the Users share and retrieve the user flag

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.

A Windows domain is a network where one server, the domain controller, checks everyone's login. Here that server let anyone connect to its file shares without a username or password, and one readable file contained a service account password that was only weakly scrambled, using a key Microsoft made public. The attacker unscrambled it, logged in as that account and read files they should not have seen.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by jabaribrown62

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.