Aller au contenu
Skillpedia
Agents35k · #7855

detecting-ntlm-relay-with-event-correlation

Ce qu’il fait

Cet outil vous aide à repérer les attaques par relais NTLM. Il vérifie si un ordinateur qui se connecte à un autre utilise une adresse IP différente de celle attendue, ce qui peut indiquer que quelqu'un intercepte et redirige les identifiants de connexion.

Quand l’utiliser

  • ✓Lorsque vous soupçonnez le vol d'identifiants de connexion sur des réseaux utilisant l'authentification NTLM.
  • ✓Pour enquêter lorsqu'un ordinateur se connecte à un autre depuis un emplacement inattendu.
  • ✓Pour vérifier que les systèmes importants sont protégés contre les attaques de relais d'authentification.

Lien du skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-ntlm-relay-with-event-correlation/SKILL.md

Copiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.

Comment l’utiliser

Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.

Message prêt à coller

Utilise ce skill pour m’aider : https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-ntlm-relay-with-event-correlation/SKILL.md Lis le fichier SKILL.md de ce lien et suis ses instructions pour ma tâche.
Envie que votre IA trouve seule des skills comme celui-ci ?Installez le MCP gratuit de Skillpedia : une ligne, et elle cherche parmi 15 000+ skills avant chaque tâche.Installer en 1 minute →

Exemple de demande à votre IA

“Pouvez-vous vérifier s'il existe des tentatives d'accès non autorisées utilisant des identifiants volés ?”

5 nouveaux skills par semaine. 1 minute de lecture.

Comment ça marche

L'outil analyse les journaux d'événements Windows pour repérer les connexions dont le nom de l'ordinateur source ne correspond pas à l'adresse IP d'où la connexion provient réellement. Il recherche aussi les traces d'outils courants utilisés dans les attaques par relais.

Contenu technique (SKILL.md original)

Texte original de l’auteur, en anglais, directement depuis GitHub.

Detecting NTLM Relay with Event Correlation

Authorized Testing Disclaimer: The offensive techniques and attack simulations described in this skill are intended exclusively for authorized penetration testing, red team engagements, purple team exercises, and security research conducted with explicit written permission from the system owner. Unauthorized use of these techniques against systems you do not own or have permission to test is illegal and unethical. Always operate within the scope of your engagement and comply with applicable laws and regulations.

Overview

NTLM relay attacks intercept NTLM authentication messages and forward them to a target service to gain unauthorized access. Attackers use tools like Responder for LLMNR/NBT-NS/mDNS poisoning, ntlmrelayx (Fox-IT/Impacket) for multi-protocol relay, and coercion techniques like PetitPotam (MS-EFSRPC) and DFSCoerce to force authentication from high-value targets like domain controllers. This skill provides a comprehensive event correlation framework using Windows Security Event 4624 LogonType 3 analysis, IP-to-hostname mismatch detection, Responder traffic identification, SMB/LDAP signing audit, and NTLM downgrade detection to identify relay attacks across Active Directory environments.

When to Use

  • Hunting for credential relay activity in Active Directory environments where NTLM authentication is still in use
  • Investigating alerts for authentication anomalies where the source IP does not match the expected workstation
  • Auditing SMB signing and LDAP signing enforcement to assess exposure to relay attacks
  • Detecting NTLM downgrade attacks where NTLMv2 is forced to NTLMv1 for easier offline cracking or relay
  • Building SIEM correlation rules for MITRE ATT&CK T1557.001 (LLMNR/NBT-NS Poisoning and SMB Relay)
  • Responding to PetitPotam, DFSCoerce, or PrinterBug coercion alerts that may precede relay attacks
  • During purple team exercises validating NTLM relay detection and SMB signing enforcement

Do not use without centralized Windows Security Event Log collection, as a substitute for enforcing SMB signing and Extended Protection for Authentication (EPA) which prevent relay attacks at the protocol level, or without an IP-to-hostname inventory for correlation.

