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

Finding Files

A reference for finding files on a Linux target during privilege escalation: searching by content, name, permissions, owner, time, and size, plus locating writable or executable directories.

Find Files

grep -irl "flag{" /home 2>/dev/null               # does a recursive search for a text
find / -writable 2>/dev/null                      # search for writable folders
find / -writable 2>/dev/null | cut -d "/" -f 2,3 | grep -v proc | sort -u  # find writable folders that $PATH can use, cleaned up version.
find / -type f -perm -04000 -ls 2>/dev/null       # will list files that have SUID or SGID bits set.
find . -name flag1.txt 2>/dev/null                # find the file named “flag1.txt” in the current directory
find /home -name flag1.txt 2>/dev/null            # find the file names “flag1.txt” in the /home directory
find / -type d -name config 2>/dev/null           # find the directory named config under “/”
find / -type f -perm 0777 2>/dev/null             # find files with the 777 permissions (files readable, writable, and executable by all users)
find / -perm a=x 2>/dev/null                      # find executable files
find /home -user frank 2>/dev/null                # find all files for user “frank” under “/home”
find / -mtime 10 2>/dev/null                      # find files that were modified in the last 10 days
find / -atime 10 2>/dev/null                      # find files that were accessed in the last 10 days
find / -cmin -60 2>/dev/null                      # find files changed within the last hour (60 minutes)
find / -amin -60 2>/dev/null                      # find files accesses within the last hour (60 minutes)
find / -size 50M 2>/dev/null                      # find files with a 50 MB size

This command can also be used with (+) and (-) signs to specify a file that is larger or smaller than the given size.

The example above returns files that are larger than 100 MB. It is important to note that the "find" command tends to generate errors which sometimes makes the output hard to read. This is why it would be wise to use the "find" command with "-type f 2>/dev/null" to redirect errors to "/dev/null" and have a cleaner output (below).

Folders and Files That Can Be Written To or Executed From

find / -writable -type d 2>/dev/null   # Find world-writeable folders
find / -perm -222 -type d 2>/dev/null  # Find world-writeable folders
find / -perm -o w -type d 2>/dev/null  # Find world-writeable folders

The reason we see three different "find" commands that could potentially lead to the same result can be seen in the manual document. As you can see below, the perm parameter affects the way "find" works.

Find world-executable folders.

find / -perm -o x -type d 2>/dev/null

Find Development Tools and Supported Languages

find / -name perl*
find / -name python*
find / -name gcc*

Find Specific File Permissions

Below is a short example used to find files that have the SUID bit set. The SUID bit allows the file to run with the privilege level of the account that owns it, rather than the account which runs it. This allows for an interesting privilege escalation path, which we will see in more detail on task 6. The example below is given to complete the subject on the "find" command.

Find files with the SUID bit, which allows us to run the file with a higher privilege level than the current user.

find / -perm -u=s -type f 2>/dev/null

General Linux Commands

As we are in the Linux realm, familiarity with Linux commands in general will be very useful. Please spend some time getting comfortable with commands such as find, locate, grep, cut, sort, etc.