Local System Accounts Discovery Attempt - Linux


Description

Detects attempts to enumerate local user accounts via common Linux utilities and sensitive file access. Adversaries may read files such as /etc/passwd, /etc/shadow, and /etc/sudoers, or use tools like getent, id, who, and finger to identify accounts and privilege levels on a compromised system.

Query · sigma

selection_lastlog:
  Image|endswith:
  - /lastlog
  - /last
  - /lastb
selection_root_string:
  CommandLine|contains: 'x:0:'
selection_read_utilities:
  Image|endswith:
  - /cat
  - /ed
  - /emacs
  - /head
  - /less
  - /makemap
  - /more
  - /nano
  - /sqlite3
  - /tail
  - /vi
  - /vim
  CommandLine|contains:
  - /etc/passwd
  - /etc/shadow
  - /etc/sudoers
  - master.passwd
  - pwd.db
selection_id:
  Image|endswith: /id
selection_lsof:
  Image|endswith: /lsof
  CommandLine|contains: -u
selection_getent:
  Image|endswith: /getent
  CommandLine|contains:
  - ' passwd'
  - ' shadow'
selection_who:
  Image|endswith:
  - /finger
  - /users
  - /w
  - /who
selection_ypcat:
  Image|endswith: /ypcat
  CommandLine|contains: passwd
filter_optional_landscape_sysinfo:
  ParentCommandLine|contains: /usr/bin/landscape-sysinfo
  Image|endswith: /who
condition: 1 of selection_* and not 1 of filter_optional_*

Known false positives

  • Legitimate administration activities
Raw source Local System Accounts Discovery Attempt - Linux · Sigma
Esc
Published by SigmaHQ/sigma ↗, licensed under Detection Rule License 1.1 ↗. Reproduced here unmodified.
title: Local System Accounts Discovery Attempt - Linux
id: b45e3d6f-42c6-47d8-a478-df6bd6cf534c
status: test
description: |
    Detects attempts to enumerate local user accounts via common Linux utilities and sensitive file access.
    Adversaries may read files such as /etc/passwd, /etc/shadow, and /etc/sudoers, or use tools like getent,
    id, who, and finger to identify accounts and privilege levels on a compromised system.
references:
    - https://github.com/redcanaryco/atomic-red-team/blob/f339e7da7d05f6057fdfcdd3742bfcf365fee2a9/atomics/T1087.001/T1087.001.md
    - https://my.f5.com/manage/s/article/K589
    - https://man.freebsd.org/cgi/man.cgi?pwd_mkdb
    - https://man7.org/linux/man-pages/man1/getent.1.html
    - https://linux.die.net/man/1/finger
author: Alejandro Ortuno, oscd.community, CheraghiMilad
date: 2020-10-08
modified: 2026-11-03
tags:
    - attack.discovery
    - attack.t1087.001
logsource:
    category: process_creation
    product: linux
detection:
    selection_lastlog:
        Image|endswith:
            - '/lastlog'
            - '/last'
            - '/lastb'
    selection_root_string:
        CommandLine|contains: 'x:0:'
    selection_read_utilities:
        Image|endswith:
            - '/cat'
            - '/ed'
            - '/emacs'
            - '/head'
            - '/less'
            - '/makemap'
            - '/more'
            - '/nano'
            - '/sqlite3'
            - '/tail'
            - '/vi'
            - '/vim'
        CommandLine|contains:
            - '/etc/passwd'
            - '/etc/shadow'
            - '/etc/sudoers'
            - 'master.passwd'
            - 'pwd.db'
    selection_id:
        Image|endswith: '/id'
    selection_lsof:
        Image|endswith: '/lsof'
        CommandLine|contains: '-u'
    selection_getent:
        Image|endswith: '/getent'
        CommandLine|contains:
            - ' passwd'
            - ' shadow'
    selection_who:
        Image|endswith:
            - '/finger'
            - '/users'
            - '/w'
            - '/who'
    selection_ypcat:
        Image|endswith: '/ypcat'
        CommandLine|contains: 'passwd'
    filter_optional_landscape_sysinfo:
        ParentCommandLine|contains: '/usr/bin/landscape-sysinfo'
        Image|endswith: '/who'
    condition: 1 of selection_* and not 1 of filter_optional_*
falsepositives:
    - Legitimate administration activities
level: low

Detection rules belong to the projects that publish them and remain under their own licenses. This site indexes and links to them; it claims no rights in them.