heroui logo

Potential On-Path Relay in a TCP Flow

Elastic Detection Rules

View Source
Summary
Identifies a potentially malicious on-path relay in a TCP flow by detecting a transition from a direct Ethernet path (two MAC addresses) to a three-leg path through a relay MAC. The rule analyzes IPv4 TCP traffic captured on the network to determine if an ARP cache poisoning-style redirection occurred, where traffic that originally flowed between two endpoints is redirected through a relay device. It requires observation of the direct path before two relay legs and uses MAC and IP pairings plus VLAN context to assemble a three-leg topology. When it discovers three legs with a single relay MAC and timing constraints (the relay legs start within a short window around the original path, and the relay path begins within a defined period after the direct path), it flags a potential on-path relay. The rule provides an investigative workflow, including checking switch forwarding tables, ARP/neighbor data, and comparing observed paths to expected next hops. It also outlines false positives (e.g., authorized inline appliances or route changes) and remediation steps (preserve ARP evidence, contain the relay at the switch port, restore correct MAC-to-IP bindings, and review credentials or sessions exposed along the path). The detection is mapped to MITRE ATT&CK as Adversary-in-the-Middle (T1557, with ARP Cache Poisoning T1557.002) and spans Credential Access and Collection objectives. Setup and querying guidance for Packetbeat network flows are included, along with interpretation caveats about detections that occur only when the original direct path is observable.
Categories
  • Network
Data Sources
  • Network Traffic
ATT&CK Techniques
  • T1557
  • T1557.002
Created: 2026-11-26