Prerequisites

  • Windows Advanced Audit Policy configured to capture Event IDs 4624, 4625, 4648, 4776, and 8004
  • Centralized log collection via Windows Event Forwarding (WEF) or agent-based shipping to SIEM
  • SIEM platform (Splunk, Elastic, Microsoft Sentinel) with correlation and alerting capability
  • IP address to hostname mapping inventory (DHCP logs, DNS records, or CMDB)
  • Network monitoring for LLMNR (UDP 5355), NBT-NS (UDP 137), and mDNS (UDP 5353) traffic
  • Understanding of MITRE ATT&CK T1557.001 and T1187 (Forced Authentication)

Workflow

Step 1: Understand NTLM Relay Attack Flow

The NTLM relay attack follows a three-phase pattern: coercion/poisoning, interception, and relay.

Phase 1 -- Coercion or Poisoning: The attacker forces or tricks a victim into initiating NTLM authentication. Methods include LLMNR/NBT-NS poisoning (Responder), PetitPotam (MS-EFSRPC abuse), PrinterBug (SpoolService), and DFSCoerce.

Phase 2 -- Interception: The attacker captures the NTLM Type 1 (Negotiate) and Type 3 (Authenticate) messages from the victim.

Phase 3 -- Relay: The attacker forwards the captured NTLM messages to a target service (SMB, LDAP, HTTP, MSSQL) to authenticate as the victim. This succeeds only when message signing is not enforced.

Victim ──NTLM Negotiate──> Attacker ──NTLM Negotiate──> Target
Victim <──NTLM Challenge── Attacker <──NTLM Challenge── Target
Victim ──NTLM Authenticate──> Attacker ──NTLM Authenticate──> Target
                                                         ↓
                                              Attacker authenticated
                                              as Victim on Target

Key Detection Insight: In a relay attack, Event 4624 on the target will show the victim's username but the attacker's IP address. The WorkstationName field may still reflect the victim's machine. This IP-to-hostname mismatch is the primary detection signal.

Step 2: Event 4624 LogonType 3 Analysis for Relay Detection

# Splunk: Detect IP-to-Hostname Mismatches in Network Logons
# Core NTLM relay detection -- correlates WorkstationName with IpAddress

index=wineventlog EventCode=4624 LogonType=3

…
Questions fréquentes

Qu'est-ce qu'une attaque par relais NTLM ?

C'est un type d'attaque où un pirate intercepte les identifiants de connexion d'un utilisateur (via le protocole NTLM) et les transmet à un autre système pour se faire passer pour cet utilisateur et obtenir un accès non autorisé.

Qu'est-ce que l'événement 4624 LogonType 3 ?

C'est une entrée du journal Windows qui indique une ouverture de session réseau. Combinée à d'autres informations, elle peut aider à repérer des activités suspectes comme les attaques par relais.

Pourquoi la correspondance entre IP et nom d'hôte est-elle importante ?

Normalement, un nom d'ordinateur est associé à une adresse IP précise. Si une connexion affiche un nom d'ordinateur connu mais provient d'une adresse IP inattendue, cela peut être le signe d'une attaque en cours.

Détails

Description originale de l’auteur

Detect NTLM relay attacks (T1557.001) by correlating Windows Event 4624 LogonType 3 for IP-to-hostname mismatches, identifying Responder/LLMNR poisoning artifacts, auditing SMB/LDAP signing, and flagging NTLMv2-to-NTLMv1 downgrades. Use for hunting credential relay in NTLM-enabled AD, investigating auth-source anomalies, building SIEM correlation rules, or responding to PetitPotam/DFSCoerce/Printe

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularité

Étoiles GitHub
35k
Position au classement
#7855
Licence
Apache-2.0
Mis à jour
31/08/2026

Ce skill vous est-il utile ?

0

Connectez-vous pour voter.

Commentaires

  • …

Autres skills de ce dépôt

Skills similaires