The Bash – System 2 challenge is accessed via an SSH connection to the Root-Me infrastructure:
ssh -p 2222 [email protected]Once connected, the shell lands directly in the challenge directory. A detailed listing reveals the two elements at the heart of the exercise:
ls -la
total 16
dr-x--x--x 2 app-script-ch12-cracked app-script-ch12 4096 ... .
-rwsr-xr-x 1 app-script-ch12-cracked app-script-ch12 7452 ... ch12
-r-------- 1 app-script-ch12-cracked app-script-ch12 14 ... .passwdThe binary ch12 displays the SUID bit enabled (the s in the -rwsr-xr-x permissions): regardless of the user executing it, the process will run with the privileges of its owner, app-script-ch12-cracked. The .passwd file, on the other hand, is protected for exclusive read access by the same owner. Any direct access attempt is immediately rejected:
cat .passwd
cat: .passwd: Permission deniedThe challenge statement provides the complete C source code of the binary — a significant advantage compared to a real penetration test where disassembly or dynamic debugging would be required to reconstruct the program's logic.