boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources
boot767 notes · 24 posts

Every Shell Leaves a Trace

I keep what I learn about offensive security here: my notes from CTFs, certifications and university, plus the walkthroughs I write when a box is worth sharing. It's organized the way I work a box. Recon first, then a foothold, then privilege escalation, then the rest of the network.

latest transmission · 2026-11-19Collection of OSINT Tools and Resources

Abusing SUID/SGID

Python - Mismanaged

/usr/bin/gomugomunooo_king_kobraaa is a Python SUID binary. Running it with the command below drops a shell:

/usr/bin/gomugomunooo_king_kobraaa -c 'import os; os.execl("/bin/bash", "sh", "-p")'

Finding and Exploiting SUID Files

The first step in Linux privilege escalation is to check for files with the SUID/GUID bit set. This means the file can be run with the permissions of its owner/group, in this case the super-user. We can leverage this to get a shell with those privileges.

What Is an SUID Binary?

In Linux everything is a file, including directories and devices, which have permissions to allow or restrict three operations: read/write/execute. So when you set permissions for any file, you should be aware of which Linux users you allow or restrict all three permissions for. Here is how maximum privileges (rwx-rwx-rwx) look:

user group others

rwx rwx rwx
421 421 421

The maximum number of bits that can be used to set permission for each user is 7, a combination of read (4), write (2) and execute (1). For example, if you set permissions using chmod as 755, it becomes rwxr-xr-x.

When special permission is given to each user it becomes SUID or SGID. When the extra bit 4 is set on the user (owner) it becomes SUID (Set User ID), and when the bit 2 is set on the group it becomes SGID (Set Group ID).

Permissions to Look For

SUID

rws-rwx-rwx

GUID

rwx-rws-rwx

Finding SUID Binaries

A LinEnum scan already tells us there are SUID-capable files on the system. To do it manually, use find / -perm -u=s -type f 2>/dev/null to search the file system for SUID/GUID files. Breaking the command down:

Initiate the find command:

find

Suppress errors:

2>/dev/null