Detection rules › Elastic

Unusual Network Connection via RunDLL32

Time window
5m
Sequence by
process.entity_id
Source
github.com/elastic/protections-artifacts

Identifies unusual instances of rundll32.exe making outbound network connections. This may be indicative of adversarial command and control activity.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies unusual instances of rundll32.exe making outbound network connections. This may be indicative of adversarial
command and control activity.
"""
id = "2e708541-c6e8-4ded-923f-78a6c160987e"
license = "Elastic License v2"
name = "Unusual Network Connection via RunDLL32"
os_list = ["windows"]
version = "1.0.35"

query = '''
sequence by process.entity_id with maxspan=5m
  [process where event.action == "start" and process.name : "rundll32.exe" and process.args_count == 1 and
   not (process.code_signature.subject_name == "Teramind Inc." and
        process.code_signature.trusted == true and process.Ext.token.integrity_level_name == "system" and
        process.args == "/update" and process.parent.name == "tmagentsvc.exe") and
   not process.args : "C:\\Windows\\system32\\rundll32.exe  *,*"]
  [network where event.action == "connection_attempted" and process.name : "rundll32.exe"]
'''

min_endpoint_version = "7.15.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 1

[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 1

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1055"
name = "Process Injection"
reference = "https://attack.mitre.org/techniques/T1055/"

[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.011"
name = "Rundll32"
reference = "https://attack.mitre.org/techniques/T1218/011/"



[threat.tactic]
id = "TA0005"
name = "Defense Evasion"
reference = "https://attack.mitre.org/tactics/TA0005/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and process.name : "rundll32.exe" and process.args_count == 1 and
   not (process.code_signature.subject_name == "Teramind Inc." and
        process.code_signature.trusted == true and process.Ext.token.integrity_level_name == "system" and
        process.args == "/update" and process.parent.name == "tmagentsvc.exe") and
   not process.args : "C:\\Windows\\system32\\rundll32.exe  *,*"]

Stage 2: network

[network where event.action == "connection_attempted" and process.name : "rundll32.exe"]

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • connection_attempted corpus 73 (elastic 73)
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq
process.args_counteq
  • 1 transforms: number corpus 49 (elastic 49)
field:"process.args_count" kind:eq value:"1"
process.namewildcard
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
field:"process_name" kind:wildcard value:"rundll32.exe"