Detection rules › Sigma

Suspicious ScreenSave Change by Reg.exe

Status
test
Severity
medium
Log source
product windows, category process_creation
Author
frack113
Source
github.com/SigmaHQ/sigma

Adversaries may establish persistence by executing malicious content triggered by user inactivity. Screensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Suspicious ScreenSave Change by Reg.exe
id: 0fc35fc3-efe6-4898-8a37-0b233339524f
status: test
description: |
    Adversaries may establish persistence by executing malicious content triggered by user inactivity.
    Screensavers are programs that execute after a configurable time of user inactivity and consist of Portable Executable (PE) files with a .scr file extension
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1546.002/T1546.002.md
    - https://www.welivesecurity.com/wp-content/uploads/2017/08/eset-gazer.pdf
author: frack113
date: 2021-08-19
modified: 2022-06-02
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1546.002
logsource:
    category: process_creation
    product: windows
detection:
    selection_reg:
        Image|endswith: '\reg.exe'
        CommandLine|contains:
            - 'HKEY_CURRENT_USER\Control Panel\Desktop'
            - 'HKCU\Control Panel\Desktop'
    selection_option_1: # /force Active ScreenSaveActive
        CommandLine|contains|all:
            - '/v ScreenSaveActive'
            - '/t REG_SZ'
            - '/d 1'
            - '/f'
    selection_option_2: # /force  set ScreenSaveTimeout
        CommandLine|contains|all:
            - '/v ScreenSaveTimeout'
            - '/t REG_SZ'
            - '/d '
            - '/f'
    selection_option_3: # /force set ScreenSaverIsSecure
        CommandLine|contains|all:
            - '/v ScreenSaverIsSecure'
            - '/t REG_SZ'
            - '/d 0'
            - '/f'
    selection_option_4: # /force set a .scr
        CommandLine|contains|all:
            - '/v SCRNSAVE.EXE'
            - '/t REG_SZ'
            - '/d '
            - '.scr'
            - '/f'
    condition: selection_reg and 1 of selection_option_*
falsepositives:
    - GPO
level: medium

Stages and Predicates

Stage 0: condition

selection_reg and 1 of selection_option_*

Stage 1: selection_reg

selection_reg:
    Image|endswith: '\reg.exe'
    CommandLine|contains:
        - 'HKEY_CURRENT_USER\Control Panel\Desktop'
        - 'HKCU\Control Panel\Desktop'

Stage 2: selection_option_1

selection_option_1:
    CommandLine|contains|all:
        - '/v ScreenSaveActive'
        - '/t REG_SZ'
        - '/d 1'
        - '/f'

Stage 3: selection_option_2

selection_option_2:
    CommandLine|contains|all:
        - '/v ScreenSaveTimeout'
        - '/t REG_SZ'
        - '/d '
        - '/f'

Stage 4: selection_option_3

selection_option_3:
    CommandLine|contains|all:
        - '/v ScreenSaverIsSecure'
        - '/t REG_SZ'
        - '/d 0'
        - '/f'

Stage 5: selection_option_4

selection_option_4:
    CommandLine|contains|all:
        - '/v SCRNSAVE.EXE'
        - '/t REG_SZ'
        - '/d '
        - '.scr'
        - '/f'

Indicators

Each row is a field, operator, and value that the rule matches. The corpus column counts how many other rules in the catalog look for the same combination: high numbers point to widely-used, community-vetted indicators. Blank or 1 shows that the indicator is specific to this rule.

FieldKindValues
CommandLinematch
  • .scr corpus 5 (sigma 5)
  • /d corpus 2 (sigma 2)
  • /d 0 corpus 2 (sigma 2)
  • /d 1 corpus 2 (sigma 2)
  • /f corpus 7 (sigma 5, splunk 1, kusto 1)
  • /t REG_SZ corpus 2 (sigma 2)
  • /v SCRNSAVE.EXE
  • /v ScreenSaveActive
  • /v ScreenSaveTimeout
  • /v ScreenSaverIsSecure
  • HKCU\Control Panel\Desktop
  • HKEY_CURRENT_USER\Control Panel\Desktop
Imageends_with
  • \reg.exe corpus 58 (sigma 58)