Exploring OverTheWire: Level 5 to Level 6 - Bandit Challenge

📆 · ⏳ 2 min read · · 👀

Introduction

As we continue our adventure in the Bandit Challenge, Level 6 ↗️ presents us with a new challenge. Our mission is to locate a file within the “inhere” directory that fulfills certain criteria: it must be human-readable, have a size of 1033 bytes, and not be executable.

Challenge Overview

Level 6 challenges us to search for a specific file within the “inhere” directory.

💡

The file we seek must possess the following properties: human-readable, 1033 bytes in size, and not executable.

By using commands such as “ls,” “cd,” “cat,” and “file,” we’ll navigate the file system, examine file attributes, and successfully obtain the password.

Approach and Strategy

Follow these steps to successfully solve Level 6:

Terminal window
ssh [email protected] -p 2220

Enter the password you obtained from the previous level.

Once logged in, navigate to the “inhere” directory using the cd command:

Terminal window
cd inhere

This command will change your working directory to the “inhere” directory.

List the files and directories within the “inhere” directory using the ls command:

Terminal window
ls

This will provide a list of files and directories within the current directory.

To locate the file that meets the given criteria, use the find command along with specific parameters:

Terminal window
find . -type f -readable -size 1033c ! -executable

This command will search for files within the current directory and its subdirectories that are human-readable, have a size of 1033 bytes, and are not executable.

The find command will display the path to the file that meets the given criteria. Make a note of the path.

To view the contents of the file and retrieve the password, use the cat command:

Terminal window
cat <path_to_file>

Replace <path_to_file> with the actual path obtained from the previous step which was ./maybehere07/.file2

The password for Level 6 will be displayed in the output. Take note of it for the next level.

Notes

  • The find ↗️ command is useful for searching files based on specific criteria.

Conclusion

Congratulations on successfully completing Level 6 of the Bandit Challenge! By exploring the “inhere” directory and locating the file that meets the given properties, we have obtained the password necessary to progress further.

Stay tuned for the next blog post, where we’ll tackle Level 7 and face new challenges in our quest to become proficient cybersecurity practitioners.

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!