OverTheWire.org Walkthrough: Bandit

~ Level 15→16 ~

Level Description

The password for the next level can be retrieved by submitting the password of the current level to port 30001 on localhost using SSL encryption.

Commands that we may need to solve this level include: ssh, telnet, nc, openssl, s_client, and nmap.

More reading material is given for this level. The two links give information about SSL/TLS and the command of openssl.


Research Before Solving

Due to being given information about openssl, we will assume this is the command that's used to solve this level. The second link provided tells us how to connect to a server. We must use the following syntax:

openssl s_client -connect hostname:port

The next paragraph then tells us that we will be prompted for an input once passing the aforementioned command. This level appears to be the same as the previous one, though we are using a different method to connect to the host.


Solution Walkthrough

Log in as user bandit15 and paste the corresponding password when prompted. Since we already know the command and it's syntax. We will go ahead and immediately try it. Using the given syntax and host information, our command should be: openssl s_client -connect localhost:30001

output from openssl command

A lot of information was printed to the screen. Parsing through it provides details of the connection that we just opened. At the very bottom is a flashing cursor similar to the previous level. We will now paste in the password for bandit15 and see if we get a response.

response from server showing bandit16 password

You should find that the server responded with the password to bandit16!

cluFn7wTiGryunymYOu4RcffSxQluehd

You are ready to proceed to the next level.