📖
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
  • Prerequisite
  • Configuring
  • Attacking
  • How it works
  • Tools
  • Executing the attack
  • Defending
  • Recommendations
  • Detection
  • References
Edit on GitHub
  1. Vulnerabilities & Misconfigurations & Attacks
  2. Initial Access Attacks
  3. Username Enumeration

Empty Password

It is possible that accounts have an empty password if the useraccountcontrol attribute contains the value PASSWD_NOT_REQ.

PreviousAS-REP RoastingNextSMB Relaying

Last updated 3 years ago

Configuring

Prerequisite

Configuring

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

2. Click on "View" and enable "Avanced Features"

3. Open "Employees", right click the user steve and click on "Properties"

4. Open "Attribute Editor", search for "Useraccountcontrol" and click "Edit".

5. Set the value to 544 and cick "OK".

6. Click "Apply" and "OK".

7. Right click on Steve and select "Reset Password". Uncheck "User must change password at next logon" and make sure the Password fields are empty. Click on "OK"

Attacking

How it works

It is possible that accounts have an empty password if the useraccountcontrol attribute contains the value PASSWD_NOT_REQ.

Tools

Executing the attack

  1. Check if any on the users have a empty password by spraying an empty password for all the enumerated users against DC02.

crackmapexec smb 10.0.0.3 -u users.txt -p '' -d amsterdam.bank.local

Spraying an empty password counts as a invalid login. So it is advised to not do this while also passwordspraying as it might cause account lockouts.

2. The user Steve has an empty password and could be used for further enumeration.

Defending

Recommendations

  • Periodically check for users with the PASSWD_NOT_REQ attribute and remove it.

Check for users with the attribute:

Get-ADUser -Filter {PasswordNotRequired -eq $true} | Select-Object samAccountName

Remove the attribute:

Set-ADAccountControl -PasswordNotRequired $false -Identity <USER>

Check for users with the attribute and remove the attribute:

Get-ADUser -Filter {PasswordNotRequired -eq $true} | Set-ADAccountControl -PasswordNotRequired $false

Detection

References

Crackmapexec
Username Enumeration
Find AD accounts using Password-Not-Required (blank password)Specops Software
GitHub - byt3bl33d3r/CrackMapExec: A swiss army knife for pentesting networksGitHub
Logo
Logo