logon_scripts_userinitmprlogonscript


Description

Detects creation or execution of UserInitMprLogonScript persistence method License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md.

Query · yara_l

events:
(((($exec_selection.metadata.product_event_type = "1" and re.regex($exec_selection.principal.process.file.full_path, `.*\\userinit\.exe`)) and not (re.regex($exec_selection.target.process.file.full_path, `.*\\explorer\.exe`) and re.regex($exec_selection.target.process.command_line, `.*\\netlogon\.bat`))) or (($exec_selection.metadata.product_event_type = "11" or $exec_selection.metadata.product_event_type = "12" or $exec_selection.metadata.product_event_type = "13" or $exec_selection.metadata.product_event_type = "14") and re.regex($exec_selection.target.registry.registry_key, `.*UserInitMprLogonScript.*`))) or ($exec_selection.metadata.product_event_type = "1" and re.regex($exec_selection.target.process.command_line, `.*UserInitMprLogonScript.*`)))

  condition:
    $exec_selection
Raw source logon_scripts_userinitmprlogonscript · YARA-L
Esc
Published by chronicle/detection-rules ↗, licensed under Apache 2.0 ↗. Reproduced here unmodified.
rule logon_scripts_userinitmprlogonscript {
 meta:
    author = "Tom Ueltschi (@c_APT_ure)"
    description = "Detects creation or execution of UserInitMprLogonScript persistence method  License: https://github.com/Neo23x0/sigma/blob/master/LICENSE.Detection.Rules.md."
    reference = "https://tdm.socprime.com/tdm/info/QLazxYxAo1Y1"
    version = "0.01"
    created = "2021-03-09"
    product = "windows"
    service = "sysmon"
    mitre = "t1037, persistence, lateral_movement"

  events:
(((($exec_selection.metadata.product_event_type = "1" and re.regex($exec_selection.principal.process.file.full_path, `.*\\userinit\.exe`)) and not (re.regex($exec_selection.target.process.file.full_path, `.*\\explorer\.exe`) and re.regex($exec_selection.target.process.command_line, `.*\\netlogon\.bat`))) or (($exec_selection.metadata.product_event_type = "11" or $exec_selection.metadata.product_event_type = "12" or $exec_selection.metadata.product_event_type = "13" or $exec_selection.metadata.product_event_type = "14") and re.regex($exec_selection.target.registry.registry_key, `.*UserInitMprLogonScript.*`))) or ($exec_selection.metadata.product_event_type = "1" and re.regex($exec_selection.target.process.command_line, `.*UserInitMprLogonScript.*`)))

  condition:
    $exec_selection
}

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.