Password Policy

active_directory_enumeration_attacks broken_authentication adenumeration

Before attempting attacks such as Password Spraying or even brute forcing, we often want to learn more about the password policy to:

  • πŸ›‘οΈ Is account lockout enabled?
  • πŸ₯· How much delay must we add before tries?
  • ⚠️ How many tries can we perform before locking the account?
  • πŸ—ΊοΈ Is there a minimum/maximum password length?
  • 🐲 Is password complexity enabled?

We want to avoid locking accounts at all cost️.

On Windows Server, there is no lockout by default, but many implement a lockout after three or five invalid passwords. Account lockout threshold reset is usually between 30 minutes and 3 hours.

Knowing the minimum length of the password and the password rules is handy to fine-tune the passwords we try.


Obtain Windows Password Policy

Leveraging SMB

active_directory_enumeration_attacks

You can use SMB credentials to obtain the password policy.

$ nxc smb [...] --pass-pol
$ nxc smb [...] --users # show 'badpasswordcount' for each user
$ enum4linux-ng [...] -P

Leveraging RPC

active_directory_enumeration_attacks

You can use RPC credentials to obtain the password policy.

$ rpcclient [...]
client> getdompwinfo    # Password Policy

Leveraging Windows Commands

active_directory_enumeration_attacks adenumeration

If you can run commands, you may use:

PS> net accounts
PS> net accounts /domain

This one from AD module may be handy:

PS> Get-ADObject -Filter 'badPwdCount -gt 0' -includeDeletedObjects

Additional Notes

active_directory_enumeration_attacks

You can use PowerView:

PS> Get-DomainPolicy

Website Password Policy

Register Page

broken_authentication

The password policy is often shown, directly or indirectly when registering an account. If indirect, you have to register an account with a weak password (a, a0, a0!, etc.) and read expose it bit by bit.