Hello, welcome back if you are reading along, here is the next walkthrough.
Level Goal
The password for the next level is stored in a file called spaces in this filename located in the home directory
Commands you may need to solve this level
ls, cd, cat, file, du, find
As usual, I will run the command ls so that I can see what directories and files there are in my location and I can see a file with the names spaces in this filename.
In Linux/UNIX we can’t read the file with spaces properly as it assumes the first word is the file name and not the whole thing.
I already knew of one way to do this but found a second I was unaware of so will share both.
To start with I used my trusted ls to see what was there:-
The way I already knew was to put the file name inside of single quotation marks like so:-
Cat ‘spaces in this file name’
And got the flag.
Now the second way I discovered was because I tabbed the file when typing spaces (probably out of habit) and got the following:-
So it seems you can use a backslash with space after it to continue the file name which I had no clue about.
From there we exit bandit 1 and connect to bandit2 using the flag as the password and head to the next level.
See you next time for Bandit Level 3 > 4 Walkthrough
Bandit 2 to 3 = https://overthewire.org/wargames/bandit/bandit3.html
1 thought on “CTF: Bandit Level 2 > 3 Walkthrough”