T1546.002 Splunk · SPL

Detect Screensaver in Splunk

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/

SPL Detection Query

Splunk (SPL)
spl
index=wineventlog sourcetype="XmlWinEventLog:Microsoft-Windows-Sysmon/Operational" (EventCode=12 OR EventCode=13)
| where match(TargetObject, "Control Panel\\\\Desktop")
| where match(TargetObject, "(SCRNSAVE\.EXE|ScreenSaveActive|ScreenSaverIsSecure|ScreenSaveTimeOut)")
| eval IsScrnsaveExe=if(match(TargetObject, "SCRNSAVE\.EXE"), 1, 0)
| eval SuspiciousPath=if(match(lower(Details), "(appdata|\\\\temp\\\\|programdata|public|powershell|cmd\.exe|wscript|cscript|rundll32)"), 1, 0)
| eval NotSystemPath=if(IsScrnsaveExe=1 AND NOT match(Details, "(?i)(windows\\\\system32|syswow64)"), 1, 0)
| where SuspiciousPath=1 OR NotSystemPath=1
| eval ScreenSaverFile=mvindex(split(Details, "\\\\"), -1)
| table _time, host, User, EventCode, TargetObject, Details, ScreenSaverFile, SuspiciousPath, NotSystemPath, Image, CommandLine
| sort - _time
high severity high confidence

Detects screensaver persistence via Sysmon Registry events. Monitors Control Panel\Desktop key for SCRNSAVE.EXE value changes pointing to non-system directories or known-abused binaries. Correlates with ScreenSaveActive changes (enabling screensaver) and ScreenSaverIsSecure changes (disabling lock screen on resume — a common attacker modification to ensure payload runs without login interruption).

Data Sources

Windows Registry: Registry Key ModificationSysmon Event ID 12 (RegistryEvent - Object Create/Delete)Sysmon Event ID 13 (RegistryEvent - Value Set)

Required Sourcetypes

XmlWinEventLog:Microsoft-Windows-Sysmon/Operational

False Positives & Tuning

  • Corporate desktop management tools configuring screensaver centrally via Group Policy
  • Third-party screensaver applications installing outside System32
  • IT baseline enforcement tools resetting screensaver settings
  • User-initiated changes through Windows Display Settings
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