Detection rules › Sigma

Hidden Files and Directories

Status
test
Severity
low
Log source
product linux, service auditd
Author
Pawel Mazur
Source
github.com/SigmaHQ/sigma

Detects adversary creating hidden file or directory, by detecting directories or files with . as the first character

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Hidden Files and Directories
id: d08722cd-3d09-449a-80b4-83ea2d9d4616
status: test
description: Detects adversary creating hidden file or directory, by detecting directories or files with . as the first character
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1564.001/T1564.001.md
author: 'Pawel Mazur'
date: 2021-09-06
modified: 2025-06-16
tags:
    - attack.stealth
    - attack.t1564.001
logsource:
    product: linux
    service: auditd
detection:
    selection_commands:
        type: 'EXECVE'
        a0:
            - 'mkdir'
            - 'nano'
            - 'touch'
            - 'vi'
            - 'vim'
    selection_arguments:
        - a1|re: '(^|\/)\.[^.\/]'
        - a2|re: '(^|\/)\.[^.\/]'
    condition: all of selection_*
falsepositives:
    - Unknown
level: low

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_commands

selection_commands:
    type: 'EXECVE'
    a0:
        - 'mkdir'
        - 'nano'
        - 'touch'
        - 'vi'
        - 'vim'

Stage 2: selection_arguments

selection_arguments:
    - a1|re: '(^|\/)\.[^.\/]'
    - a2|re: '(^|\/)\.[^.\/]'

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
a0eq
  • mkdir
  • nano
  • touch
  • vi
  • vim
a1regex_match
  • (^|\/).[^.\/]
a2regex_match
  • (^|\/).[^.\/]
typeeq
  • EXECVE