kerbrute

repository·master·Indexed 25 days ago

https://github.com/ropnop/kerbrute

A tool for quickly enumerating valid Active Directory accounts and performing brute force attacks, including password spraying and user brute forcing, through Kerberos Pre-Authentication. It includes commands for user enumeration (userenum), password spraying (passwordspray), single-user brute forcing (bruteuser), and username:password combination testing (bruteforce).

Tokens
1.8K
Snippets
5
Records
14
Agent score
77%

What's inside kerbrute

  1. Install Kerbrute

    master

    You can install Kerbrute using pre-compiled binaries, via Go, or by compiling from source using make.

    Using Go

    go get github.com/ropnop/kerbrute

    Compiling from source

    If you have the repository cloned, use the make command to build binaries for different architectures:

    • make windows: Build Windows x86 and x64 binaries.
    • make linux: Build Linux x86 and x64 binaries.
    • make mac: Build Darwin (Mac) x86 and x64 binaries.
    • make all: Build binaries for Windows, Linux, and Mac x86/x64.
    go get github.com/ropnop/kerbrute
  2. Bruteforce username:password combos via bruteforce

    master

    The bruteforce command reads username:password combinations from a file or stdin and tests them via Kerberos Pre-Authentication. It skips blank lines or lines with missing components.

    WARNING: This generates Windows event IDs 4768 and 4771.

    Required Flags:

    • -d, --domain <string>: The full domain to use.

    Example (using stdin):

    cat combos.lst | ./kerbrute -d lab.ropnop.com bruteforce -
    cat combos.lst | ./kerbrute -d lab.ropnop.com bruteforce -
  3. Perform password spraying via passwordspray

    master

    The passwordspray command performs a horizontal brute force attack by testing a single password against a list of domain users.

    WARNING: This will increment failed login counts and can lock out accounts. It generates Windows event IDs 4768 and 4771.

    Required Flags:

    • -d, --domain <string>: The full domain to use.

    Example:

    ./kerbrute_linux_amd64 passwordspray -d lab.ropnop.com domain_users.txt Password123
    ./kerbrute_linux_amd64 passwordspray -d lab.ropnop.com domain_users.txt Password123
  4. Bruteforce a single user via bruteuser

    master

    The bruteuser command performs a traditional brute force attack against a specific username using a password wordlist.

    WARNING: Only run this if you are certain there is no lockout policy in place. This generates Windows event IDs 4768 and 4771.

    Required Flags:

    • -d, --domain <string>: The full domain to use.

    Example:

    ./kerbrute_linux_amd64 bruteuser -d lab.ropnop.com passwords.lst thoffman
    ./kerbrute_linux_amd64 bruteuser -d lab.ropnop.com passwords.lst thoffman
  5. Enumerate valid domain usernames via userenum

    master

    The userenum command identifies valid domain usernames by sending TGT requests without pre-authentication. If the KDC prompts for pre-authentication, the username is valid. This method does not cause login failures and will not lock out accounts.

    Required Flags:

    • -d, --domain <string>: The full domain to use (e.g., contoso.com).

    Example:

    ./kerbrute_linux_amd64 userenum -d lab.ropnop.com usernames.txt
    ./kerbrute_linux_amd64 userenum -d lab.ropnop.com usernames.txt
  6. Use Kerbrute CLI

    master

    Kerbrute is a tool designed to perform bruteforce attacks against Windows Kerberos to identify valid Active Directory accounts via Kerberos Pre-Authentication.

    Warning: Failed Kerberos Pre-Auth attempts count as failed logins and will lock out accounts. Use the --safe flag to mitigate this risk.

  7. Kerbrute CLI Flags Reference

    master

    Common flags available across Kerbrute commands:

    FlagDescription
    --dc <string>The location of the Domain Controller (KDC) to target. If blank, will lookup via DNS.
    --delay <int>Delay in millisecond between each attempt. Will always use single thread if set.
    -d, --domain <string>The full domain to use (e.g. contoso.com).
    --downgradeForce downgraded encryption type (arcfour-hmac-md5).
    --hash-file <string>File to save AS-REP hashes to (if any captured), otherwise just logged.
    -o, --output <string>File to write logs to.
    --safeSafe mode. Will abort if any user comes back as locked out. Default: FALSE.
    -t, --threads <int>Threads to use (default 10).
    -v, --verboseLog failures and errors.
  8. Configure Kerbrute persistent flags

    master

    The following flags are available globally for all Kerbrute commands:

    FlagShorthandDescription
    --domain-dThe full domain to use (e.g. contoso.com)
    --dcThe location of the Domain Controller (KDC) to target. If blank, will lookup via DNS
    --output-oFile to write logs to. Optional
    --verbose-vLog failures and errors
    --safeSafe mode. Will abort if any user comes back as locked out. Default: false
    --threads-tNumber of threads to use. Default: 10
    --delayDelay in milliseconds between each attempt. If set, the tool will always use a single thread
    --downgradeForce downgraded encryption type (arcfour-hmac-md5)
    --hash-fileFile to save AS-REP hashes to (if any captured), otherwise just logged
  9. Configure passwordspray flags

    master

    When using the passwordspray command, you can use the following flag to modify the spray behavior:

    • --user-as-pass: If set, the tool will spray every account using the username itself as the password. When using this flag, you do not need to provide a second argument for the password.
  10. Use the passwordspray command

    master

    The passwordspray command performs a password spray attack against a list of users using Kerberos Pre-Authentication by requesting a TGT from the KDC. If no domain controller is specified, the tool attempts to look one up via DNS SRV records. A full domain is required and will be capitalized to serve as the Kerberos realm.

    WARNING: Use with caution; failed Kerberos pre-authentication can cause account lockouts.

    Successful logins are displayed on stdout.

  11. Bruteforce a single user's password with bruteuser

    master

    The bruteuser command performs a password bruteforce against a single domain user using Kerberos Pre-Authentication by requesting a TGT from the KDC.

    Key Behaviors:

    • If no domain controller is specified, the tool attempts to look one up via DNS SRV records.
    • A full domain is required; the tool will capitalize this domain and use it as the Kerberos realm.
    • WARNING: Only run this if there is no account lockout policy in place, as it will attempt every password in the provided list.
    • The command supports reading passwords from a file or from stdin (using -).