Bandit Level 1
Bandit Level 1 — find and read a file named readme in your home directory using ls and cat.
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
Level Goal
The password for the next level is stored in a file called readme located in the home directory. Use this password to log into bandit1 using SSH. Whenever you find a password for a level, use SSH (on port 2220) to log into that level and continue the game.
Commands you may need to solve this level
ls , cd , cat , file , du , find
TIP: Create a file for notes and passwords on your local machine!
Passwords for levels are not saved automatically. If you do not save them yourself, you will need to start over from bandit0.
Passwords also occasionally change. It is recommended to take notes on how to solve each challenge. As levels get more challenging, detailed notes are useful to return to where you left off, reference for later problems, or help others after you’ve completed the challenge.
Study guide
Level map: logged in as bandit0, find the password for bandit1.
What this level teaches
Orientation in a Unix filesystem and your first real data-gathering commands. A password is waiting in an ordinary file; the skill is knowing where you are and how to look inside a file.
Key ideas
- Home directory — the folder you land in after logging in, shorthand
~.pwdprints the current directory. lslists a directory’s contents. Options such as-l(long format) and-a(include hidden entries) change what you see.catprints a file’s contents to the terminal.- Everything is a file — on Unix, configuration, devices and passwords are all just files with permissions.
How to approach it
- Look around before acting:
pwd, thenls. - Print the file that the Level Goal names.
- Copy the result into your notes file. The password is plain text, and the next level’s login (
ssh bandit1@...) needs it.
Why it matters
“Where am I, what is here, what does it say?” is the loop you will run thousands of times, on every system you ever investigate.