Over The Wire Level 5 – 6

The clue is

The password for the next level is stored in a file somewhere under the inhere directory and has all of the following properties:

  • human-readable
  • 1033 bytes in size
  • not executable

Use the previous password to login with username ‘bandit5’. Get in to inhere directory, and show the content with ls -l command.

We will try with some command to find the file matched with the clue. With ‘file’ and ‘grep’ command, we can see which file is human readable, means file type is ASCII.

There is too many file are readable. We will try with another command, and with ‘find’ command, we can specific with the clue. Use ‘ file –help’ to see the complete parameter we can used.

From the help of ‘find’ command, we can used ‘find’ command with ” -size ” parameter and actions ” -exec ” to combine with ‘file’ command.

find -size 1033c -exec file {} + | grep ASCII

From the previous level, we now that bytes will be define as c on linux command, so we include this bytes on ‘ -size ‘ parameters, also with ‘-exec’ we can include file command and ‘grep’ to find the file.

Now we can open the file with ‘cat’ command. Use this password for SSH to the next level.

Leave a comment

Blog at WordPress.com.

Up ↑

Design a site like this with WordPress.com
Get started