currentversion_autorun_keys_modification
Description
Detects modification of autostart extensibility point (ASEP) in registry
Query · yara_l
events:
$reg.metadata.event_type = "REGISTRY_MODIFICATION"
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\software\\microsoft\\windows\\currentversion") and
(
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\shellserviceobjectdelayload") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\run\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\runonce\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\runonceex\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\runservices\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\runservicesonce\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\policies\\system\\shell") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\policies\\explorer\\run") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\group policy\\scripts\\startup") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\group policy\\scripts\\shutdown") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\group policy\\scripts\\logon") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\group policy\\scripts\\logoff") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\explorer\\shellserviceobjects") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\explorer\\shelliconoverlayidentifiers") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\explorer\\shellexecutehooks") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\explorer\\sharedtaskscheduler") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\explorer\\browser helper objects") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\plap providers") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential providers") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential provider filters")
)
not (
$reg.target.registry.registry_value_data = "(Empty)" or
re.regex($reg.target.registry.registry_key, `\\NgcFirst\\ConsecutiveSwitchCount$`) nocase or
re.regex($reg.principal.process.file.full_path, `\\AppData\\Local\\Microsoft\\OneDrive\\Update\\OneDriveSetup\.exe$`) nocase or
re.regex($reg.principal.process.file.full_path, `\\AppData\\Roaming\\Spotify\\Spotify\.exe$`) nocase or
re.regex($reg.principal.process.file.full_path, `\\AppData\\Local\\WebEx\\WebexHost\.exe$`) nocase or
$reg.principal.process.file.full_path = "C:\\WINDOWS\\system32\\devicecensus.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Windows\\system32\\winsat.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files\\Microsoft OneDrive\\StandaloneUpdater\\OneDriveSetup.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files\\Microsoft OneDrive\\Update\\OneDriveSetup.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files (x86)\\Microsoft OneDrive\\Update\\OneDriveSetup.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files\\KeePass Password Safe 2\\ShInstUtil.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files\\Everything\\Everything.exe" nocase or
$reg.principal.process.file.full_path = "C:\\Program Files (x86)\\Microsoft Office\\root\\integration\\integrator.exe" nocase or
(
$reg.principal.process.file.full_path = "C:\\Windows\\system32\\LogonUI.exe" nocase and
(
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential providers\\{d6886603-9d2f-4eb2-b667-1971041fa96b}\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential providers\\{bec09223-b018-416d-a0ac-523971b639f5}\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential providers\\{8af662bf-65a0-4d0a-a540-a338a999d36f}\\") or
strings.contains(strings.to_lower($reg.target.registry.registry_key), "\\authentication\\credential providers\\{27fbdb57-b613-4af2-9d7e-4fa7a66c21ad}\\")
)
) or
(
(
strings.starts_with(strings.to_lower($reg.principal.process.file.full_path), "c:\\program files (x86)\\microsoft\\edgeupdate\\install\\") or
strings.starts_with(strings.to_lower($reg.principal.process.file.full_path), "c:\\program files (x86)\\microsoft\\edgewebview\\") or
strings.starts_with(strings.to_lower($reg.principal.process.file.full_path), "c:\\program files (x86)\\microsoft\\edge\\application\\msedge.exe")
)
) or
(
$reg.principal.process.file.full_path = "C:\\Windows\\system32\\regsvr32.exe" nocase and
strings.contains(strings.to_lower($reg.target.registry.registry_key), "dropboxt") and
re.regex($reg.target.registry.registry_value_data, `A251-47B7-93E1-CDD82E34AF8B