Hacking

Test Lab V8: Mail and SSH System

Warlock
April 1, 2016 by
Warlock

 

Earn two pentesting certifications at once!

Earn two pentesting certifications at once!

Enroll in one boot camp to earn both your Certified Ethical Hacker (CEH) and CompTIA PenTest+ certifications — backed with an Exam Pass Guarantee.

Attacking the MAIL: As of now we have on email account access for Westfall account we logged into his account and gone through his inbox from where we found two other emails are active for sas-bank.

We have a list of the username of the password which we found from the terminal system after exploiting the system by Metasploit.

No, if we look carefully in the usernames there is a title which is matching with one of the emails which we found in Westfall's inbox, i.e., leroydeschamp@sas-bank.lab and we tried to log in with this account by using his terminal password, and we successfully logged in.


We just opened the inbox, and we found our mail token. One more interesting mail we found it looks like a hint for rooting another system we will look into this later.

Attacking the SSH: In our 2nd part of the article after rooting the Terminal system we found a ppk file from Westall's desktop and we generated an SSH private key now will use that ssh key for logging into the ssh system. Command usage: ssh -i <keypath> westfall@192.168.101.7

As can be seen above we got the permission denied error. After setting permission of 400, we again tried to log in, and we successfully logged in

Now we start browsing all directories for our token, and we found it under /home/davis directory

By using cat command, we read the token_ssh.txt file.

Now we will look for some interesting files which will help us to gain access to another system. In /home/davis directory there are two interesting files are there debugs folder and ssh.key file.

By using scp command, we will download both files in our local system for further analysis. First, we will download the ssh key file. Command usage scp -i <loginkeypath> westfall@192.168.101.7:../davis/ssh.key <pathforsaving>

Now we will download the debug folder. Command usage scp -i <loginkeypath> westfall@192.168.101.7:../davis/debugs <pathforsaving>

Become a Certified Ethical Hacker, guaranteed!

Become a Certified Ethical Hacker, guaranteed!

Get training from anywhere to earn your Certified Ethical Hacker (CEH) Certification — backed with an Exam Pass Guarantee.

We successfully downloaded both files on our desktop, and we will look into these files in our next part of the article.

Warlock
Warlock

Warlock works as a Information Security Professional. He has quite a few global certifications to his name such as CEH, CHFI, OSCP and ISO 27001 Lead Implementer. He has experience in penetration testing, social engineering, password cracking and malware obfuscation. He is also involved with various organizations to help them in strengthening the security of their applications and infrastructure.