Linux User Added to Privileged Group

edit

Identifies attempts to add a user to a privileged group. Attackers may add users to a privileged group in order to establish persistence on a system.

Rule type: eql

Rule indices:

  • logs-endpoint.events.*
  • endgame-*

Severity: medium

Risk score: 47

Runs every: 5m

Searches indices from: now-9m (Date Math format, see also Additional look-back time)

Maximum alerts per execution: 100

References: None

Tags:

  • Domain: Endpoint
  • OS: Linux
  • Use Case: Threat Detection
  • Tactic: Persistence
  • Data Source: Elastic Endgame

Version: 1

Rule authors:

  • Elastic

Rule license: Elastic License v2

Rule query

edit
process where host.os.type == "linux" and event.type == "start" and
process.parent.name == "sudo" and
process.args in ("root", "admin", "wheel", "staff", "sudo",
                             "disk", "video", "shadow", "lxc", "lxd") and
(
  process.name in ("usermod", "adduser") or
  process.name == "gpasswd" and
  process.args in ("-a", "--add", "-M", "--members")
)

Framework: MITRE ATT&CKTM