Detection rules › Sigma

Set Files as System Files Using Attrib.EXE

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

Detects the execution of "attrib" with the "+s" flag to mark files as system files

MITRE ATT&CK coverage

Event coverage

ProviderEventTitle
SysmonEvent ID 1Process creation

Rule body yaml

title: Set Files as System Files Using Attrib.EXE
id: bb19e94c-59ae-4c15-8c12-c563d23fe52b
related:
    - id: efec536f-72e8-4656-8960-5e85d091345b
      type: similar
status: test
description: Detects the execution of "attrib" with the "+s" flag to mark files as system files
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/
author: frack113
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

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_img

selection_img:
    - Image|endswith: '\attrib.exe'
    - OriginalFileName: 'ATTRIB.EXE'

Stage 2: selection_cli

selection_cli:
    CommandLine|contains: ' +s '

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
  • +s corpus 2 (sigma 2)
Imageends_with
  • \attrib.exe corpus 5 (sigma 5)
OriginalFileNameeq
  • ATTRIB.EXE corpus 5 (sigma 3, elastic 2)