Detection rules › Elastic

Curl to FTP Server via Raw IP

Time window
30s
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Detects when Curl makes an outbound network connection to an FTP server (port 21) via a raw ip address.

MITRE ATT&CK coverage

TacticTechniques
Command & Control

Telemetry coverage

Rule body

[rule]
description = "Detects when Curl makes an outbound network connection to an FTP server (port 21) via a raw ip address."
id = "a702353c-bf41-4548-bb77-b6447384d3b8"
license = "Elastic License v2"
name = "Curl to FTP Server via Raw IP"
os_list = ["macos"]
version = "1.0.3"

query = '''
sequence by process.entity_id with maxspan=30s
[process where event.type == "start" and event.action == "exec" and process.name in ("curl", "nscurl")]
[network where event.type == "start" and destination.port == 21 and process.name in ("curl", "nscurl") and destination.domain == null]
'''

min_endpoint_version = "8.16.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "Effective_process.entity_id"
state = 0

[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1105"
name = "Ingress Tool Transfer"
reference = "https://attack.mitre.org/techniques/T1105/"


[threat.tactic]
id = "TA0011"
name = "Command and Control"
reference = "https://attack.mitre.org/tactics/TA0011/"

[internal]
min_endpoint_version = "8.16.0"

Stages and Predicates

Ordered sequence: each step below must occur in order within 30s, correlated by process.entity_id.

Stage 1: process

[process where event.type == "start" and event.action == "exec" and process.name in ("curl", "nscurl")]

Stage 2: network

[network where event.type == "start" and destination.port == 21 and process.name in ("curl", "nscurl") and destination.domain == null]

Indicators

These rows show field, operator, and value matches.