Detection rules › Sigma

Access of Sudoers File Content

Status
test
Severity
medium
Log source
category process_creation, product linux
Author
Florian Roth (Nextron Systems)
Source
github.com/SigmaHQ/sigma

Detects the execution of a text-based file access or inspection utilities to read the content of /etc/sudoers in order to potentially list all users that have sudo rights.

Known false positives

  • Legitimate administration activities

MITRE ATT&CK coverage

Telemetry coverage

PlatformRecord / event type
LinuxEvent ID 1: Process Create

Rule body

title: Access of Sudoers File Content
id: 0f79c4d2-4e1f-4683-9c36-b5469a665e06
status: test
description: Detects the execution of a text-based file access or inspection utilities to read the content of /etc/sudoers in order to potentially list all users that have sudo rights.
references:
    - https://github.com/sleventyeleven/linuxprivchecker/
author: Florian Roth (Nextron Systems)
date: 2022-06-20
modified: 2025-06-04
tags:
    - attack.reconnaissance
    - attack.t1592.004
logsource:
    category: process_creation
    product: linux
detection:
    selection:
        Image|endswith:
            - '/cat'
            - '/ed'
            - '/egrep'
            - '/emacs'
            - '/fgrep'
            - '/grep'
            - '/head'
            - '/less'
            - '/more'
            - '/nano'
            - '/tail'
        CommandLine|contains: ' /etc/sudoers'
    condition: selection
falsepositives:
    - Legitimate administration activities
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith:
        - '/cat'
        - '/ed'
        - '/egrep'
        - '/emacs'
        - '/fgrep'
        - '/grep'
        - '/head'
        - '/less'
        - '/more'
        - '/nano'
        - '/tail'
    CommandLine|contains: ' /etc/sudoers'

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
CommandLinematch
  • /etc/sudoers
field:"CommandLine" kind:match value:" /etc/sudoers"
Imageends_with
  • /cat
  • /ed
  • /egrep
  • /emacs
  • /fgrep
  • /grep
  • /head
  • /less
  • /more
  • /nano
  • /tail
field:"Image" kind:ends_with