Bandit Level 19→ Level 20

Bandit Level 19→ Level 20


Greetings, Welcome back to the OverTheWire Bandit challenges. In this level, we are presented with a custom binary that has to be exploited to get secret information.

Previous Flag

In the previous challenge, we successfully acquired the following flag:



Exploring bandit20-do

Our next task involves the execution of the ./bandit20-do command. Let's initiate it and see what it does:


It seems like this binary executes whatever bash command we provide as the user we want to escalate to, bandit20.

Retrieving Bandit20 Password

Now that we have access to bandit20-do, let's utilize it to read the contents of the /etc/bandit_pass/bandit20 file:

./bandit20-do cat /etc/bandit_pass/bandit20

Executing this command should reveal the password for the Bandit level 20.