Detection rules › Elastic

Suspicious Registry Symbolic Link

Source
github.com/elastic/protections-artifacts

Identifies the creation of registry symbolic link by an unusual process. This may indicate an attempt to elevate privileges via hijacking privileged registry read operations using a malicious registry symbolic link.

MITRE ATT&CK coverage

TacticTechniques
Persistence
Stealth
Defense Impairment

Rule body

[rule]
description = """
Identifies the creation of registry symbolic link by an unusual process. This may indicate an attempt to elevate
privileges via hijacking privileged registry read operations using a malicious registry symbolic link.
"""
id = "0c5c8b29-9903-4a04-9ca8-20abafc9db41"
license = "Elastic License v2"
name = "Suspicious Registry Symbolic Link"
os_list = ["windows"]
version = "1.0.10"

query = '''
registry where event.action == "modification" and user.id : ("S-1-5-21*", "S-1-12-*") and
registry.value : "SymbolicLinkValue" and process.executable : "?:\\*" and
 not process.executable :
            ("?:\\Windows\\System32\\DriverStore\\FileRepository\\*", 
	     "?:\\Windows\\System32\\svchost.exe", 
             "?:\\Program Files\\*.exe", 
	     "?:\\Program Files (x86)\\*.exe", 
             "?:\\Windows\\Temp\\asw-*\\avg-av\\icarus.exe", 
	     "?:\\$WINDOWS.~BT\\Work\\*\\DismHost.exe") and
 not (process.code_signature.trusted == true and not process.code_signature.subject_name : "Microsoft*") and
 not (process.name : "DismHost.exe" and process.code_signature.trusted == true and process.code_signature.subject_name : "Microsoft *") and
 not (process.executable : "?:\\Windows\\System32\\msiexec.exe" and registry.path : "HKEY_USERS\\*\\Software\\Nico Mak Computing\\SymbolicLinkValue")
'''

actions = []
min_endpoint_version = "8.4.0"
[[optional_actions]]
action = "rollback"
field = "process.entity_id"
state = 0

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1574"
name = "Hijack Execution Flow"
reference = "https://attack.mitre.org/techniques/T1574/"


[threat.tactic]
id = "TA0004"
name = "Privilege Escalation"
reference = "https://attack.mitre.org/tactics/TA0004/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1112"
name = "Modify Registry"
reference = "https://attack.mitre.org/techniques/T1112/"


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

[internal]
min_endpoint_version = "8.4.0"

Stages and Predicates

Stage 1: registry

registry where event.action == "modification" and user.id : ("S-1-5-21*", "S-1-12-*") and
registry.value : "SymbolicLinkValue" and process.executable : "?:\\*" and
 not process.executable :
            ("?:\\Windows\\System32\\DriverStore\\FileRepository\\*", 
	     "?:\\Windows\\System32\\svchost.exe", 
             "?:\\Program Files\\*.exe", 
	     "?:\\Program Files (x86)\\*.exe", 
             "?:\\Windows\\Temp\\asw-*\\avg-av\\icarus.exe", 
	     "?:\\$WINDOWS.~BT\\Work\\*\\DismHost.exe") and
 not (process.code_signature.trusted == true and not process.code_signature.subject_name : "Microsoft*") and
 not (process.name : "DismHost.exe" and process.code_signature.trusted == true and process.code_signature.subject_name : "Microsoft *") and
 not (process.executable : "?:\\Windows\\System32\\msiexec.exe" and registry.path : "HKEY_USERS\\*\\Software\\Nico Mak Computing\\SymbolicLinkValue")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_namestarts_withMicrosoftexcludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft"
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.code_signature.subject_namestarts_withMicrosoft excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Microsoft "
process.nameeqDismHost.exeexcludes:process.name field:"process.name" value:"DismHost.exe"
process.executableeq?:\Windows\System32\msiexec.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\msiexec.exe"
registry.pathwildcardHKEY_USERS\*\Software\Nico Mak Computing\SymbolicLinkValueexcludes:registry.path field:"registry.path" value:"HKEY_USERS\*\Software\Nico Mak Computing\SymbolicLinkValue"
process.executablewildcard?:\Windows\System32\DriverStore\FileRepository\*, ?:\Windows\System32\svchost.exe, ?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\Temp\asw-*\avg-av\icarus.exe, ?:\$WINDOWS.~BT\Work\*\DismHost.exeexcludes:process.executable

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • modification corpus 72 (elastic 72)
field:"EventType" kind:eq value:"modification"
process.code_signature.subject_namewildcard
  • Microsoft* corpus 22 (elastic 22)
field:"Signature" kind:wildcard value:"Microsoft*"
process.executablewildcard
  • ?:\* corpus 18 (elastic 18)
field:"Image" kind:wildcard value:"?:\*"
registry.valuewildcard
  • SymbolicLinkValue
field:"registry_value_name" kind:wildcard value:"SymbolicLinkValue"
user.idwildcard
  • S-1-12-* corpus 46 (elastic 46)
  • S-1-5-21* corpus 47 (elastic 47)
field:"user.id" kind:wildcard