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.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
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
Độ 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
Bình luận
- …
Thêm skill từ kho mã này
abusing-dpapi-for-credential-access
35kCung cấp cho agent AI của bạn hướng dẫn có sẵn cho một tác vụ cụ thể, giúp nó làm việc tốt hơn và nhanh hơn.
abusing-shadow-credentials-for-privesc
35kDạy agent AI của bạn viết văn bản rõ ràng và có cấu trúc tốt.
achieving-cmmc-level-2-compliance
35kGiúp agent của bạn chuẩn bị môi trường để tuân thủ CMMC Level 2. Triển khai các yêu cầu bảo mật và quản lý tài liệu cần thiết.
acquiring-disk-image-with-dd-and-dcfldd
35kGiúp agent của bạn tạo bản sao chính xác của ổ đĩa. Cách này đảm bảo không mất hay thay đổi thông tin trong quá trình điều tra.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.