Detection rules › Elastic

Potential Module Stomping with Network Activity

Source
github.com/elastic/protections-artifacts

Identifies modification to the WinInet registry key by a process where the creating thread's stack contains frames pointing to an unusual module.

MITRE ATT&CK coverage

TacticTechniques
Stealth

Rule body

[rule]
description = """
Identifies modification to the WinInet registry key by a process where the creating thread's stack contains frames
pointing to an unusual module.
"""
id = "c059ead9-d15e-4d13-86ee-ac5d8b9d6c34"
license = "Elastic License v2"
name = "Potential Module Stomping with Network Activity"
os_list = ["windows"]
version = "1.0.5"

query = '''
registry where event.action == "modification" and process.executable != null and registry.value == "CachePrefix" and
 registry.path : "HKEY_USERS\\*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\*" and
 /* unusual stacks start module */
 process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|wininet.dll\|ntdll.dll\|kernelbase.dll\|wininet.dll\|[a-z0-9\_\.\-]+\.dll""" and
 _arraysearch(process.thread.Ext.call_stack, $entry, ($entry.callsite_trailing_bytes : "?*" or $entry.protection == "RWX")) and
 not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like "?:\\Program Files (x86)\\Steam\\steamapps\\common\\*") and
 not (process.executable == "C:\\Program Files\\KeyShot Studio\\bin\\keyshot.exe" and process.code_signature.subject_name == "KeyShot Inc." and process.code_signature.trusted == true)
'''

min_endpoint_version = "8.10.0"
[[actions]]
action = "kill_process"
field = "process.entity_id"
state = 0
tree = true

[[optional_actions]]
action = "rollback"
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.10.0"

Stages and Predicates

Stage 1: registry

registry where event.action == "modification" and process.executable != null and registry.value == "CachePrefix" and
 registry.path : "HKEY_USERS\\*\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\\*" and
 process.thread.Ext.call_stack_summary regex """ntdll.dll\|kernelbase.dll\|wininet.dll\|ntdll.dll\|kernelbase.dll\|wininet.dll\|[a-z0-9\_\.\-]+\.dll""" and
 _arraysearch(process.thread.Ext.call_stack, $entry, ($entry.callsite_trailing_bytes : "?*" or $entry.protection == "RWX")) and
 not _arraysearch(process.thread.Ext.call_stack, $entry, $entry.symbol_info like "?:\\Program Files (x86)\\Steam\\steamapps\\common\\*") and
 not (process.executable == "C:\\Program Files\\KeyShot Studio\\bin\\keyshot.exe" and process.code_signature.subject_name == "KeyShot Inc." and process.code_signature.trusted == true)

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameeqKeyShot Inc.excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"KeyShot Inc."
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executableeqC:\Program Files\KeyShot Studio\bin\keyshot.exeexcludes:process.executable field:"process.executable" value:"C:\Program Files\KeyShot Studio\bin\keyshot.exe"
process.thread.Ext.call_stackarray_any(no value, null check)excludes:process.thread.Ext.call_stack

Indicators

These rows show field, operator, and value matches.