Detection rules › Elastic

Potential Execution via Shortcut Modification

Source
github.com/elastic/protections-artifacts

Adversaries may create or modify shortcuts that can execute a program during system boot or user login. Shortcuts are used to reference other files or programs that will be opened or executed when the shortcut is clicked or executed by a system startup process.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Adversaries may create or modify shortcuts that can execute a program during system boot or user login. Shortcuts are
used to reference other files or programs that will be opened or executed when the shortcut is clicked or executed by a
system startup process.
"""
id = "6b045c74-157d-4f05-b08f-620ce9ea96e9"
license = "Elastic License v2"
name = "Potential Execution via Shortcut Modification"
os_list = ["windows"]
version = "1.0.23"

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

 process.name : ("cmd.exe", "powershell.exe") and process.parent.executable : "?:\\Windows\\Explorer.exe" and

 process.working_directory :
       ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "?:\\Users\\*\\AppData\\Roaming\\Zoom\\bin\\*",
        "?:\\Users\\*\\AppData\\Local\\slack\\*", "?:\\Users\\*\\AppData\\Local\\Discord\\*") and

 process.command_line : ("*chrome.exe*", "*firefox.exe*", "*outlook.exe*", "msedge.exe", "*thunderbird.exe*",
                         "*slack.exe*", "*notepad++.exe*", "*discord.exe*", "*winword.exe*", "*excel.exe*", "*powerpnt*",
                         "*Teams*", "*zoom.exe*", "*update.exe*") and 
 not (process.name : "cmd.exe" and process.command_line : "*chrome.exe*" and process.args : "SET RENDERDOC_HOOK_EGL=0 && START \"")
'''

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 = "T1059"
name = "Command and Scripting Interpreter"
reference = "https://attack.mitre.org/techniques/T1059/"
[[threat.technique.subtechnique]]
id = "T1059.001"
name = "PowerShell"
reference = "https://attack.mitre.org/techniques/T1059/001/"

[[threat.technique.subtechnique]]
id = "T1059.003"
name = "Windows Command Shell"
reference = "https://attack.mitre.org/techniques/T1059/003/"



[threat.tactic]
id = "TA0002"
name = "Execution"
reference = "https://attack.mitre.org/tactics/TA0002/"
[[threat]]
framework = "MITRE ATT&CK"
[[threat.technique]]
id = "T1547"
name = "Boot or Logon Autostart Execution"
reference = "https://attack.mitre.org/techniques/T1547/"
[[threat.technique.subtechnique]]
id = "T1547.009"
name = "Shortcut Modification"
reference = "https://attack.mitre.org/techniques/T1547/009/"



[threat.tactic]
id = "TA0003"
name = "Persistence"
reference = "https://attack.mitre.org/tactics/TA0003/"

[internal]
min_endpoint_version = "7.15.0"

Stages and Predicates

Stage 1: process

process where event.action : "start" and

 process.name : ("cmd.exe", "powershell.exe") and process.parent.executable : "?:\\Windows\\Explorer.exe" and

 process.working_directory :
       ("?:\\Program Files\\*", "?:\\Program Files (x86)\\*", "?:\\Users\\*\\AppData\\Roaming\\Zoom\\bin\\*",
        "?:\\Users\\*\\AppData\\Local\\slack\\*", "?:\\Users\\*\\AppData\\Local\\Discord\\*") and

 process.command_line : ("*chrome.exe*", "*firefox.exe*", "*outlook.exe*", "msedge.exe", "*thunderbird.exe*",
                         "*slack.exe*", "*notepad++.exe*", "*discord.exe*", "*winword.exe*", "*excel.exe*", "*powerpnt*",
                         "*Teams*", "*zoom.exe*", "*update.exe*") and 
 not (process.name : "cmd.exe" and process.command_line : "*chrome.exe*" and process.args : "SET RENDERDOC_HOOK_EGL=0 && START \"")

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.argseqSET RENDERDOC_HOOK_EGL=0 && START "excludes:process.args
process.command_linematchchrome.exeexcludes:process.command_line field:"process.command_line" value:"chrome.exe"
process.nameeqcmd.exeexcludes:process.name field:"process.name" value:"cmd.exe"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actionwildcard
  • start corpus 391 (elastic 391)
field:"EventType" kind:wildcard value:"start"
process.command_linewildcard
  • *Teams*
  • *chrome.exe*
  • *discord.exe*
  • *excel.exe*
  • *firefox.exe*
  • *notepad++.exe*
  • *outlook.exe*
  • *powerpnt*
  • *slack.exe*
  • *thunderbird.exe*
  • *update.exe*
  • *winword.exe*
  • *zoom.exe*
  • msedge.exe
field:"CommandLine" kind:wildcard
process.namewildcard
  • cmd.exe corpus 121 (elastic 92, splunk 29)
  • powershell.exe corpus 184 (elastic 140, splunk 44)
field:"process_name" kind:wildcard
process.parent.executablewildcard
  • ?:\Windows\Explorer.exe corpus 5 (elastic 5)
field:"ParentImage" kind:wildcard value:"?:\Windows\Explorer.exe"
process.working_directorywildcard
  • ?:\Program Files (x86)\*
  • ?:\Program Files\*
  • ?:\Users\*\AppData\Local\Discord\*
  • ?:\Users\*\AppData\Local\slack\*
  • ?:\Users\*\AppData\Roaming\Zoom\bin\*
field:"CurrentDirectory" kind:wildcard