T1548.001: Setuid and Setgid
Adversaries may abuse SUID or SGID bits on binaries like find, bash, or python to escalate privileges to root.
Living-off-the-Land Matrix for T1548.001
Across 15 verified binariesfind
Find searches directory trees for files matching criteria. When configured with SUID permissions or sudo privileges without restrictions, its -exec flag can spawn root shells or execute arbitrary commands.
find . -name "*.conf" -exec /bin/sh -p \;bash
The GNU Bourne Again SHell (bash) is the default interactive shell on most Linux distributions. Abused for spawning interactive reverse TCP shells, executing encoded base64 commands, and privilege escalation.
bash -pawk
AWK is a pattern scanning and processing language. Because AWK includes built-in system() functions and file operations, SUID awk or sudo privileges can be trivially abused to break out of restricted environments and spawn shells.
awk 'BEGIN {system("/bin/sh")}'tar
GNU tar is an archiving utility. Attackers abuse tar checkpoint execution options (--checkpoint-action=exec) to spawn an interactive shell or execute arbitrary commands when running with sudo or SUID permissions.
tar -cf /dev/null /dev/null --checkpoint=1 --checkpoint-action=exec=/bin/shvim
Vim is an interactive screen text editor. When configured with SUID permissions or privileged sudo rights without command restrictions, attackers escape into a root shell via the :! command.
vim -c ':!/bin/sh'env
Env runs a program in a modified environment. When configured with the SUID bit or unrestricted sudo access, running env to launch a shell preserves elevated root EUID permissions.
env /bin/sh -pgdb
GNU Debugger (gdb) allows code inspection and execution. When granted SUID permissions or privileged sudo rights, gdb can execute arbitrary shell commands prior to loading programs.
gdb -nx -ex '!sh' -ex quitcp
GNU cp copies files. When configured with SUID permissions, attackers can overwrite system authentication files like /etc/passwd or copy binaries with elevated attributes.
cp /tmp/passwd_modified /etc/passwdchmod
Chmod alters file mode bits. SUID or sudo chmod is abused to turn standard shells into persistent SUID root binaries by adding the 4755 permission bit.
chmod 4755 /bin/dashchown
Chown changes file owner and group. SUID chown allows users to claim ownership of root-owned scripts or binaries and subsequently modify them.
chown $(id -u):$(id -g) /etc/shadowxargs
Xargs builds and executes command lines from standard input. SUID xargs can execute an interactive root shell retaining elevated permissions.
xargs -a /dev/null /bin/sh -pstrace
Strace intercepts and records system calls. When run with SUID permissions, strace executes target binaries with preserved root privileges.
strace -o /dev/null /bin/sh -ptimeout
Timeout runs a command with a time limit. SUID timeout launches child programs with preserved elevated permissions.
timeout 7d /bin/sh -pionice
Ionice sets or gets process I/O scheduling class and priority. SUID ionice launches child programs with elevated privileges.
ionice /bin/sh -pnice
Nice runs a program with modified scheduling priority. SUID nice spawns child programs retaining elevated EUID permissions.
nice /bin/sh -p