Windows: Detect .SCR screen saver file creation outside common system directories

Alerts on creation of .scr screen saver files in unusual locations on Windows.

FreeReviewedSigma · Medium · v2
Product
windows
Category
file_event
Author
Christopher Peacock @securepeacock, SCYTHE @scythe_io (SigmaHQ), DRL 1.1
Published
2022-04-27
Updated
2026-07-31
title: "Windows: Detect .SCR screen saver file creation outside common system directories"
id: b98685e1-19c1-47e6-8e75-3202d82d103d
status: test
description: This rule flags file creation events where the target filename ends with .scr and the file is not located in typical Windows system folders. Creating screensaver files in unusual paths can be used to stage or execute code under the screensaver file extension. It relies on Windows file event telemetry that includes the target filename for write/create operations.
references:
  - https://lolbas-project.github.io/lolbas/Libraries/Desk/
  - https://github.com/SigmaHQ/sigma/blob/master/rules/windows/file/file_event/file_event_win_new_scr_file.yml
author: Christopher Peacock @securepeacock, SCYTHE @scythe_io, Huntrule Team
date: 2022-04-27
modified: 2023-08-23
tags:
  - attack.stealth
  - attack.t1218.011
logsource:
  category: file_event
  product: windows
detection:
  selection:
    TargetFilename|endswith: .scr
  filter:
    TargetFilename|contains:
      - :\$WINDOWS.~BT\NewOS\
      - :\Windows\System32\
      - :\Windows\SysWOW64\
      - :\Windows\WinSxS\
      - :\WUDownloadCache\
  condition: selection and not filter
falsepositives:
  - The installation of new screen savers by third party software
level: medium
license: DRL-1.1
related:
  - id: c048f047-7e2a-4888-b302-55f509d4a91d
    type: derived