OverTheWire Bandit Level 7 Walkthrough

Today we're doing a walkthrough of level 7 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/bandit8.html


This level is asking us to look for the Flag in the data.txt file, next to the word millionth.

Let's SSH into the game server to start the level.  Remember to use the Flag from the previous level as the SSH password.

ssh bandit7@bandit.labs.overthewire.org -p 2220


First, let's get our bearings and look for the data.txt file.

pwd
ls -a


The data.txt file is likely to be full of info, but we can combine two commands, the cat and grep commands, by using a pipe | .  First, the cat command will output the contents of the data.txt file, but the output will be modified by the grep command, which only outputs strings in the data.txt file which match the string we specify (which is millionth).  Since the Flag is located beside the word millionth, we should also receive the Flag.

cat data.txt | grep millionth


Summary

Bandit7 requires us to locate the Flag, which is located on the same line as another string, which is given to us.  Using the cat and grep commands, we are able to extract the Flag.

Finish


Comments

Popular posts from this blog

TryHackMe - Windows PrivEsc - Walkthrough

TryHackMe - Reversing Elf - Walkthrough

TryHackMe - XSS - Walkthrough