T1546.002
Screensaver
Adversaries may establish persistence by modifying the Windows screensaver configuration. Screensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension. Adversaries can abuse this by modifying the SCRNSAVE.EXE registry value in HKCU\Control Panel\Desktop to point to a malicious executable that runs whenever the screen saver activates.
Microsoft Sentinel / Defender
kusto
let ScreeSaverKeys = dynamic([
"HKEY_CURRENT_USER\\Control Panel\\Desktop",
"HKCU\\Control Panel\\Desktop"
]);
let ScreeSaverValues = dynamic(["SCRNSAVE.EXE", "ScreenSaveActive", "ScreenSaverIsSecure", "ScreenSaveTimeOut"]);
DeviceRegistryEvents
| where Timestamp > ago(24h)
| where RegistryKey has "Control Panel\\Desktop"
| where RegistryValueName in~ (ScreeSaverValues)
| where ActionType in ("RegistryValueSet", "RegistryKeyCreated")
| extend IsScreeSaverPath = RegistryValueName =~ "SCRNSAVE.EXE"
| extend SuspiciousPath = RegistryValueData has_any (
"AppData", "Temp", "ProgramData", "Users\\Public",
"powershell", "cmd.exe", "wscript", "cscript", "rundll32"
)
| extend NotSystemScr = IsScreeSaverPath and not(RegistryValueData has_any (
"C:\\Windows\\system32\\",
"C:\\Windows\\SysWOW64\\"
))
| project Timestamp, DeviceName, AccountName, ActionType, RegistryKey,
RegistryValueName, RegistryValueData, SuspiciousPath, NotSystemScr,
InitiatingProcessFileName, InitiatingProcessCommandLine
| where SuspiciousPath or NotSystemScr
| sort by Timestamp desc high severity
high confidence
Data Sources
Windows Registry: Registry Key Modification Microsoft Defender for Endpoint
Required Tables
DeviceRegistryEvents
False Positives
- Corporate desktop management tools (e.g., SCCM, Group Policy) that configure screensaver timeout and path centrally
- Legitimate third-party screensaver applications installed by users (e.g., 3D aquarium, slideshow screensavers) that install .scr files outside System32
- IT helpdesk tools that reset screensaver settings as part of standard baseline enforcement
- User-initiated changes through Windows Display Settings that write to the Control Panel\Desktop registry key
Last updated: 2026-04-20 Research depth: deep
Unlock Pro Content
Get the full detection package for T1546.002 including response playbook, investigation guide, and atomic red team tests.
Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance
Related Detections
Parent Technique
T1546Event Triggered ExecutionRelated Sub-techniques
T1546.001Change Default File AssociationT1546.003Windows Management Instrumentation Event SubscriptionT1546.004Unix Shell Configuration ModificationT1546.005TrapT1546.006LC_LOAD_DYLIB AdditionT1546.007Netsh Helper DLLT1546.008Accessibility FeaturesT1546.009AppCert DLLsT1546.010AppInit DLLsT1546.011Application ShimmingT1546.012Image File Execution Options InjectionT1546.013PowerShell ProfileT1546.014EmondT1546.015Component Object Model HijackingT1546.016Installer PackagesT1546.017Udev RulesT1546.018Python Startup Hooks