Exploring OverTheWire: Level 1 to Level 2 - Bandit Challenge

📆 · ⏳ 2 min read · · 👀

Introduction

As we advance in the Bandit Challenge, Level 2 ↗️ presents us with a peculiar file name. Our objective is to locate and extract the password stored in a file with a dashed filename within the home directory.

Challenge Overview

💡

Level 2 introduces us to a file with a special name containing a hyphen "-". Our task is to identify and access this file, which holds the password for the next level.

We’ll leverage commands such as “ls,” “cd,” and “cat” to navigate the file system, examine the contents of the file, and uncover the password.

Approach and Strategy

Log in to Level 1 using SSH with the following command:

Terminal window
ssh [email protected] -p 2220

Enter the password you obtained from the previous level.

After logging in, execute the following command to view the files in the home directory:

Terminal window
ls -a

This command reveals hidden files, denoted by filenames beginning with a dot.

Among the files, you will find the one with the dashed filename. To view its contents, use the cat command:

Terminal window
cat ./-

The "./-" specifies the file with the dashed filename.

The password for Level 2 will be displayed in the output. Make a note of it for the next level.

Lessons Learned

Level 2 enhanced our file navigation skills and introduced us to special characters in filenames. We learned to use the “ls” command with options to reveal hidden files and successfully accessed a file with a dashed filename.

These skills are valuable in real-world scenarios where file naming conventions might deviate from the norm.

Notes

  • When encountering special characters in filenames, use "./" before the filename to ensure proper interpretation.

Conclusion

Congratulations on completing Level 2 of the Bandit Challenge! We skillfully maneuvered through a file system containing a file with a unique dashed filename.

By using essential commands and understanding the impact of special characters, we successfully extracted the password. We’re one step closer to mastering cybersecurity!

Stay tuned for the next blog post, where we’ll explore Level 3 and face new challenges in our quest for cybersecurity expertise.

You may also like

  • # overthewire

    Exploring OverTheWire: Level 15 to Level 16 - Bandit Challenge

    Welcome back to our captivating journey through the Bandit Challenge! In this blog post, we're poised to conquer Level 16, where the path to victory lies in submitting the current level's password to a specific port on localhost using SSL encryption. Join me as we navigate through secure socket layers, SSL encryption, and gain access to the coveted password. Let's dive in!

  • # overthewire

    Exploring OverTheWire: Level 14 to Level 15 - Bandit Challenge

    Welcome back to our enthralling voyage through the Bandit Challenge! In this blog post, we're set to conquer Level 15, where the key to success lies in submitting the current level's password to a specific port on localhost. Join me as we delve into port communication, networking concepts, and gain access to the coveted password. Let's dive in!

  • # overthewire

    Exploring OverTheWire: Level 13 to Level 14 - Bandit Challenge

    Welcome back to our adventurous journey through the Bandit Challenge! In this blog post, we'll conquer Level 14, where we'll obtain a private SSH key that grants us access to the next level. Join me as we navigate through secure connections, employ cryptographic tools, and use the obtained key to log into the next level. Let's dive in!