Windows: attrib.exe Executed with +s to Mark Files as System Files

Flags attrib.exe executions that include the +s switch to mark target files as system files.

FreeReviewedSigma · Low · v5
Product
windows
Category
process_creation
Author
frack113 (SigmaHQ), DRL 1.1
Published
2022-02-04
Updated
2026-07-31
title: "Windows: attrib.exe Executed with +s to Mark Files as System Files"
id: dba3aaf0-cdd4-41d6-8469-5caa78a7483e
related:
  - id: efec536f-72e8-4656-8960-5e85d091345b
    type: similar
  - id: bb19e94c-59ae-4c15-8c12-c563d23fe52b
    type: derived
status: test
description: This rule matches process creation events where attrib.exe is executed with the +s flag to mark files as system files. Attackers and administrators can use this to modify file attributes for stealth, persistence, or to influence how files are displayed and handled. It relies on Windows process creation telemetry including the image path (or OriginalFileName) and the command line containing ' +s '.
references:
  - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.001/T1564.001.md#atomic-test-3---create-windows-system-file-with-attrib
  - https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/attrib
  - https://unit42.paloaltonetworks.com/unit42-sure-ill-take-new-combojack-malware-alters-clipboards-steal-cryptocurrency/
  - https://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_attrib_system.yml
author: frack113, Huntrule Team
date: 2022-02-04
modified: 2023-03-14
tags:
  - attack.stealth
  - attack.t1564.001
  - detection.threat-hunting
logsource:
  category: process_creation
  product: windows
detection:
  selection_img:
    - Image|endswith: \attrib.exe
    - OriginalFileName: ATTRIB.EXE
  selection_cli:
    CommandLine|contains: " +s "
  condition: all of selection_*
falsepositives:
  - Unknown
level: low
license: DRL-1.1