Setuid bit set

Severity highLinuxSingle eventstablelinux.privilege.setuid_bit_set · v1.0.0

What it detects

The setuid bit set on a file (chmod u+s or chmod 4xxx) — creating a SUID binary that runs with the owner's privileges, used for privilege escalation and persistence.

MITRE ATT&CK mapping

  • T1548.001Abuse Elevation Control Mechanism: Setuid and Setgid· Privilege Escalation

False positives and triage

Some installers set SUID on legitimate binaries (ping, sudo). Judge by the target path — SUID on a shell, interpreter, or a file in /tmp,/home is high risk.

The rule

Declarative YAML read by the detection engine — data, never executed. Confidence 70%. Source: rules/linux/setuid_bit_set.yaml, licensed under the Apache License 2.0.

id: linux.privilege.setuid_bit_set
version: 1.0.0
status: stable
severity: high
confidence: 0.7
platforms: [linux]
mitre_techniques: [T1548.001]
description: |
  The setuid bit set on a file (`chmod u+s` or `chmod 4xxx`) — creating a SUID
  binary that runs with the owner's privileges, used for privilege escalation and
  persistence.
match:
  command_line_regex: '(?i)chmod\s+(0?[4-7][0-7]{3}|u\+s|g\+s|\+s)\b'
false_positive_guidance: |
  Some installers set SUID on legitimate binaries (ping, sudo). Judge by the target
  path — SUID on a shell, interpreter, or a file in /tmp,/home is high risk.

Related detections

Run this rule on your own logs — offline

KIROSEC runs this rule and the rest of the library over Windows, Linux, macOS and cloud audit logs on the analyst's own machine. Every alert links to the events that raised it, and nothing leaves the device.

Browse all detections