OverTheWire Bandit Level 13 Walkthrough
Today we're doing a walkthrough of level 13 of the Bandit CTF wargame hosted at OverTheWire.org. First, let's take a look at the level's objectives:
https://overthewire.org/wargames/bandit/bandit14.html
The Flag for this level is located in the /etc/bandit_pass/bandit14 file, which can only be read by user bandit14.
Next, let's login to the game server using SSH. Remember to use the Flag from the previous level as the SSH password.
ssh bandit13@bandit.labs.ovethewire.org -p 2220
Let's take a look at what's in our home directory:
pwd
ls -a
The sshkey.private file looks promising. Let's check the file permissions by using ls with the -la switch.
ls -la
Since we are user bandit13, and the sshkey.private file is owned by the bandit13 group, we can use this file to SSH into the localhost (the Bandit game server) as the bandit14 user by using SSH with the -i switch.
ssh -i sshkey.private bandit14@localhost
yes
Now let's check what user we're working as by using the whoami command
whoami
Since we're logged in as the bandit14 user, we can now cat out the file containing the level Flag, as indicated by the level objectives:
cat /etc/bandit_pass/bandit14
Summary
Bandit13 requires us to use an SSH private key in order to SSH into the localhost as the user with the proper access to the Flag file which contains the Flag string.
Finish
Comments
Post a Comment