krbrelayx
Kerberos relaying and unconstrained delegation abuse toolkit. This tool can add/remove/modify Service Principal Names on accounts in AD over LDAP.
Description
krbrelayx is a Kerberos relay and unconstrained delegation abuse tool designed for attacking Active Directory environments. It enables relaying Kerberos authentication to perform various attacks including SMB execution, LDAP modifications, and AD CS certificate abuse. The toolkit supports watching target files for dynamic updates and storing tickets for later use.
Use cases include compromising domain controllers, escalating privileges via unconstrained delegation, dumping hashes with secretsdump.py, enumerating local admins, and performing ACL attacks on LDAP. It integrates with tools like addspn for SPN management and dnstool for DNS record manipulation in AD-integrated DNS.
The tool requires Python dependencies such as impacket, ldap3, and dnspython, and is part of a broader suite including printerbug for printer spooler exploits. It targets hostnames specifically due to Kerberos requirements.
How It Works
krbrelayx performs Kerberos ticket relaying by intercepting authentication attempts and redirecting them to specified targets over SMB, LDAP, or AD CS protocols. For unconstrained delegation abuse, it uses provided Kerberos keys (password, hex password, salt) to impersonate accounts. On relay success, it executes commands, dumps hashes via secretsdump.py, adds Domain Admins, modifies ACLs, or requests certificates using ESC1/ESC6 techniques with custom templates and altNames. LDAP operations add/remove/modify SPNs, while SMB options enable command execution or local admin enumeration via SAMR lookups.
Installation
sudo apt install krbrelayxFlags
Examples
krbrelayx -hkrbrelayx.py -t smb://server:445krbrelayx.py -tf targets.txtkrbrelayx.py -tf targets.txt -wkrbrelayx.py -p password -s usernamekrbrelayx.py -e file.txtkrbrelayx.py -c 'whoami'krbrelayx.py --adcs --template DomainController