Chuyển đến nội dung
Skillpedia
Agent35k · #7855

detecting-ntlm-relay-with-event-correlation

Skill này làm gì

Công cụ này giúp tìm các cuộc tấn công NTLM relay. Nó kiểm tra xem một máy tính kết nối tới máy khác có dùng địa chỉ IP khác với địa chỉ dự kiến không, điều này có thể cho thấy ai đó đang chặn và chuyển hướng thông tin đăng nhập.

Khi nào nên dùng

  • ✓Khi bạn nghi ngờ thông tin đăng nhập đang bị đánh cắp trên mạng dùng xác thực NTLM.
  • ✓Khi điều tra trường hợp một máy tính kết nối tới máy khác từ vị trí bất thường.
  • ✓Để kiểm tra xem các hệ thống quan trọng có được bảo vệ trước tấn công chuyển tiếp xác thực hay không.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/detecting-ntlm-relay-with-event-correlation/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Hãy kiểm tra các lần truy cập trái phép bằng thông tin đăng nhập bị đánh cắp.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ phân tích nhật ký sự kiện Windows để tìm kết nối mà tên máy nguồn không khớp với địa chỉ IP thực sự kết nối tới. Nó cũng tìm dấu hiệu của các công cụ phổ biến dùng trong tấn công chuyển tiếp.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

…
Câu hỏi thường gặp

Tấn công NTLM relay là gì?

Đó là kiểu tấn công trong đó kẻ tấn công chặn thông tin đăng nhập của người dùng (qua giao thức NTLM) rồi chuyển tiếp đến hệ thống khác để mạo danh người dùng và truy cập trái phép.

Event 4624 LogonType 3 là gì?

Đó là mục nhật ký Windows ghi lại một lần đăng nhập qua mạng. Khi kết hợp với thông tin khác, nó có thể giúp nhận diện hoạt động đáng ngờ như tấn công chuyển tiếp.

Tại sao khớp IP với tên máy lại quan trọng?

Thông thường, một tên máy gắn với một địa chỉ IP cụ thể. Nếu kết nối hiển thị tên máy đã biết nhưng đến từ địa chỉ IP lạ, đó có thể là dấu hiệu của một cuộc tấn công đang diễn ra.

Chi tiết

Mô tả gốc của tác giả

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

Độ phổ biến

Sao GitHub
35k
Vị trí xếp hạng
#7855
Giấy phép
Apache-2.0
Cập nhật
31/8/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự