Test Lab V8: Mail and SSH System
FREE role-guided training plans
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., email@example.com 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> firstname.lastname@example.org
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> email@example.com:../davis/ssh.key <pathforsaving>
Now we will download the debug folder. Command usage scp -i <loginkeypath> firstname.lastname@example.org:../davis/debugs <pathforsaving>
What should you learn next?
We successfully downloaded both files on our desktop, and we will look into these files in our next part of the article.