Skip to main content
Impacket provides comprehensive support for Windows authentication protocols, enabling you to authenticate using various credential formats and techniques. This is essential for penetration testing, security research, and legitimate network administration.

Authentication Protocols

Impacket implements two primary authentication protocols:

NTLM Authentication

NT LAN Manager (NTLM) is a challenge-response authentication protocol used in Windows networks. Impacket supports:
  • NTLMv1: Legacy protocol (less secure)
  • NTLMv2: Modern protocol with enhanced security (default)
  • NTLM over HTTP: For web-based authentication

Kerberos Authentication

Kerberos is the preferred authentication protocol in Active Directory environments. It uses tickets instead of sending password hashes:
  • TGT (Ticket Granting Ticket): Initial ticket for authentication
  • Service Tickets: Tickets for accessing specific services
  • Delegation: S4U2Self and S4U2Proxy for impersonation

Credential Formats

Impacket accepts credentials in multiple formats:

1. Username and Password

The most straightforward authentication method:

2. NTLM Hashes

Authenticate using LM and NT hashes (pass-the-hash):

3. Kerberos Tickets

Use cached Kerberos tickets from ccache files:

4. AES Keys

Use AES128 or AES256 Kerberos keys:

Global NTLM Configuration

Control NTLMv1 vs NTLMv2 usage:
NTLMv1 is significantly less secure than NTLMv2 and should only be used when absolutely necessary for compatibility with legacy systems.

Authentication in Example Scripts

Most Impacket example scripts support all authentication methods through command-line arguments:

Common Authentication Patterns

SMB Authentication

RPC Authentication

Security Considerations

When using pass-the-hash or pass-the-ticket techniques, you’re authenticating with credential material that may be sensitive. Always:
  • Use secure channels to transmit credentials
  • Clear credential variables after use
  • Follow proper authorization and legal guidelines
  • Prefer Kerberos over NTLM when possible

Next Steps

NTLM Authentication

Deep dive into NTLM protocol and hash computations

Kerberos Authentication

Learn about Kerberos tickets and delegation

Pass-the-Hash

Master credential reuse techniques