Detection rules › Elastic

Unusual Process Running as Antimalware Protected

Source
github.com/elastic/protections-artifacts

Identifies when commonly abused signed binaries are running as Antimalware Light protection level. This may indicate an attempt to bypass PPL protection and inject malicious code into a protected process or disable security software.

MITRE ATT&CK coverage

Rule body

[rule]
description = """
Identifies when commonly abused signed binaries are running as Antimalware Light protection level. This may indicate an
attempt to bypass PPL protection and inject malicious code into a protected process or disable security software.
"""
id = "952e978e-5326-42d4-95df-9fceae0bca70"
license = "Elastic License v2"
name = "Unusual Process Running as Antimalware Protected"
os_list = ["windows"]
reference = [
    "https://github.com/mattifestation/AntimalwareBlight",
    "https://www.elastic.co/security-labs/elastic-security-labs-steps-through-the-r77-rootkit",
]
version = "1.0.25"

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

(process.Ext.protection == "PsProtectedSignerAntimalware-Light" and
   process.pe.original_file_name :
     ("AddInProcess.exe",
      "AddInProcess32.exe",
      "AddInUtil.exe",
      "AppLaunch.exe",
      "aspnet_compiler.exe",
      "aspnet_regbrowsers.exe",
      "aspnet_regiis.exe",
      "aspnet_regsql.exe",
      "aspnet_state.exe",
      "aspnet_wp.exe",
      "CasPol.exe",
      "ComSvcConfig.exe",
      "csc.exe",
      "cvtres.exe",
      "DataSvcUtil.exe",
      "EdmGen.exe",
      "ilasm.exe",
      "InstallUtil.exe",
      "jsc.exe",
      "Microsoft.Workflow.Compiler.exe",
      "MSBuild.exe",
      "mscorsvw.exe",
      "ngen.exe",
      "ngentask.exe",
      "RegAsm.exe",
      "RegSvcs.exe",
      "ServiceModelReg.exe",
      "vbc.exe",
      "WsatConfig.exe",
      "dllhost.exe",
      "regsvr32.exe",
      "GPUpdate.exe",
      "SearchProtocolHost.exe",
      "msiexec.exe",
      "powershell.exe",
      "cmd.exe",
      "rundll32.exe",
      "regsvr32.exe",
      "mshta.exe")) or

descendant of
 [process where event.action == "start" and
  process.Ext.protection == "PsProtectedSignerAntimalware-Light" and
  process.pe.original_file_name :
     ("AddInProcess.exe",
      "AddInProcess32.exe",
      "AddInUtil.exe",
      "AppLaunch.exe",
      "aspnet_compiler.exe",
      "aspnet_regbrowsers.exe",
      "aspnet_regiis.exe",
      "aspnet_regsql.exe",
      "aspnet_state.exe",
      "aspnet_wp.exe",
      "CasPol.exe",
      "ComSvcConfig.exe",
      "csc.exe",
      "cvtres.exe",
      "DataSvcUtil.exe",
      "EdmGen.exe",
      "ilasm.exe",
      "InstallUtil.exe",
      "jsc.exe",
      "Microsoft.Workflow.Compiler.exe",
      "MSBuild.exe",
      "mscorsvw.exe",
      "ngen.exe",
      "ngentask.exe",
      "RegAsm.exe",
      "RegSvcs.exe",
      "ServiceModelReg.exe",
      "vbc.exe",
      "WsatConfig.exe",
      "dllhost.exe",
      "regsvr32.exe",
      "GPUpdate.exe",
      "SearchProtocolHost.exe",
      "msiexec.exe",
      "powershell.exe",
      "pwsh.exe",
      "cmd.exe",
      "rundll32.exe",
      "regsvr32.exe",
      "mshta.exe")]
