T1557 Splunk · SPL

Detect Adversary-in-the-Middle in Splunk

Adversaries may attempt to position themselves between two or more networked devices using an adversary-in-the-middle (AiTM) technique to support follow-on behaviors such as Network Sniffing (T1040), Transmitted Data Manipulation (T1565.002), or replay attacks. By abusing features of common networking protocols (ARP, DNS, LLMNR, DHCP), adversaries force devices to communicate through an adversary-controlled system to harvest credentials, session tokens, and sensitive data. Sub-techniques include LLMNR/NBT-NS Poisoning and SMB Relay (T1557.001), ARP Cache Poisoning (T1557.002), DHCP Spoofing (T1557.003), and Evil Twin wireless attacks (T1557.004). Common attack frameworks include Responder, Bettercap, Ettercap, ntlmrelayx, mitmproxy, dnschef, and EvilGinx2. Threat groups including Kimsuky, Sea Turtle, and Mustang Panda have leveraged AiTM positioning for large-scale credential theft, session hijacking, and DNS record manipulation at service providers.

MITRE ATT&CK

Tactic
Credential Access Collection
Technique
T1557 Adversary-in-the-Middle
Canonical reference
https://attack.mitre.org/techniques/T1557/

SPL Detection Query

Splunk (SPL)
spl
index=* sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" EventCode=1
| eval cmd_lower=lower(CommandLine)
| eval img_lower=lower(Image)
| eval IsLLMNRRelayTool=if(
    match(cmd_lower, "(responder|ntlmrelayx|smbrelayx|multirelay|impacket-ntlmrelayx)") OR
    match(img_lower, "(responder\.exe|ntlmrelayx)"),
    1, 0)
| eval IsARPPoisonTool=if(
    match(cmd_lower, "(bettercap|ettercap|arpspoof|arp\s+-s\s+\d+\.)") OR
    match(img_lower, "(bettercap\.exe|ettercap\.exe)"),
    1, 0)
| eval IsSSLInterceptTool=if(
    match(cmd_lower, "(mitmproxy|mitmdump|mitmweb|sslstrip)") OR
    match(img_lower, "(mitmproxy|mitmdump|mitmweb)"),
    1, 0)
| eval IsDNSSpoofTool=if(
    match(cmd_lower, "(dnschef|mitm6|evilginx)") OR
    match(img_lower, "(dnschef|mitm6|evilginx)"),
    1, 0)
| eval IsDNSConfigChange=if(
    match(cmd_lower, "(set-dnsclientserveraddress|netsh interface ip set dns|netsh int ip set dns)"),
    1, 0)
| eval SuspicionScore=IsLLMNRRelayTool + IsARPPoisonTool + IsSSLInterceptTool + IsDNSSpoofTool + IsDNSConfigChange
| where SuspicionScore > 0
| eval DetectionCategory=case(
    IsLLMNRRelayTool=1, "LLMNR_NBT_NS_Relay",
    IsARPPoisonTool=1, "ARP_Poisoning",
    IsSSLInterceptTool=1, "SSL_Interception",
    IsDNSSpoofTool=1, "DNS_Spoofing",
    IsDNSConfigChange=1, "DNS_Config_Modification",
    true(), "AiTM_Tool_Other"
)
| table _time, host, User, Image, CommandLine, ParentImage, ParentCommandLine,
    IsLLMNRRelayTool, IsARPPoisonTool, IsSSLInterceptTool, IsDNSSpoofTool, IsDNSConfigChange,
    SuspicionScore, DetectionCategory
| sort - _time
high severity medium confidence

Detects Adversary-in-the-Middle tool execution using Sysmon Event ID 1 (Process Creation). Evaluates command lines and image paths against known AiTM tools including LLMNR/NBT-NS relay tools (Responder, ntlmrelayx, smbrelayx), ARP poisoning tools (Bettercap, Ettercap, arpspoof), SSL interception tools (mitmproxy, sslstrip), DNS spoofing tools (dnschef, mitm6, EvilGinx), and DNS configuration modification commands (netsh, Set-DnsClientServerAddress). Assigns a cumulative suspicion score and categorizes the detection type to guide analyst triage. Higher scores indicate multiple AiTM indicators present simultaneously.

Data Sources

Process: Process CreationCommand: Command ExecutionSysmon Event ID 1

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Network engineers using arp -s for legitimate static ARP entry management on servers or network appliances
  • Security teams running authorized penetration tests or red team exercises using Responder, Bettercap, or Ettercap
  • IT administrators reconfiguring DNS server settings via netsh or PowerShell during planned network changes
  • Developers using mitmproxy or similar tools for legitimate web application debugging and API inspection
  • Commercial network monitoring or DLP solutions that use packet interception techniques and appear under python or similar parent processes
Download portable Sigma rule (.yml)

Other platforms for T1557


Testing Methodology

Validate this detection against 5 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1ARP Static Entry Manipulation (Windows)

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\arp.exe, CommandLine='arp -s 192.168.100.254 00-AA-BB-CC-DD-EE'. Security Event ID 4688 (if command-line auditing is enabled). No network events expected as this is a local table modification.

  2. Test 2DNS Server Change via netsh (Windows)

    Expected signal: Sysmon Event ID 1: Process Create with Image=C:\Windows\System32\netsh.exe, CommandLine containing 'interface ip set dns'. Sysmon Event ID 13: Registry value set under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}\NameServer with new value '127.0.0.1'.

  3. Test 3DNS Server Change via PowerShell (Windows)

    Expected signal: Sysmon Event ID 1: Process Create with Image=powershell.exe, CommandLine containing 'Set-DnsClientServerAddress'. Sysmon Event ID 13: Registry modification at HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{GUID}\NameServer. PowerShell ScriptBlock Log Event ID 4104 showing the Set-DnsClientServerAddress call.

  4. Test 4ARP Poisoning Tool Execution — arpspoof (Linux)

    Expected signal: Syslog or auditd process creation event for arpspoof. On systems with Sysmon for Linux (sysmonforlinux): Event ID 1 Process Create with Image path to arpspoof binary and CommandLine '-i lo -t 127.0.0.1 127.0.0.2'. Auditd syscall records for execve with the arpspoof arguments.

  5. Test 5mitmproxy SSL Interception Tool Invocation (Linux/macOS)

    Expected signal: Process creation event for mitmproxy binary (path varies by pip install location, typically ~/.local/bin/mitmproxy or /usr/local/bin/mitmproxy). Sysmon Event ID 1 (if Sysmon for Linux deployed) with Image containing 'mitmproxy' and CommandLine '--version'. Auditd EXECVE syscall record.

Unlock Pro Content

Get the full detection package for T1557 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections