T1546.002 Elastic Security · Elastic

Detect Screensaver in Elastic Security

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.

MITRE ATT&CK

Tactic
Privilege Escalation Persistence
Technique
T1546 Event Triggered Execution
Sub-technique
T1546.002 Screensaver
Canonical reference
https://attack.mitre.org/techniques/T1546/002/

Elastic Detection Query

Elastic Security (Elastic)
eql
registry where event.type in ("creation", "change") and
  registry.path : ("*\\Control Panel\\Desktop\\SCRNSAVE.EXE", "*\\Control Panel\\Desktop\\ScreenSaveActive", "*\\Control Panel\\Desktop\\ScreenSaverIsSecure", "*\\Control Panel\\Desktop\\ScreenSaveTimeOut") and
  (
    (registry.path : "*SCRNSAVE.EXE" and not registry.data.strings : ("C:\\Windows\\system32\\*", "C:\\Windows\\SysWOW64\\*", "")) or
    registry.data.strings : ("*AppData*", "*\\Temp\\*", "*ProgramData*", "*\\Public\\*", "*powershell*", "*cmd.exe*", "*wscript*", "*cscript*", "*rundll32*")
  )
high severity high confidence

Detects T1546.002 screensaver persistence by monitoring registry writes to HKCU\Control Panel\Desktop screensaver-related values. Alerts when SCRNSAVE.EXE points outside of system32/SysWOW64, or when any screensaver registry value contains suspicious process or path references indicative of malicious redirection.

Data Sources

Windows RegistrySysmon (Event ID 12/13)Elastic Endpoint

Required Tables

registry

False Positives & Tuning

  • Legitimate screensaver configuration tools or enterprise management software (e.g., Group Policy, SCCM) modifying these registry keys as part of policy enforcement
  • Power management or remote desktop software that adjusts ScreenSaveActive or ScreenSaveTimeOut to prevent screen lock during active sessions
  • Custom corporate screensavers deployed via IT that are stored in non-standard paths such as a network share or %ProgramFiles% subdirectory
Download portable Sigma rule (.yml)

Other platforms for T1546.002


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Set Malicious Screensaver Path in Registry

    Expected signal: Sysmon Event ID 13 (Registry Value Set) for HKCU\Control Panel\Desktop\SCRNSAVE.EXE with Details=C:\Windows\System32\cmd.exe. Additional Event ID 13 records for ScreenSaveActive and ScreenSaveTimeOut. Security Event ID 4657 if registry auditing is enabled.

  2. Test 2Disable Screensaver Lock Screen for Silent Execution

    Expected signal: Sysmon Event ID 13: TargetObject HKCU\Control Panel\Desktop\ScreenSaverIsSecure, Details=0. This should be correlated with concurrent SCRNSAVE.EXE changes.

  3. Test 3Deploy Fake Screensaver via AppData

    Expected signal: Sysmon Event ID 11 (File Created): malicious.scr in AppData path. Sysmon Event ID 13: SCRNSAVE.EXE value set to AppData path. Both the file creation and registry modification events fire. The AppData path in the registry value is the primary detection trigger.

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