Detection rules › Elastic
Hidden Process Execution followed by Network Connection
Detects when a hidden process is executed, and initiates an outbound network connection. Threat actors may drop hidden payloads that will later be used to download additional payload stages or tools.
MITRE ATT&CK coverage
| Tactic | Techniques |
|---|---|
| Command & Control |
Rule body
[rule]
description = """
Detects when a hidden process is executed, and initiates an outbound network connection. Threat actors may drop hidden
payloads that will later be used to download additional payload stages or tools.
"""
id = "04ec0ec4-86c4-47e3-8c7b-8dad5f97532c"
license = "Elastic License v2"
name = "Hidden Process Execution followed by Network Connection"
os_list = ["linux"]
version = "1.0.7"
query = '''
sequence by process.entity_id with maxspan=30s
[process where event.type == "start" and event.action == "exec" and
process.executable like ("/tmp/.*", "/var/tmp/.*", "/dev/shm/.*") and
not process.executable like ("/tmp/.ryeinstall*", "/tmp/.sentry*")]
[network where event.type == "start" and event.action in ("connection_attempted", "connection_accepted") and
process.name like ".*"]
'''
min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
[[actions]]
action = "kill_process"
field = "process.parent.entity_id"
state = 0
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1071"
name = "Application Layer Protocol"
reference = "https://attack.mitre.org/techniques/T1071/"
[[threat.technique.subtechnique]]
id = "T1071.001"
name = "Web Protocols"
reference = "https://attack.mitre.org/techniques/T1071/001/"
[[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 = "7.15.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.executable like ("/tmp/.*", "/var/tmp/.*", "/dev/shm/.*") and
not process.executable like ("/tmp/.ryeinstall*", "/tmp/.sentry*")]
Stage 2: network
[network where event.type == "start" and event.action in ("connection_attempted", "connection_accepted") and
process.name like ".*"]
Exclusions
The rule actively suppresses these predicates.
| Field | Kind | Excluded values | Search |
|---|---|---|---|
process.executable | starts_with | /tmp/.ryeinstall, /tmp/.sentry | excludes:process.executable field:"process.executable" value:"/tmp/.ryeinstall" field:"process.executable" value:"/tmp/.sentry" |
Indicators
These rows show field, operator, and value matches.
| Field | Kind | Values | Search |
|---|---|---|---|
event.action | eq |
| field:"EventType" kind:eq value:"exec" |
event.action | in |
| field:"EventType" kind:in |
event.type | eq |
| field:"event.type" kind:eq value:"start" |
process.executable | wildcard |
| field:"Image" kind:wildcard |
process.name | wildcard |
| field:"process_name" kind:wildcard value:".*" |