DEV Community

Krishna
Krishna

Posted on

1

OverTheWire Bandit Level 4 Level 5 walk-through

Challenge page => https://overthewire.org/wargames/bandit/bandit5.html

This time, we try to read the password from the "only human-readable file in the inhere directory."

Read that part in the quotes twice. By now, you should be used to the fact that there is a subtle hint in here, and among the list of commands you may need

ls, cd, cat, file, du, find

Now, lets take a look at the contents of the directory to see what all the fuss is about, and try reading a file or two

Contents of inhere directory

Ha! That's why they mentioned "human-readable"! The files seem to contain binary data, which cannot be read by programs(cat etc) designed to read text files.

So, we can either go through all of them one by one to see which one has text, or we find an easier way to filter out the one file among the 10 that contains text


Hint 1: Try and figure out which of the "commands you may need" listed earlier can be used here to solve our problem. Try reading their man pages. :)


This one's quite obvious eh?

The file type comes in very handy in such situations. Let's go ahead and run it on the entire directory to figure out which file has the password.

Check file type and display password

Aaand there we have it. Onto the next challenge!

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay