LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

impacket-getadusers

Enumerate Active Directory user accounts via LDAP

TLDR

Enumerate all domain users with their details
$ impacket-getadusers -all '[domain]/[user]:[password]'
copy
Query users specifying the domain controller IP
$ impacket-getadusers -all -dc-ip [192.168.1.100] '[domain]/[user]:[password]'
copy
Get users using NTLM hash authentication
$ impacket-getadusers -all -hashes ':[nthash]' '[domain]/[user]'
copy
Enumerate users via Kerberos authentication
$ impacket-getadusers -all -k -no-pass '[domain]/[user]'
copy
Output user information in a specific format
$ impacket-getadusers -all -dc-ip [192.168.1.100] '[domain]/[user]:[password]' 2>/dev/null
copy

SYNOPSIS

impacket-getadusers [-h] [-user USERNAME] [-all] [-dc-ip IP] [-dc-host HOSTNAME] [-hashes LMHASH:NTHASH] [-no-pass] [-k] [-aesKey KEY] target

DESCRIPTION

impacket-getadusers queries Active Directory via LDAP to enumerate user accounts and their attributes. It retrieves information such as usernames, last logon times, password last set dates, and account status flags.The tool is useful for reconnaissance during penetration tests to identify potential targets, find accounts with old passwords, or discover service accounts. Output includes the SAM account name, badPwdCount, and other relevant security attributes.

PARAMETERS

-all

Return all users in the domain
-user USERNAME
Query information for a specific user only
-dc-ip IP
IP address of the domain controller
-dc-host HOSTNAME
Hostname of the domain controller (used for Kerberos)
-hashes LMHASH:NTHASH
Use NTLM hashes for authentication instead of password
-no-pass
Don't ask for password (useful with -k or -hashes)
-k
Use Kerberos authentication from ccache file
-aesKey KEY
AES key to use for Kerberos authentication

INSTALL

sudo pacman -S impacket
copy

CAVEATS

Requires valid domain credentials. Output may be verbose; consider redirecting stderr to /dev/null for cleaner output. The -all flag is typically required to see results for more than just the authenticated user.

HISTORY

Part of the Impacket library developed by SecureAuth. The tool leverages LDAP queries against Active Directory, implementing Microsoft's directory service protocols in Python for cross-platform compatibility.

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