Skip to content

[New Rule] Potential On-Path Relay in a TCP Flow - #7258

Open
eric-forte-elastic wants to merge 3 commits into
mainfrom
arp_poison
Open

eric-forte-elastic wants to merge 3 commits into
mainfrom
arp_poison

Conversation

@eric-forte-elastic

@eric-forte-elastic eric-forte-elastic commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Issue link(s):

Summary - What I changed

Rule using network flows to detect ARP poisoning. Identifies an IPv4 TCP connection initially observed between two Ethernet addresses and then observed on two legs through a third MAC address. This path change can follow ARP cache poisoning of a host and its gateway. The alert identifies the potential relay so an analyst can verify how traffic was redirected.

How To Test

Data in stack and RTA

image

Checklist

  • Added a label for the type of pr: bug, enhancement, schema, maintenance, Rule: New, Rule: Deprecation, Rule: Tuning, Hunt: New, or Hunt: Tuning so guidelines can be generated
  • Added the meta:rapid-merge label if planning to merge within 24 hours
  • Secret and sensitive material has been managed correctly (no credentials or tokens; exclusions use generic non-identifying vendor/install paths — not usernames, hostnames, org names, cluster/agent IDs, IP addresses, or internal workspace/repo trees; cloud/SaaS rules only hard-code vendor first-party or marketplace-listed app/client IDs — never tenant, subscription, account, or project IDs; sample JSON is redacted)
  • Automated testing was updated or added to match the most common scenarios
  • Documentation and comments were added for features that require explanation

Contributor checklist

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

@eric-forte-elastic
eric-forte-elastic marked this pull request as ready for review November 30, 2026 17:05
@eric-forte-elastic
eric-forte-elastic requested review from Aegrah, bryans3c, django-88 and w0rk3r and a balanced review from Copilot November 30, 2026 17:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The rule can miss relay attacks when a restored direct path replaces the pre-attack flow, so separate flow instances must be retained to evaluate direct-to-relay transitions.

1 open issue
What changed in this PR

Adds a network-flow detection rule for potential on-path TCP relays associated with ARP cache poisoning.

Changes:

  • Correlates an original Ethernet path with two subsequent legs through a shared relay MAC address.
  • Adds capture setup requirements and investigation guidance.
  • Maps the detection to MITRE ATT&CK ARP Cache Poisoning.
File Description
rules/​network/​credential_access_potential_on_path_relay_in_tcp_flow.toml Adds the ES|QL relay detection, metadata, and analyst guidance.

Review effort: Balanced

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown

Starting the rule tests ...

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The multi-stage ES|QL correlation needs capture-backed validation on Stack 9.5 for key flow edge cases, which the unavailable RTA changes and execution results and the supplied screenshot could not establish.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@bryans3c bryans3c left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Approving as not to block

Comment on lines +21 to +22
from = "now-9m"
interval = "5m"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add alert suppression?

language = "esql"
license = "Elastic License v2"
name = "Potential On-Path Relay in a TCP Flow"
note = """## Triage and analysis

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we match the standard note? We could mention some coverage limits like connections opened after poisoning or proxying instead of forwarding.

name = "ARP Cache Poisoning"
reference = "https://attack.mitre.org/techniques/T1557/002/"


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add the Collection tactic?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants