Detection rules › Sigma

User Added To Root/Sudoers Group Using Usermod

Status
test
Severity
medium
Log source
product linux, category process_creation
Author
TuanLe (GTSC)
Source
github.com/SigmaHQ/sigma

Detects usage of the "usermod" binary to add users add users to the root or suoders groups

MITRE ATT&CK coverage

TacticTechniques
PersistenceNo specific technique
Privilege EscalationNo specific technique

Event coverage

Rule body yaml

title: User Added To Root/Sudoers Group Using Usermod
id: 6a50f16c-3b7b-42d1-b081-0fdd3ba70a73
status: test
description: Detects usage of the "usermod" binary to add users add users to the root or suoders groups
references:
    - https://pberba.github.io/security/2021/11/23/linux-threat-hunting-for-persistence-account-creation-manipulation/
    - https://www.configserverfirewall.com/ubuntu-linux/ubuntu-add-user-to-root-group/
author: TuanLe (GTSC)
date: 2022-12-21
tags:
    - attack.privilege-escalation
    - attack.persistence
logsource:
    product: linux
    category: process_creation
detection:
    selection:
        Image|endswith: '/usermod'
        CommandLine|contains:
            - '-aG root'
            - '-aG sudoers'
    condition: selection
falsepositives:
    - Legitimate administrator activities
level: medium

Stages and Predicates

Stage 0: condition

selection

Stage 1: selection

selection:
    Image|endswith: '/usermod'
    CommandLine|contains:
        - '-aG root'
        - '-aG sudoers'

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
  • -aG root
  • -aG sudoers
Imageends_with
  • /usermod