OverTheWire – Bandit Level 2 Solution

I figured it may be fun to go through all of the OverTheWire Bandit Wargames, which are aimed at absolute beginners who want to start learning about security principles.

My aim will be to provide a very simple explanation of how each game is played, which will hopefully expand my own knowledge and help a few of you at the same time.

All posts in this serial have been tagged #OverTheWire.


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

Helpful Reading Material

Solutions

Similar to levels 0 & 1, this level is very much about learning the basic concepts of how to use commands in a variety of ways.

  1. List all of the files in the home directory by typing “ls”
  2. We can see a single file called “spaces in this filename”.
  3. To use this name in a command requires us to wrap the name with quotation marks, otherwise it will process each word as a seperate parameter.
  4. Type ‘cat “spaces in this filename” ‘ including the quotation marks.
  5. All going well you should receive the output “UmHadQclWmgdLOKQ3YNgjWxGoRMb5luK” which is the password for the next level.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.