Detection rules › Elastic

Network Activity from a Reflected Process

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

Identifies the creation of process clone via the Windows API RtlCreateProcessReflection followed by network activity. This may indicate an attempt to create a process as a target for process injection.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

[rule]
description = """
Identifies the creation of process clone via the Windows API RtlCreateProcessReflection followed by network activity.
This may indicate an attempt to create a process as a target for process injection.
"""
id = "80294c8d-0ef5-4708-a6ef-45d30064b149"
license = "Elastic License v2"
name = "Network Activity from a Reflected Process"
os_list = ["windows"]
reference = ["https://www.deepinstinct.com/blog/dirty-vanity-a-new-approach-to-code-injection-edr-bypass"]
version = "1.0.7"

query = '''
sequence by process.entity_id with maxspan=1m
 [process where event.action == "start" and
  _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*ntdll.dll!RtlCreateProcessReflection*", "*ntdll.dll!RtlCloneUserProcess*")) and
  not process.hash.sha256 : ("a2f3e8a8486d23662da129cd8c8fa9eb0ac0e2471ade3924aaac5c20d153fabb",
                             "8c78b7a71ac20369a5bcd4fb462aee1d514f10afe87408bed3c2d786dd479b4d")]
 [any where
  (event.category : ("network", "dns") or (event.category == "library" and dll.name : ("ws2_32.dll", "winhttp.dll", "wininet.dll")))]
'''

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

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


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

[internal]
min_endpoint_version = "8.7.0"

Stages and Predicates

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

Stage 1: process

[process where event.action == "start" and
  _arraysearch(process.parent.thread.Ext.call_stack, $entry, $entry.symbol_info: ("*ntdll.dll!RtlCreateProcessReflection*", "*ntdll.dll!RtlCloneUserProcess*")) and
  not process.hash.sha256 : ("a2f3e8a8486d23662da129cd8c8fa9eb0ac0e2471ade3924aaac5c20d153fabb",
                             "8c78b7a71ac20369a5bcd4fb462aee1d514f10afe87408bed3c2d786dd479b4d")]

Stage 2: any

[any where
  (event.category : ("network", "dns") or (event.category == "library" and dll.name : ("ws2_32.dll", "winhttp.dll", "wininet.dll")))]

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.hash.sha256eqa2f3e8a8486d23662da129cd8c8fa9eb0ac0e2471ade3924aaac5c20d153fabb, 8c78b7a71ac20369a5bcd4fb462aee1d514f10afe87408bed3c2d786dd479b4dexcludes:process.hash.sha256 field:"process.hash.sha256" value:"a2f3e8a8486d23662da129cd8c8fa9eb0ac0e2471ade3924aaac5c20d153fabb" field:"process.hash.sha256" value:"8c78b7a71ac20369a5bcd4fb462aee1d514f10afe87408bed3c2d786dd479b4d"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
dll.namewildcard
  • winhttp.dll corpus 16 (elastic 16)
  • wininet.dll corpus 18 (elastic 18)
  • ws2_32.dll corpus 20 (elastic 20)
field:"dll.name" kind:wildcard
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
event.categoryeq
  • library corpus 22 (elastic 22)
field:"event.category" kind:eq value:"library"
event.categorywildcard
  • dns corpus 3 (elastic 3)
  • network corpus 19 (elastic 19)
field:"event.category" kind:wildcard