Bandit Level 32 → Level 33



We have a weird shell.
As shown all the commands are letters converted to uppercase, so we can not use normal commands.
Instead there is something in Linux shells called special variables that we can use.
Special variables in Linux shells are predefined variables that hold specific values or information about the current shell environment.
For example $$
will hold the PID of our current shell:
echo $$

Or $?
, which will tell us if there is some errors in command, if not it will return 0:
asdf
echo $?
ls
echo $?

Also there is $0
, which contains the name of the script or command that was executed, and we will use it to escape our shell since it is running sh:
$0


Here is the password.

Last updated