Introduction
As we progress further in the Bandit Challenge, Level 14 ↗️ presents us with a unique scenario. Our objective is to obtain a private SSH key stored in a particular location, which will allow us to access the next level.
By utilizing our knowledge of secure connections, cryptographic tools, and SSH keys, we’ll retrieve the private key, configure our connection, and successfully log into the next level.
Challenge Overview
Level 14 challenges us to retrieve a private SSH key that can be used to log into the next level. The password for the next level is stored in a specific location and can only be read by user bandit14.
Our task is to access this location, retrieve the private key, and use it to establish a secure SSH connection to the next level.
Approach and Strategy
Follow these steps to successfully solve Level 14
Enter the password you obtained from the previous level.
Once logged in, retrieve the private SSH key by copying its contents using the cat
command
Create a directory under /tmp
to store the SSH key and move into it using cd
.
Create a file named id_rsa
and paste the contents of the private key into it. Choose your preferred text editor to create the file. Here I am using vi
.
Set the permissions of the id_rsa
file to 600
.
Log in to the next level using SSH and the private key.
The -i
flag specifies the identity (private key) to be used for authentication.
Once logged in, find the password for the next level by using the cat
command to read the contents of the /etc/bandit_pass/bandit14
file.
This will display the password for Level 14. Take note of it for the next level.
Conclusion
Congratulations on successfully completing Level 14 of the Bandit Challenge! By retrieving the private SSH key, configuring your local machine, and establishing a secure SSH connection, you have gained access to the next level. Our understanding of secure connections and cryptographic tools has expanded, enhancing our cybersecurity skills.
Stay tuned for the next blog post, where we’ll tackle Level 15 and face new challenges in our quest to become proficient cybersecurity practitioners.