Exploring OverTheWire: Level 3 to Level 4 - Bandit Challenge

📆 · ⏳ 2 min read · ·

Introduction

As we continue our journey in the Bandit Challenge, Level 4 ↗️ presents us with a new twist: hidden files. Our mission is to discover and extract the password stored within a hidden file, located in the “inhere” directory.

Challenge Overview

Level 4 introduces the concept of hidden files and the importance of locating and accessing them.

đź’ˇ

We need to explore the “inhere” directory and identify the hidden file that contains the password for the next level.

By utilizing commands like ls, cd, and cat we’ll successfully reveal the hidden file and retrieve the password.

Approach and Strategy

Follow these steps to successfully solve Level 4:

Terminal window
ssh [email protected] -p 2220

Enter the password you obtained from the previous level.

Once logged in, execute the following command to navigate to the “inhere” directory:

Terminal window
cd inhere

The cd command allows us to change our working directory.

Next, list the files and directories in the current directory using the “ls” command:

Terminal window
ls -a

This will display the contents of the “inhere” directory. The -a flag will let us display all files (even hidden ones).

Locate the hidden file within here. Hidden files are denoted by filenames that begin with a dot (e.g., “.hidden”).

To reveal the contents of the hidden file, use the cat command:

Terminal window
cat .hidden

Note: The dot before the filename indicates that it is a hidden file.

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

Notes

  • Hidden files are denoted by filenames that begin with a dot (e.g., “.hidden”).
  • Use the ls command with the -a option to display hidden files.

Conclusion

Congratulations on successfully completing Level 4 of the Bandit Challenge! By navigating the file system and locating the hidden file within the “inhere” directory, we successfully extracted the password.

Stay tuned for the next blog post, where we’ll venture into Level 5 and encounter new challenges on our path to becoming cybersecurity experts.

You may also like

  • Exploring OverTheWire: Level 20 to Level 21 - Bandit Challenge

    Welcome back to our captivating journey through the Bandit Challenge! In this blog post, we're geared up to conquer Level 21, where a setuid binary introduces a novel challenge involving network connections. Join me as we delve into the mechanics of connecting to localhost, reading text, and successfully obtaining the password to proceed. Let's dive in!

  • Exploring OverTheWire: Level 19 to Level 20 - Bandit Challenge

    Welcome back to our thrilling journey through the Bandit Challenge! In this blog post, we're poised to conquer Level 20, where we encounter a setuid binary that holds the key to our progress. Join me as we explore the concept of setuid binaries, learn how to execute them, and successfully uncover the password to continue our journey. Let's dive in!

  • Exploring OverTheWire: Level 18 to Level 19 - Bandit Challenge

    Welcome back to our riveting journey through the Bandit Challenge! In this blog post, we're set to conquer Level 19, where a password is concealed within a file. However, a clever twist awaits us—someone has tampered with the system to log us out during SSH login. Join me as we navigate through this challenge using commands like ssh, ls, and cat, all while devising strategies to overcome the unexpected hurdle. Let's dive in!