As we progress in the Bandit Challenge, Level 1 ↗️ presents us with our first file-related task. Our objective is to locate and retrieve the password stored in the
"readme" file, which is located in the home directory.
To access Level 1, we will utilize SSH (on port 2220) and log in using the password we discover.
We need to locate the
"readme" file within the home directory and extract
the password contained within.
Once we have the password, we will use SSH to log in to Level 1 and proceed to the next challenge.
To tackle this challenge, we will employ a series of commands to navigate the directory structure, locate the “readme” file, and extract its contents. Follow these steps:
Log in to the game server using SSH which we learned in Level 0
Enter the password
bandit0 when prompted.
Once logged in, we find ourselves in the home directory. To confirm this, execute the command:
This command provides a detailed listing that includes the file permissions and ownership.
In the list, you will see the
"readme" file. To view its contents, use the command:
cat command displays the contents of the file on the terminal.
The password for Level 1 will be displayed in the output. Take note of it for the next level.
Level 1 familiarized us with essential file manipulation commands such as
cd. We learned how to navigate directories, view file contents, and extract information.
These skills are fundamental for effective file management and analysis in cybersecurity.
lscommand is useful for listing files and directories in the current directory.
- Utilize the
ls -lcommand to view detailed information about files, including permissions and ownership.
catcommand allows you to view the contents of a file.
- Take note of passwords and important information displayed in the output for future use.
Congratulations on completing Level 1 of the Bandit Challenge! We successfully navigated the home directory, located the “readme” file, and extracted the password. By utilizing essential file manipulation commands, we gained valuable skills for future challenges.
Stay tuned for the next blog post, where we will take on Level 2 and encounter new obstacles in our quest for cybersecurity expertise.