Linux setcap sets cap_setgid on binaries (Setgid capability assignment)

Flags Linux setcap commands that set cap_setgid on binaries via process creation logs.

FreeReviewedSigma · Low · v3
Product
linux
Category
process_creation
Author
Luc Génaux (SigmaHQ), DRL 1.1
Published
2026-01-24
Updated
2026-07-31
title: Linux setcap sets cap_setgid on binaries (Setgid capability assignment)
id: 3edc06ed-5c9b-4ccd-89ba-59fcc26e4d26
status: experimental
description: This rule identifies process executions of the setcap utility where the command line includes cap_setgid, indicating a binary has its setgid-related capability assigned. Granting cap_setgid can enable a process without full privileges to perform group ID (GID) operations that may otherwise be restricted, which can support persistence or future privilege-related actions. The detection relies on Linux process creation telemetry, matching the setcap executable path and the presence of cap_setgid in the command line.
references:
  - https://man7.org/linux/man-pages/man8/setcap.8.html
  - https://dfir.ch/posts/linux_capabilities/
  - https://juggernaut-sec.com/capabilities/#cap_setgid
  - https://github.com/SigmaHQ/sigma/blob/master/rules/linux/process_creation/proc_creation_lnx_cap_setgid.yml
author: Luc Génaux, Huntrule Team
date: 2026-01-24
tags:
  - attack.privilege-escalation
  - attack.persistence
  - attack.t1548
  - attack.t1554
logsource:
  product: linux
  category: process_creation
detection:
  selection:
    Image|endswith: /setcap
    CommandLine|contains: cap_setgid
  condition: selection
falsepositives:
  - Unknown
level: low
license: DRL-1.1
related:
  - id: 3a716279-c18c-4488-83be-f9ececbfb9fc
    type: derived