Skip to main content

Overview

impacket-GetNPUsers performs AS-REP Roasting by targeting accounts that have Kerberos pre-authentication disabled (DONT_REQUIRE_PREAUTH). The KDC returns an AS-REP encrypted with the user’s password hash, which can be cracked offline.

With Valid Credentials

Enumerate all domain accounts with pre-auth disabled:

With Password

With NTLM Hash

This queries LDAP for all accounts with UF_DONT_REQUIRE_PREAUTH. Add -request to actually fetch the AS-REP hashes — without it you only get the list of vulnerable accounts.

Without Credentials

When you have no valid domain credentials, supply a list of known or guessed usernames. No authentication is required because pre-auth is disabled for these accounts.
Note the trailing / after the domain with no username.

Single User (No Credentials)


Request AS-REP for Specific User

With credentials, request the AS-REP hashes (use -usersfile with a single name to narrow the target). GetNPUsers has no -request-user flag — the positional account is the authenticating user, not the target:
Without credentials:

Output Format

Hashcat Format (Default)

Output:

John Format

Output:

Save to File


Cracking with Hashcat

AS-REP hashes use hashcat mode 18200:

With Rules

With John the Ripper


From User List File

Build a username list and spray for AS-REP Roastable accounts:
Accounts with pre-auth enabled return KDC_ERR_PREAUTH_REQUIRED (not vulnerable). Accounts that don’t exist return KDC_ERR_C_PRINCIPAL_UNKNOWN. Only vulnerable accounts return a hash.

Kerberos Authentication

Use an existing TGT to enumerate without NTLM:
When using -k, provide -dc-host with the FQDN instead of -dc-ip.

Quick Reference