Auth & Kerberos Setup
Every impacket tool accepts credentials in the same three forms. Set up once, reuse everywhere.- Password
- NT Hash
- Kerberos
Pass credentials inline:
domain/user:password@targetAlways use the DC/target hostname with
-k, never the IP. If DNS doesn’t resolve, add the host to /etc/hosts and point to $DC_IP.krb5.conf Template
Linux Kerberos tools read/etc/krb5.conf to know which KDC to contact and how to map realms to domains. Without it, most tools either fail or fall back to DNS discovery (which may not work inside a lab).
DOMAIN.LOCAL with your domain in uppercase, domain.local with the lowercase FQDN, and dc01.domain.local with the DC hostname. Add /etc/hosts entries if DNS does not resolve the DC hostname:
Remote Execution
Pick based on noise level: psexec creates a service (very loud), wmiexec runs in WMI (quieter), atexec uses the task scheduler (least trace).- Password
- NT Hash
- Kerberos
Credential Dumping
secretsdump.py
- Password
- NT Hash
- Kerberos
Kerberos Tooling
getTGT.py / getST.py / ticketConverter.py
GetUserSPNs.py (Kerberoasting)
- Password
- NT Hash
- Kerberos
GetNPUsers.py (AS-REP Roasting)
- No Creds (username list)
- Password
- NT Hash
smbclient.py
Interactive SMB client. Works like the native smbclient but is part of impacket — useful when the native tool isn’t available or you need PTH/Kerberos from Linux.- Password
- NT Hash
- Kerberos
ACL Editing (dacledit.py)
Read and write DACLs on AD objects. Required for granting DCSync rights, GenericAll, WriteDacl, etc. from Linux.- Password
- NT Hash
- Kerberos
Computer Accounts (addcomputer.py)
Create machine accounts — prerequisite for RBCD and other attacks whenms-DS-MachineAccountQuota > 0.
- Password
- NT Hash
- Kerberos
Delegation Enumeration (findDelegation.py)
Find all accounts with unconstrained, constrained, or RBCD delegation configured.- Password
- NT Hash
- Kerberos
Enumeration
- Password
- NT Hash
- Kerberos
MSSQL (mssqlclient.py)
Interactive MSSQL client. Type SQL directly or use built-in helpers forxp_cmdshell.
Connecting
- Password
- NT Hash
- Kerberos
Situational Awareness
xp_cmdshell
Impersonation
Linked Server Abuse
Built-in helpers (enable_xp_cmdshell, enum_impersonate, etc.) are local only. Everything on a linked server must be sent as a raw SQL string via EXEC ('...') AT [TARGET]. Single quotes inside the string must be escaped as ''.
DPAPI (dpapi.py)
Decrypt Windows DPAPI-protected secrets: browser saved passwords, credential manager, Wi-Fi keys, and anything else encrypted with a masterkey. The masterkey is encrypted with the user’s password (or the domain backup key for domain accounts).Extracting the Files from the Target
dpapi.py runs on your attacker box, so you first need to pull the encrypted masterkey and the target blob (credential file, vault, Chrome data) off the Windows host. These all live in hidden directories: list them with -Force or they look empty.
Masterkeys
Credential Files
Chrome / Browser Saved Passwords
Generic Blob Decryption
Vault Files
Ticket Forging (ticketer.py)
Forge Kerberos tickets offline. Requires hashes extracted via secretsdump.Golden Ticket
Requires thekrbtgt NT hash and domain SID. Valid for any user, any service, any host.
Silver Ticket
Requires the target service account’s NT hash. Valid for a single service on a single host — no contact with the DC needed.PAC Validation — Why Silver Tickets Sometimes Fail
A service ticket’s PAC carries two signatures: a server signature (the service account’s key) and a KDC signature (thekrbtgt key). When you forge a Silver Ticket you hold the service hash, so the server signature is valid, but you cannot produce a valid KDC signature.
Whether that matters depends on whether the target service performs PAC validation: calling back to a DC over Netlogon (KERB_VERIFY_PAC) to check the KDC signature.
- Services running as
NT AUTHORITY\SYSTEMor holdingSeTcbPrivilege(“Act as part of the OS”) are treated as trusted and skip PAC validation. Most core Windows services land here — this is why Silver Tickets work so often. - Services running under a plain domain account without
SeTcbPrivilegevalidate the PAC, and the forged ticket is rejected. - S4U2self / protocol transition always triggers KDC-signature checks, so a Silver Ticket cannot be used to pivot through constrained delegation.
Impacket ≥ 0.11
ticketer.py embeds PAC_ATTRIBUTES and a PAC_REQUESTOR buffer so the forged PAC survives the structural checks from the Nov 2021 updates (CVE-2021-42287). It still cannot forge the KDC signature, so any service that actually calls back to a DC stays out of reach.ExtraSids (Child to Parent Domain)
Ticket Inspection (describeTicket.py)
Inspect ccache and kirbi files to check validity, SIDs, session key, and expiry.NTLM Relay (ntlmrelayx.py)
Relay incoming NTLM authentication to other services. Requires capturing NTLM auth via Responder, printerbug, PetitPotam, or similar coercion.Relay to SMB
Relay to LDAP
Relay to MSSQL
Relay to HTTP / ADCS (ESC8)
Password Change (changepasswd.py)
Change or force-reset passwords. Supports SAMR and Kerberos set-password protocols.- Password
- NT Hash
- Kerberos
AD User Enumeration (GetADUsers.py)
Quick user enumeration via LDAP — returns all users or a specific account with attributes.- Password
- NT Hash
- Kerberos
SMB File Server (smbserver.py)
Serve a local directory over SMB. Useful for file transfer, hosting payloads, or forcing NTLM authentication from a target that reads from a UNC path.WMI Queries (wmiquery.py)
Execute arbitrary WMI queries on a remote host.- Password
- NT Hash
- Kerberos