OverTheWire Bandit Level 4 Walkthrough
Today we're doing a walkthrough of level 4 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/bandit5.html
Looks like the Flag for the level is located in a "human readable" file located in the inhere directory. Let's login to the game server using SSH:
ssh bandit4@bandit.labs.overthewire.org -p 2220
We use the Flag from the last level as the SSH password for this level. After we're logged in, we look for the inhere directory, change directories and cat out the inhere directory's contents:
pwd
ls -a
cd inhere
ls -a
Looks like there are ten files here. To find out whether a file is "human readable" or not, we can use the file command on each one. The file command tells use what type of file the specified file is. We also prepend the filepath with ./ because the filenames begin with a special character:
file ./-file09
file ./-file08
file ./-file07
So we find that the -file07 file type is ASCII text, meaning it is human readable. Let's cat it out to finish the level:
cat ./-file07
Summary
Bandit4 requires us to sift through a number of files and identify the sole ASCII text file which contains the level's flag.
Finish
Comments
Post a Comment