Detection rules › Elastic

System Network Connections Discovery

Status
production
Kind
building block (feeds higher-level correlation rules; not a standalone alert)
Severity
low
Time window
119m
Group by
host.id, process.command_line, process.parent.executable
Author
Elastic
Source
github.com/elastic/detection-rules

Adversaries may attempt to get a listing of network connections to or from a compromised system.

MITRE ATT&CK coverage

Rule body elastic

[metadata]
creation_date = "2023/07/11"
integration = ["endpoint"]
maturity = "production"
updated_date = "2026/03/24"

[rule]
author = ["Elastic"]
building_block_type = "default"
description = """
Adversaries may attempt to get a listing of network connections to or from a compromised system.
"""
from = "now-119m"
index = ["logs-endpoint.events.*"]
interval = "60m"
language = "kuery"
license = "Elastic License v2"
name = "System Network Connections Discovery"
risk_score = 21
rule_id = "e2dc8f8c-5f16-42fa-b49e-0eb8057f7444"
severity = "low"
tags = [
    "Domain: Endpoint",
    "OS: Linux",
    "OS: macOS",
    "Use Case: Threat Detection",
    "Tactic: Discovery",
    "Rule Type: BBR",
    "Data Source: Elastic Defend",
]
timestamp_override = "event.ingested"
type = "new_terms"
query = '''
event.category:process and host.os.type:(linux or macos) and event.type:start and event.action:exec and
process.name:("netstat" or "lsof" or "ss" or "iftop" or "ip" or "nmcli" or "arp" or "route" or "ifconfig" or "netcfg" or "networksetup") and
not (
  process.parent.executable:(
    /Library/Elastic/Agent/* or "/Applications/Docker.app/Contents/MacOS/com.docker.backend" or
    "/opt/NinjaRMMAgent/programfiles/ninjarmm-linagent" or "/usr/local/ASR/Vx/bin/svagents"
  ) or
  process.working_directory:("/var/ossec" or "/usr/lib/check_mk_agent/plugins" or "/opt/microsoft/mdatp/sbin")
)
'''

[[rule.threat]]
framework = "MITRE ATT&CK"

[[rule.threat.technique]]
id = "T1016"
name = "System Network Configuration Discovery"
reference = "https://attack.mitre.org/techniques/T1016/"

[[rule.threat.technique]]
id = "T1049"
name = "System Network Connections Discovery"
reference = "https://attack.mitre.org/techniques/T1049/"

[rule.threat.tactic]
id = "TA0007"
name = "Discovery"
reference = "https://attack.mitre.org/tactics/TA0007/"
[rule.new_terms]
field = "new_terms_fields"
value = ["process.parent.executable", "process.command_line", "host.id"]

[[rule.new_terms.history_window_start]]
field = "history_window_start"
value = "now-5d"

Stages and Predicates

Stage 1: new_terms

event.category:process and host.os.type:(linux or macos) and event.type:start and event.action:exec and
process.name:("netstat" or "lsof" or "ss" or "iftop" or "ip" or "nmcli" or "arp" or "route" or "ifconfig" or "netcfg" or "networksetup") and
not (
  process.parent.executable:(
    /Library/Elastic/Agent/* or "/Applications/Docker.app/Contents/MacOS/com.docker.backend" or
    "/opt/NinjaRMMAgent/programfiles/ninjarmm-linagent" or "/usr/local/ASR/Vx/bin/svagents"
  ) or
  process.working_directory:("/var/ossec" or "/usr/lib/check_mk_agent/plugins" or "/opt/microsoft/mdatp/sbin")
)
New terms
process.parent.executable, process.command_line, host.id
History since
now-5d

Exclusions

Top-level NOT(...) conjuncts: predicates this rule actively suppresses.

FieldKindExcluded values
process.parent.executableeq/Applications/Docker.app/Contents/MacOS/com.docker.backend
process.parent.executableeq/opt/NinjaRMMAgent/programfiles/ninjarmm-linagent
process.parent.executableeq/usr/local/ASR/Vx/bin/svagents
process.parent.executablestarts_with/Library/Elastic/Agent/
process.working_directoryin/opt/microsoft/mdatp/sbin, /usr/lib/check_mk_agent/plugins, /var/ossec

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
event.actioneq
  • exec
event.categoryeq
  • process
event.typeeq
  • start
process.namein
  • arp
  • ifconfig
  • iftop
  • ip
  • lsof
  • netcfg
  • netstat
  • networksetup
  • nmcli
  • route
  • ss