Detection rules › Elastic

DLL Control Panel Items Registry Modification

Source
github.com/elastic/protections-artifacts

Identifies the modification of DLL Control Panel Items registry. Adversaries may load a malicious DLL when Control Panel is executed via setting the CPLs subkey to the DLL path.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies the modification of DLL Control Panel Items registry. Adversaries may load a malicious DLL when Control Panel
is executed via setting the CPLs subkey to the DLL path.
"""
id = "340bdcad-187f-4ccb-b84e-34ee70844d78"
license = "Elastic License v2"
name = "DLL Control Panel Items Registry Modification"
os_list = ["windows"]
reference = ["https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/hh127454(v=vs.85)"]
version = "1.0.26"

query = '''
registry where
 registry.path :
      ("HKEY_USERS\\S-1-5-*\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\CPLs\\*",
       "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\CPLs\\*") and
  process.executable != null and registry.data.strings != null and not registry.data.type : "REG_DWORD" and
  not (process.executable :
              ("?:\\Windows\\System32\\svchost.exe",
               "?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe",
               "?:\\Windows\\System32\\drvinst.exe",
               "?:\\Windows\\System32\\msiexec.exe") and user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20")) and
  not (process.code_signature.subject_name : "Wacom Co., Ltd." and process.code_signature.trusted == true) and
  not registry.data.strings : ("C:\\Program Files\\*", "C:\\Program Files (x86)\\*")
'''

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

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

[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1218"
name = "System Binary Proxy Execution"
reference = "https://attack.mitre.org/techniques/T1218/"
[[threat.technique.subtechnique]]
id = "T1218.002"
name = "Control Panel"
reference = "https://attack.mitre.org/techniques/T1218/002/"



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

[internal]
min_endpoint_version = "8.0.0"

Stages and Predicates

Stage 1: registry

registry where
 registry.path :
      ("HKEY_USERS\\S-1-5-*\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\CPLs\\*",
       "HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\Control Panel\\CPLs\\*") and
  process.executable != null and registry.data.strings != null and not registry.data.type : "REG_DWORD" and
  not (process.executable :
              ("?:\\Windows\\System32\\svchost.exe",
               "?:\\Windows\\System32\\DriverStore\\FileRepository\\*.exe",
               "?:\\Windows\\System32\\drvinst.exe",
               "?:\\Windows\\System32\\msiexec.exe") and user.id : ("S-1-5-18", "S-1-5-19", "S-1-5-20")) and
  not (process.code_signature.subject_name : "Wacom Co., Ltd." and process.code_signature.trusted == true) and
  not registry.data.strings : ("C:\\Program Files\\*", "C:\\Program Files (x86)\\*")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameeqWacom Co., Ltd.excludes:process.code_signature.subject_name field:"process.code_signature.subject_name" value:"Wacom Co., Ltd."
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executablewildcard?:\Windows\System32\svchost.exe, ?:\Windows\System32\DriverStore\FileRepository\*.exe, ?:\Windows\System32\drvinst.exe, ?:\Windows\System32\msiexec.exeexcludes:process.executable
user.ideqS-1-5-18, S-1-5-19, S-1-5-20excludes:user.id field:"user.id" value:"S-1-5-18" field:"user.id" value:"S-1-5-19" field:"user.id" value:"S-1-5-20"
registry.data.stringsstarts_withC:\Program Files\, C:\Program Files (x86)\excludes:registry.data.strings field:"registry.data.strings" value:"C:\Program Files\" field:"registry.data.strings" value:"C:\Program Files (x86)\"
registry.data.typeeqREG_DWORDexcludes:registry.data.type field:"registry.data.type" value:"REG_DWORD"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
process.executableis_not_null
  • (no value, null check)
field:"Image" kind:is_not_null
registry.data.stringsis_not_null
  • (no value, null check)
field:"Details" kind:is_not_null
registry.pathwildcard
  • HKEY_USERS\S-1-5-*\Software\Microsoft\Windows\CurrentVersion\Control Panel\CPLs\*
  • HKLM\Software\Microsoft\Windows\CurrentVersion\Control Panel\CPLs\*
field:"TargetObject" kind:wildcard