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.
- Product
- windows
- Category
- process_creation
- Author
- frack113 (SigmaHQ), DRL 1.1
- Published
- 2022-02-04
- Updated
- 2026-07-31
ATT&CK techniques
Defense EvasionRecon
Resource Dev
Initial Access
Execution
Persistence
Priv Esc
Defense Evasion
Cred Access
Discovery
Lateral Movement
Collection
C2
Exfiltration
Impact
What it detects
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 '.
Reporting behind it
- github.comhttps://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.001/T1564.001.md#atomic-test-3---create-windows-system-file-with-attrib
- docs.microsoft.comhttps://docs.microsoft.com/en-us/windows-server/administration/windows-commands/attrib
- unit42.paloaltonetworks.comhttps://unit42.paloaltonetworks.com/unit42-sure-ill-take-new-combojack-malware-alters-clipboards-steal-cryptocurrency/
- github.comhttps://github.com/SigmaHQ/sigma/blob/master/rules-threat-hunting/windows/process_creation/proc_creation_win_attrib_system.yml
Changelog
v5- v5Candidate ingested via manual entry.2026-07-31
- v4Candidate ingested via manual entry.2026-07-31
- v3Candidate ingested via manual entry.2026-07-31
- v2Candidate ingested via manual entry.2026-07-31
- v1No changelog recorded for this version.2026-07-30
Detection content is published as a reviewed draft. Tune thresholds and exclusions against your own telemetry before enabling this rule for alerting.
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