Detection rules › Elastic

Suspicious Image File Execution Options Modification

Source
github.com/elastic/protections-artifacts

The Debugger and SilentProcessExit registry keys can allow an adversary to intercept the execution of files, causing a different process to be executed. This functionality can be abused by an adversary to establish persistence.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
The Debugger and SilentProcessExit registry keys can allow an adversary to intercept the execution of files, causing a
different process to be executed. This functionality can be abused by an adversary to establish persistence.
"""
id = "ff5fd85a-e770-4e57-8bae-0d267442eb9f"
license = "Elastic License v2"
name = "Suspicious Image File Execution Options Modification"
os_list = ["windows"]
reference = [
    "https://oddvar.moe/2018/04/10/persistence-using-globalflags-in-image-file-execution-options-hidden-from-autoruns-exe/",
]
version = "1.0.33"

query = '''
registry where registry.data.strings != null and process.executable != null and 
 registry.path : ("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\*.exe\\Debugger",
                  "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\*\\Debugger",
                  "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\*\\MonitorProcess",
                  "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\*\\MonitorProcess") and
   /* add FPs here */
 not registry.data.strings :
          ("?:\\Program Files*\\ThinKiosk\\thinkiosk.exe",
           "*\\PSAppDeployToolkit\\*",
           "%windir%\\System32\\taskkill.exe",
           "ntsd -d",
           "%1",
           "?:\\Program Files (x86)\\Siemens\\WinCC\\bin\\CCHelpStarter.exe",
           "SppExtComObjPatcher.exe",
           "rundll32.exe SppExtComObjHook.dll,PatcherMain",
           "rundll32.exe SECOPatcher.dll,PatcherMain",
           "C:\\Windows\\System32\\systray.exe",
           "C:\\Program Files (x86)\\CryptoLocker Prevention\\ShadowGuard.exe",
           "\"C:\\Program Files\\SolarWinds\\Orion\\Licensing\\Migration.exe\" /hooked",
           "\"C:\\Program Files (x86)\\FastTrack Software\\Admin By Request\\AdminByRequest.exe\" /AutoElevate",
           "\"C:\\Program Files (x86)\\SolarWinds\\Orion\\Licensing\\Migration.exe\" /hooked") and
 not (process.executable : "?:\\Windows\\System32\\svchost.exe" and registry.data.strings : "svchost.exe") and
 not process.executable :
             ("?:\\Program Files\\*.exe",
              "?:\\Program Files (x86)\\*.exe",
              "?:\\Windows\\SysWOW64\\MonitorConsole.exe",
              "?:\\Windows\\SoftwareDistribution\\Download\\Install\\PatchMyPC-ScriptRunner.exe",
              "?:\\ProgramData\\Heimdal Security\\Heimdal Thor Agent\\bin\\Heimdal.Wizard.exe") and
 not (process.code_signature.subject_name : ("Patch My PC, LLC", "EXPRSVPN LLC", "Nasiboot_USB", "FastTrack Software Aps", "Admin By Request ApS") and process.code_signature.trusted == true)
'''

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 = "T1546"
name = "Event Triggered Execution"
reference = "https://attack.mitre.org/techniques/T1546/"
[[threat.technique.subtechnique]]
id = "T1546.012"
name = "Image File Execution Options Injection"
reference = "https://attack.mitre.org/techniques/T1546/012/"



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

[internal]
min_endpoint_version = "8.0.0"

Stages and Predicates

Stage 1: registry

registry where registry.data.strings != null and process.executable != null and
 registry.path : ("HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\*.exe\\Debugger",
                  "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\Image File Execution Options\\*\\Debugger",
                  "HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\*\\MonitorProcess",
                  "HKLM\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows NT\\CurrentVersion\\SilentProcessExit\\*\\MonitorProcess") and
 not registry.data.strings :
          ("?:\\Program Files*\\ThinKiosk\\thinkiosk.exe",
           "*\\PSAppDeployToolkit\\*",
           "%windir%\\System32\\taskkill.exe",
           "ntsd -d",
           "%1",
           "?:\\Program Files (x86)\\Siemens\\WinCC\\bin\\CCHelpStarter.exe",
           "SppExtComObjPatcher.exe",
           "rundll32.exe SppExtComObjHook.dll,PatcherMain",
           "rundll32.exe SECOPatcher.dll,PatcherMain",
           "C:\\Windows\\System32\\systray.exe",
           "C:\\Program Files (x86)\\CryptoLocker Prevention\\ShadowGuard.exe",
           "\"C:\\Program Files\\SolarWinds\\Orion\\Licensing\\Migration.exe\" /hooked",
           "\"C:\\Program Files (x86)\\FastTrack Software\\Admin By Request\\AdminByRequest.exe\" /AutoElevate",
           "\"C:\\Program Files (x86)\\SolarWinds\\Orion\\Licensing\\Migration.exe\" /hooked") and
 not (process.executable : "?:\\Windows\\System32\\svchost.exe" and registry.data.strings : "svchost.exe") and
 not process.executable :
             ("?:\\Program Files\\*.exe",
              "?:\\Program Files (x86)\\*.exe",
              "?:\\Windows\\SysWOW64\\MonitorConsole.exe",
              "?:\\Windows\\SoftwareDistribution\\Download\\Install\\PatchMyPC-ScriptRunner.exe",
              "?:\\ProgramData\\Heimdal Security\\Heimdal Thor Agent\\bin\\Heimdal.Wizard.exe") and
 not (process.code_signature.subject_name : ("Patch My PC, LLC", "EXPRSVPN LLC", "Nasiboot_USB", "FastTrack Software Aps", "Admin By Request ApS") and process.code_signature.trusted == true)

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
process.code_signature.subject_nameeqPatch My PC, LLC, EXPRSVPN LLC, Nasiboot_USB, FastTrack Software Aps, Admin By Request ApSexcludes:process.code_signature.subject_name
process.code_signature.trustedeqtrueexcludes:process.code_signature.trusted field:"process.code_signature.trusted" value:"true"
process.executableeq?:\Windows\System32\svchost.exeexcludes:process.executable field:"process.executable" value:"?:\Windows\System32\svchost.exe"
registry.data.stringseqsvchost.exeexcludes:registry.data.strings field:"registry.data.strings" value:"svchost.exe"
process.executablewildcard?:\Program Files\*.exe, ?:\Program Files (x86)\*.exe, ?:\Windows\SysWOW64\MonitorConsole.exe, ?:\Windows\SoftwareDistribution\Download\Install\PatchMyPC-ScriptRunner.exe, ?:\ProgramData\Heimdal Security\Heimdal Thor Agent\bin\Heimdal.Wizard.exeexcludes:process.executable
registry.data.stringswildcard?:\Program Files*\ThinKiosk\thinkiosk.exe, *\PSAppDeployToolkit\*, %windir%\System32\taskkill.exe, ntsd -d, %1, ?:\Program Files (x86)\Siemens\WinCC\bin\CCHelpStarter.exe, SppExtComObjPatcher.exe, rundll32.exe SppExtComObjHook.dll,PatcherMain, rundll32.exe SECOPatcher.dll,PatcherMain, C:\Windows\System32\systray.exe, C:\Program Files (x86)\CryptoLocker Prevention\ShadowGuard.exe, "C:\Program Files\SolarWinds\Orion\Licensing\Migration.exe" /hooked, "C:\Program Files (x86)\FastTrack Software\Admin By Request\AdminByRequest.exe" /AutoElevate, "C:\Program Files (x86)\SolarWinds\Orion\Licensing\Migration.exe" /hookedexcludes:registry.data.strings

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
  • HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*.exe\Debugger corpus 2 (elastic 2)
  • HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\*\MonitorProcess corpus 2 (elastic 2)
  • HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\*\Debugger corpus 2 (elastic 2)
  • HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows NT\CurrentVersion\SilentProcessExit\*\MonitorProcess corpus 2 (elastic 2)
field:"TargetObject" kind:wildcard