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