Detection rules › Sigma

Setuid and Setgid

Status
test
Severity
low
Log source
product linux, category process_creation
Author
Ömer Günal
Source
github.com/SigmaHQ/sigma

Detects suspicious change of file privileges with chown and chmod commands

MITRE ATT&CK coverage

Event coverage

Rule body yaml

title: Setuid and Setgid
id: c21c4eaa-ba2e-419a-92b2-8371703cbe21
status: test
description: Detects suspicious change of file privileges with chown and chmod commands
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1548.001/T1548.001.md
author: Ömer Günal
date: 2020-06-16
modified: 2022-10-05
tags:
    - attack.persistence
    - attack.privilege-escalation
    - attack.t1548.001
logsource:
    product: linux
    category: process_creation
detection:
    selection_root:
        CommandLine|contains: 'chown root'
    selection_perm:
        CommandLine|contains:
            - ' chmod u+s'
            - ' chmod g+s'
    condition: all of selection_*
falsepositives:
    - Legitimate administration activities
level: low

Stages and Predicates

Stage 0: condition

all of selection_*

Stage 1: selection_root

selection_root:
    CommandLine|contains: 'chown root'

Stage 2: selection_perm

selection_perm:
    CommandLine|contains:
        - ' chmod u+s'
        - ' chmod g+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
  • chmod g+s
  • chmod u+s
  • chown root