'''

min_endpoint_version = "7.16.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 = "T1211"
name = "Exploitation for Defense Evasion"
reference = "https://attack.mitre.org/techniques/T1211/"

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


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

[internal]
min_endpoint_version = "7.16.0"

Stages and Predicates

Stage 1: process

process where event.action == "start" and

(process.Ext.protection == "PsProtectedSignerAntimalware-Light" and
   process.pe.original_file_name :
     ("AddInProcess.exe",
      "AddInProcess32.exe",
      "AddInUtil.exe",
      "AppLaunch.exe",
      "aspnet_compiler.exe",
      "aspnet_regbrowsers.exe",
      "aspnet_regiis.exe",
      "aspnet_regsql.exe",
      "aspnet_state.exe",
      "aspnet_wp.exe",
      "CasPol.exe",
      "ComSvcConfig.exe",
      "csc.exe",
      "cvtres.exe",
      "DataSvcUtil.exe",
      "EdmGen.exe",
      "ilasm.exe",
      "InstallUtil.exe",
      "jsc.exe",
      "Microsoft.Workflow.Compiler.exe",
      "MSBuild.exe",
      "mscorsvw.exe",
      "ngen.exe",
      "ngentask.exe",
      "RegAsm.exe",
      "RegSvcs.exe",
      "ServiceModelReg.exe",
      "vbc.exe",
      "WsatConfig.exe",
      "dllhost.exe",
      "regsvr32.exe",
      "GPUpdate.exe",
      "SearchProtocolHost.exe",
      "msiexec.exe",
      "powershell.exe",
      "cmd.exe",
      "rundll32.exe",
      "regsvr32.exe",
      "mshta.exe")) or

descendant of
 [process where event.action == "start" and
  process.Ext.protection == "PsProtectedSignerAntimalware-Light" and
  process.pe.original_file_name :
     ("AddInProcess.exe",
      "AddInProcess32.exe",
      "AddInUtil.exe",
      "AppLaunch.exe",
      "aspnet_compiler.exe",
      "aspnet_regbrowsers.exe",
      "aspnet_regiis.exe",
      "aspnet_regsql.exe",
      "aspnet_state.exe",
      "aspnet_wp.exe",
      "CasPol.exe",
      "ComSvcConfig.exe",
      "csc.exe",
      "cvtres.exe",
      "DataSvcUtil.exe",
      "EdmGen.exe",
      "ilasm.exe",
      "InstallUtil.exe",
      "jsc.exe",
      "Microsoft.Workflow.Compiler.exe",
      "MSBuild.exe",
      "mscorsvw.exe",
      "ngen.exe",
      "ngentask.exe",
      "RegAsm.exe",
      "RegSvcs.exe",
      "ServiceModelReg.exe",
      "vbc.exe",
      "WsatConfig.exe",
      "dllhost.exe",
      "regsvr32.exe",
      "GPUpdate.exe",
      "SearchProtocolHost.exe",
      "msiexec.exe",
      "powershell.exe",
      "pwsh.exe",
      "cmd.exe",
      "rundll32.exe",
      "regsvr32.exe",
      "mshta.exe")]

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
event.actioneq
  • start corpus 391 (elastic 391)
field:"EventType" kind:eq value:"start"
process.Ext.protectioneq
  • PsProtectedSignerAntimalware-Light
field:"process.Ext.protection" kind:eq value:"PsProtectedSignerAntimalware-Light"
process.pe.original_file_namewildcard
  • AddInProcess.exe corpus 2 (elastic 2)
  • AddInProcess32.exe
  • AddInUtil.exe corpus 4 (sigma 3, elastic 1)
  • AppLaunch.exe
  • CasPol.exe
  • ComSvcConfig.exe
  • DataSvcUtil.exe corpus 2 (sigma 1, elastic 1)
  • EdmGen.exe
  • GPUpdate.exe corpus 2 (elastic 1, splunk 1)
  • InstallUtil.exe corpus 21 (elastic 11, sigma 6, splunk 4)
  • MSBuild.exe corpus 20 (elastic 15, splunk 4, sigma 1)
  • Microsoft.Workflow.Compiler.exe corpus 12 (elastic 7, sigma 3, splunk 2)
  • RegAsm.exe corpus 14 (elastic 7, sigma 6, splunk 1)
  • RegSvcs.exe corpus 13 (elastic 7, sigma 5, splunk 1)
  • SearchProtocolHost.exe corpus 3 (splunk 2, elastic 1)
  • ServiceModelReg.exe
  • WsatConfig.exe
  • aspnet_compiler.exe corpus 2 (elastic 2)
  • aspnet_regbrowsers.exe
  • aspnet_regiis.exe corpus 3 (elastic 2, sigma 1)
  • aspnet_regsql.exe
  • aspnet_state.exe
  • aspnet_wp.exe
  • cmd.exe corpus 81 (sigma 43, elastic 21, splunk 17)
  • csc.exe corpus 4 (elastic 2, sigma 1, splunk 1)
  • cvtres.exe
  • dllhost.exe corpus 3 (splunk 2, elastic 1)
  • ilasm.exe corpus 2 (sigma 1, elastic 1)
  • jsc.exe corpus 2 (sigma 1, elastic 1)
  • mscorsvw.exe
  • mshta.exe corpus 40 (elastic 21, sigma 13, splunk 6)
  • msiexec.exe corpus 20 (elastic 11, sigma 5, splunk 4)
  • ngen.exe
  • ngentask.exe
  • powershell.exe corpus 138 (sigma 84, splunk 30, elastic 24)
  • regsvr32.exe corpus 37 (sigma 17, elastic 15, splunk 5)
  • rundll32.exe corpus 78 (sigma 35, elastic 22, splunk 21)
  • vbc.exe corpus 3 (elastic 2, sigma 1)
field:"OriginalFileName" kind:wildcard