Exploring OverTheWire: Level 4 to Level 5 - Bandit Challenge

📆 · ⏳ 3 min read · · 👀

Introduction

As we progress in the Bandit Challenge, Level 5 ↗️ introduces us to the concept of human-readable files. Our objective is to locate and extract the password stored within the only file in the “inhere” directory that is readable by humans.

Challenge Overview:

💡

Level 5 challenges us to identify the sole human-readable file within the “inhere” directory. Our task is to distinguish this file from others that may not be readable by humans.

By utilizing commands like file, ls and cat we’ll navigate the file system, examine file contents, and retrieve the password.

Approach and Strategy

Follow these steps to successfully solve Level 5:

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 allows us to change our working directory.

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

Terminal window
ls -l

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

Among the listed files, we need to identify the only human-readable file. Human-readable files typically contain plain text that can be easily read by humans.

One approach to identifying the human-readable file is to use the file command. Run the following command:

Terminal window
file ./*

This will display the file types and information for all the files in the directory. The response would look something like this

Terminal window
./-file00: data
./-file01: data
./-file02: data
./-file03: data
./-file04: data
./-file05: data
./-file06: data
./-file07: ASCII text
./-file08: data
./-file09: Non-ISO extended-ASCII text, with no line terminators

Look for the file that has a type indicating it is human-readable, such as “ASCII text” or “UTF-8 Unicode text”. These types suggest that the file contains readable text.

From above response we see the file "./-file07" is of format “ASCII text”.

To view the contents of this file, use the cat command:

Terminal window
cat ./-file07

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

Note: If your terminal becomes distorted during the process, use the reset command to restore it to the default settings.

Notes

  • Human-readable files contain text that can be easily read by humans. We can use file ↗️ command to get details about the file.
  • If your terminal becomes distorted, use the “reset” command to restore it.

Conclusion

Congratulations on successfully completing Level 5 of the Bandit Challenge! By exploring the file system and identifying the human-readable file within the “inhere” directory, we obtained the password necessary to progress further.

Stay tuned for the next blog post, where we’ll embark on Level 6 and face new challenges in our quest to become cybersecurity experts.

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!