📖
Building a Windows AD lab
  • Building a Windows AD lab
  • Lab-setup
    • Lab overview
    • Building the lab
      • Prerequisite
      • Creating images
        • Optional: Install software & Settings
      • Network setup
      • Cloning & Creating VM's
      • Creating bank.local
        • Creating Domain Controller - DC01
          • Enable RDP
        • Creating amsterdam.bank.local
          • Creating Domain Controller - DC02
            • Creating a AD structure
            • Create a CA
            • Configure LDAPS
          • Creating Fileserver - FILE01
            • File services
          • Creating W10 client - WS01
            • PSRemoting
          • Creating Webserver - WEB01
            • Web Services
            • SQL Server
              • Create database
      • Creating secure.local
        • Creating Domain Controller - DC03
        • Creating File/SQL Server - DATA01
          • SQL Server
            • Create database
    • Attack Paths
      • Attack path 1 (hard)
        • Configuring
        • Tasks
        • Manual
      • Attack path 2
        • Configuring
        • Task
        • Manual
    • Troubleshooting
    • To-Do
  • Vulnerabilities & Misconfigurations & Attacks
    • Initial Access Attacks
      • Username Enumeration
        • Password Spraying
        • AS-REP Roasting
        • Empty Password
      • SMB Relaying
      • SMB Null-Session (To-Do)
      • SQL Server default login
    • Active Directory Attacks
      • Password spraying
      • AS-REP Roasting
      • Empty password
      • Password in description
      • Kerberoasting
      • Delegation Attacks
        • Unconstrained Delegation
          • Printerbug
        • Constrained Delegation
        • Resource Based Constrained Delegation
          • Computeraccount Takeover
          • Change-LockScreen
          • Webclient Attack (todo)
      • DACL-Abuses
        • Write Owner
        • Owns
        • WriteDacl
        • GenericAll
        • GenericWrite (todo)
        • ForceChangePassword
        • Add user to group (todo)
        • Targeted Kerberoast (todo)
        • Get-Changes
      • Reused local administrator (todo)
      • SQL Server Attacks (todo)
        • Initial Access
          • SQL Server default login
          • Normal domain user access
        • Privilege Escalation
          • Impersonation
          • DB-Owner
          • Enumerate Logins
            • Weak passwords
        • Executing Commands
        • Database-Links
        • Capturing hashes & Relaying
      • Reading LAPS passwords (todo)
      • Priviliged Groups (todo)
        • DNS-Admins (todo)
        • Account Operators (todo)
        • Backup Operators
        • Server Operators (todo)
      • Hopping domains and forests
        • Child to parent domain
          • Krbtgt hash
          • Trust key
        • Cross forest Attacks (todo)
          • Foreign user
    • Misc
      • Reverse shell trick
      • Lateral Movement
        • PSRemoting
        • PsExec (todo)
      • Misconfigured Service (todo)
        • Unqouted Service Path
      • Discovering Shares
      • Password on shares
      • Different methods of dumping credentials
        • LSASS (todo)
        • Dumping DPAPI
          • Browser passwords
        • Scheduled tasks (todo)
        • Services (todo)
        • Vssadmin Shadow Copy
      • ms-ds-machineaccountquota (todo)
      • add DNS Records (todo)
      • Bypassing UAC
    • Template page
  • Defence
    • Detection
    • Hardening
      • LDAP
        • LDAP Signing
        • LDAPS Binding
      • Strong Password Policy
      • Change who can join computers to the domain
      • Protected users group
      • Account is sensitive and cannot be delegated
      • Powershell Execution Policy
      • Template page
Powered by GitBook
On this page
  • Configuring
  • Attacking
  • How it works
  • Tools
  • Executing the attack
  • Defending
  • Recommendations
  • Detection
  • References
Edit on GitHub
  1. Vulnerabilities & Misconfigurations & Attacks
  2. Active Directory Attacks

Password in description

A old habit from IT people was to write down the password for shared user accounts in the description field, which every user with a bit of knowledge can read from all users!

PreviousEmpty passwordNextKerberoasting

Last updated 2 years ago

Configuring

  1. Login to DC02 as Administrator with the password Welcome01!.

  2. Open the "Active Directory Users and Computers" administration tool on DC02.

3. Open the "Emplyees" OU and right click on it, select "New" and then "User". Name the user helpdesk and set the password SuperSecretField1!. Make sure to deselect "User must change password at next logon" and select "Password never expires".

4. Right click the user helpdesk and select "Properties". In the "General" tab fill in the password SuperSecretField1! in the description field. Then click on "Apply" and "OK".

Attacking

How it works

Every domain user is able to retrieve the non-protected attributes of all objects. One of these attributes is the description field. IT people used to save passwords in these fields, because its easy for them to see it in the Active Directory Users and Computers tool. But as I said, every user can see these attributes. So requesting all users with a description field, might give you access to other accounts.

Tools

Executing the attack

  1. Login with the username John and password Welcome2022! on WS01.

  2. Start PowerShell and download and execute an amsi and PowerView in memory:

3. The following command request all domain users with a value in the description attribute and then only selects the samaccountname and description attributes:

Get-DomainUser | Where-Object -Property description | Select-Object samaccountname, description

The description from helpdesk looks like a password.

4. Run PowerShell as another user (Shift rightlick) and fill in the username helpdesk and password SuperSecretField1!.

If a PowerShell session opens it worked:

It might be interesting to also check the descriptions of groups and computers. Never found password but sometimes some usefull information about the groups and systems!

Defending

Recommendations

  • Periodically check for passwords in the description attribute and remove any passwords found.

Check for users with the attribute:

Get-ADUser -Filter {description -like '*'} -Properties samaccountname, description | Select-Object samaccountname, description

Remove the attribute:

Set-ADUser <USER> -Description $null

Detection

References

PowerView
Password? See
PowerSploit/PowerView.ps1 at master · PowerShellMafia/PowerSploitGitHub
Logo
Logo