Login
SSH: ssh [email protected] -p 2220
Challenge URL: https://overthewire.org/wargames/bandit/bandit33.html
Task
After all this git stuff, it is time for another escape. Good luck!
Solution
In Linux, using printenv will give all the environment variables. Some common ones that are good to know:
| Variable | Description |
|---|---|
TERM | Current terminal emulation |
HOME | Path to home directory of currently logged in user |
LANG | Current locale settings |
PATH | Directory list to be searched when executing commands |
PWD | Pathname of the current working directory |
SHELL / $0 | The path of the current user's shell (most important!) |
USER | Currently logged-in user |
Any command is converted to uppercase and executed, and there are no uppercase commands in Linux. Therefore, we need a way to start a normal terminal. $0 is the shell path - run it:
$0
whoami
cat /etc/bandit_pass/bandit33Running
whoamiconfirms it is actually logged in asbandit33.