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
WAD · Tool
Impacket
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
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
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
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
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
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
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
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
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
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
Impacket's psexec.py offers psexec like functionality. 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
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$
Impacket's rpcdump.py enumerates Remote Procedure Call (RPC) endpoints. Command Reference: Target IP: 10.10.10.1 Domain: test.local Username: john Password: password123
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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$
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$
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
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
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
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