Skip to main content
Collection of Python scripts for interacting with Windows protocols from Linux. Covers Kerberos, SMB, remote execution, credential dumping, ACL editing, and AD enumeration. All tools follow a consistent auth model.

Auth & Kerberos Setup

Every impacket tool accepts credentials in the same three forms. Set up once, reuse everywhere.
Pass credentials inline: domain/user:password@target
Always 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).
Replace 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:
For multiple domains or child domains, add a block per realm:

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).

Credential Dumping

secretsdump.py

Kerberos Tooling

getTGT.py / getST.py / ticketConverter.py

GetUserSPNs.py (Kerberoasting)

GetNPUsers.py (AS-REP Roasting)

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.
Inside the interactive shell:

ACL Editing (dacledit.py)

Read and write DACLs on AD objects. Required for granting DCSync rights, GenericAll, WriteDacl, etc. from Linux.

Computer Accounts (addcomputer.py)

Create machine accounts — prerequisite for RBCD and other attacks when ms-DS-MachineAccountQuota > 0.

Delegation Enumeration (findDelegation.py)

Find all accounts with unconstrained, constrained, or RBCD delegation configured.

Enumeration

MSSQL (mssqlclient.py)

Interactive MSSQL client. Type SQL directly or use built-in helpers for xp_cmdshell.

Connecting

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).

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 the krbtgt 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.

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.

AD User Enumeration (GetADUsers.py)

Quick user enumeration via LDAP — returns all users or a specific account with attributes.

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.

Child to Parent Escalation (raiseChild.py)

Automates the ExtraSids attack: DCSync from a compromised child domain, forge a Golden Ticket with the Enterprise Admins SID, and get a shell on the parent DC. Requires child domain DC admin.