Detection rules › Sigma

Set Files as System Files Using Attrib.EXE

Status
test
Severity
low
Log source
category process_creation, product windows
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

Telemetry coverage

ProviderRecord / event type
SysmonEvent ID 1: Process creation

Rule body

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

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • +s corpus 2 (sigma 2)
field:"CommandLine" kind:match value:" +s "
Imageends_with
  • \attrib.exe corpus 5 (sigma 5)
field:"Image" kind:ends_with value:"\attrib.exe"
OriginalFileNameeq
  • ATTRIB.EXE corpus 5 (sigma 3, elastic 2)
field:"OriginalFileName" kind:eq value:"ATTRIB.EXE"