repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
pwd-spraying.mdMarkdown103 lines4.3 KiBsource raw download

title: "Password - Spraying" section: "Active Directory" sectionSlug: "active-directory" sourcePath: "docs/active-directory/pwd-spraying.md" sourceUrl: "https://github.com/swisskyrepo/InternalAllTheThings/blob/203bb0c0b290/docs/active-directory/pwd-spraying.md" sha: "203bb0c0b290" isIndex: false#

Password - Spraying#

Password spraying refers to the attack method that takes a large number of usernames and loops them with a single password.

The builtin Administrator account (RID:500) cannot be locked out of the system no matter how many failed logon attempts it accumulates.

Most of the time the best passwords to spray are :

:warning: be careful with the account lockout !

Spray a pre-generated passwords list#

BadPwdCount attribute#

The number of times the user tried to log on to the account using an incorrect password. A value of 0 indicates that the value is unknown.

$ netexec ldap 10.0.2.11 -u 'username' -p 'password' --kdcHost 10.0.2.11 --users
LDAP        10.0.2.11       389    dc01       Guest      badpwdcount: 0 pwdLastSet: <never>
LDAP        10.0.2.11       389    dc01       krbtgt     badpwdcount: 0 pwdLastSet: <never>

Kerberos pre-auth bruteforcing#

Using ropnop/kerbrute, a tool to perform Kerberos pre-auth bruteforcing.

Kerberos pre-authentication errors are not logged in Active Directory with a normal Logon failure event (4625), but rather with specific logs to Kerberos pre-authentication failure (4771).