Detection rules › Elastic

Control Panel Process with Unusual Arguments

Source
github.com/elastic/protections-artifacts

Identifies instances of the Control Panel application running with suspicious keywords or paths in the process command line value. Adversaries may abuse Control.exe to proxy execution of malicious code.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies instances of the Control Panel application running with suspicious keywords or paths in the process command
line value. Adversaries may abuse Control.exe to proxy execution of malicious code.
"""
id = "a4862afb-1292-4f65-a15f-8d6a8019b5e2"
license = "Elastic License v2"
name = "Control Panel Process with Unusual Arguments"
os_list = ["windows"]
version = "1.0.31"

query = '''
process where event.action == "start" and
(

 (process.executable : ("?:\\Windows\\SysWOW64\\control.exe", "?:\\Windows\\System32\\control.exe") and
  process.command_line :
          ("*.jpg*",
           "*.png*",
           "*.gif*",
           "*.bmp*",
           "*.jpeg*",
           "*.TIFF*",
           "*.inf*",
           "*.dat*",
           "*.cpl:../*",
           "*..\\..\\*",
           "*/AppData/Local/*",
           "*:\\Users\\Public\\*",
           "*\\AppData\\Local\\*") and 
           
  /* excluding FPs where /name arg is used to specify a control by name */
  not (process.args : "/name" and process.args_count >= 2) and
  /* excluding system IL to minimize risk of killing system critical execution */
  not process.Ext.token.integrity_level_name == "system") or

  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and
   not (process.parent.name : "rundll32.exe" and process.parent.command_line : "*Shell32*Control_RunDLL*")) or

  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and
   not process.command_line : "*.cpl*" and process.args_count >= 3) or

  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and process.args_count >= 3 and
   (process.command_line : ("*/AppData/Local/*", "*:\\Users\\Public\\*", "*\\AppData\\Local\\*", "*:\\ProgramData\\*") or
    process.working_directory : ("?:\\Users\\*\\AppData\\Local\\*", "?:\\Users\\Public\\*")))
) and
not (process.name : "rundll32.exe" and process.args : ("OpenAs_RunDLL", "ShellExec_RunDLL"))
'''

min_endpoint_version = "7.15.0"
optional_actions = []
[[actions]]
action = "kill_process"
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 = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and
(
 (process.executable : ("?:\\Windows\\SysWOW64\\control.exe", "?:\\Windows\\System32\\control.exe") and
  process.command_line :
          ("*.jpg*",
           "*.png*",
           "*.gif*",
           "*.bmp*",
           "*.jpeg*",
           "*.TIFF*",
           "*.inf*",
           "*.dat*",
           "*.cpl:../*",
           "*..\\..\\*",
           "*/AppData/Local/*",
           "*:\\Users\\Public\\*",
           "*\\AppData\\Local\\*") and
  not (process.args : "/name" and process.args_count >= 2) and
  not process.Ext.token.integrity_level_name == "system") or
  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and
   not (process.parent.name : "rundll32.exe" and process.parent.command_line : "*Shell32*Control_RunDLL*")) or
  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and
   not process.command_line : "*.cpl*" and process.args_count >= 3) or
  (process.name : "rundll32.exe" and process.command_line : "*shell32*#*44*" and process.args_count >= 3 and
   (process.command_line : ("*/AppData/Local/*", "*:\\Users\\Public\\*", "*\\AppData\\Local\\*", "*:\\ProgramData\\*") or
    process.working_directory : ("?:\\Users\\*\\AppData\\Local\\*", "?:\\Users\\Public\\*")))
) and
not (process.name : "rundll32.exe" and process.args : ("OpenAs_RunDLL", "ShellExec_RunDLL"))

Exclusions

The rule actively suppresses these predicates.

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.args_countge
  • 3 transforms: number corpus 19 (elastic 19)
field:"process.args_count" kind:ge value:"3"
process.command_linewildcard
  • *..\..\* corpus 2 (elastic 2)
  • *.TIFF* corpus 2 (sigma 1, elastic 1)
  • *.bmp* corpus 3 (sigma 2, elastic 1)
  • *.cpl:../*
  • *.dat* corpus 4 (sigma 3, elastic 1)
  • *.gif* corpus 9 (sigma 8, elastic 1)
  • *.inf* corpus 4 (sigma 3, elastic 1)
  • *.jpeg* corpus 7 (sigma 6, elastic 1)
  • *.jpg* corpus 8 (sigma 7, elastic 1)
  • *.png* corpus 8 (sigma 7, elastic 1)
  • */AppData/Local/*
  • *:\ProgramData\* corpus 11 (sigma 9, elastic 2)
  • *:\Users\Public\* corpus 20 (sigma 18, elastic 2)
  • *\AppData\Local\* corpus 11 (sigma 10, elastic 1)
  • *shell32*#*44*
field:"CommandLine" kind:wildcard
process.executablewildcard
  • ?:\Windows\SysWOW64\control.exe
  • ?:\Windows\System32\control.exe
field:"Image" kind:wildcard
process.namewildcard
  • rundll32.exe corpus 126 (elastic 100, splunk 26)
field:"process_name" kind:wildcard value:"rundll32.exe"
process.working_directorywildcard
  • ?:\Users\*\AppData\Local\*
  • ?:\Users\Public\*
field:"CurrentDirectory" kind:wildcard