CyberKit

SUID / SGID Binaries

Also called setuid, setgid, set-user-ID.

Executables that run with the file owner's or group's privileges regardless of caller.

What it is

Files carrying the setuid or setgid permission bit execute with the privileges of the binary's owner or group rather than the invoking user: the mechanism that lets tools like passwd update root-owned files. The bit appears as an 's' in the permission string.

Why it matters

An unexpected SUID-root binary, or a standard tool granted SUID where it shouldn't be, is a classic privilege-escalation foothold and persistence trick. Enumerating every SUID/SGID file on a host and diffing against package expectations is routine in Linux triage.

In practice

A copy of an interpreter dropped in /tmp with the setuid-root bit set let any user spawn a root shell on demand: a textbook escalation backdoor.

What to look for

  • SUID files outside standard system paths.
  • SUID binaries added after the system was built.
  • Interpreters or shells with the SUID bit set.

Common mistake

Only comparing names. Check hashes and paths, since attackers copy shells and set the bit.

Practice it nearby

CyberKit has no tool for this term itself. These are the closest places to practice it.

In the field

Well-known tools where this shows up on the job. They are listed to show the landscape, not as a recommendation.

  • osquery Open source

    Exposes Linux and macOS system state as SQL tables you can query.

  • Velociraptor Open source

    Collects Linux artifacts such as logs, cron and shell history at scale. Our notes.

  • Falco Open source

    Watches system calls at runtime and alerts on suspicious behavior.

  • Wazuh Open source

    Collects Linux logs and checks file integrity on each host.

Read next

Sources