MayADevBe Blog

A Blog about Computer Science

OverTheWire Bandit Level 26 -> 27 - Walkthrough

Previous Level: Level 26


Login

SSH: ssh bandit26@bandit.labs.overthewire.org -p 2220

Password: 5czgV9L3Xx8JPOyRbXh6lQbmIOWvPT6Z

Task

Good job getting a shell! Now hurry and grab the password for bandit27!

A little bit of Theory

Check out Level 26 for the theory.

Solution

The solution from Level 26 is needed to get a shell for bandit26.

Once we got the shell, we can find a file called bandit27-do in bandit26’s home directory. The name suggests that is what we need to check out.

1
2
3
4
5
bandit26@bandit:~$ ls
bandit27-do  text.txt
bandit26@bandit:~$ ./bandit27-do 
Run a command as another user.
  Example: ./bandit27-do id

It just runs a command as another user, we have seen this Level 20. This way we can simply print the password file.

1
2
bandit26@bandit:~$ ./bandit27-do cat /etc/bandit\_pass/bandit27
3ba3118a22e93127a4ed485be72ef5ea

https://overthewire.org/wargames/bandit/bandit27.html


Next Level: Level 28


Share on: