You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DESCRIPTION - this is a easy tryhackme room called basicpentest, it help us enuemerate the website to find hidden directories and help us crack hashes, and privilege escalate to another user after getting a foothold.
- Reconnaissance, we start with an nmap scan to see what services the machine is running
Using gobuster we are able to find a directory called development
i also tried enuemerating the smb using the command
smbclient -L //target-ip/ -N
which gave us Anonymous
which from there i connected to the smb and found a file called "staff.txt", which i downloaded to my main machine and view it and we have 2 usernames one is Kay other is Jan
then brute forcing ssh came to my mind, i tried with the username kay, but it did not work, then i tried with jay and it worked and found an ssh password
after looking i found that .ssh directory is open and we can view it and we find kay ssh id_rsa private key
on my target machine we can see that this private key is passphrase protected, so we need to find the password for it, using the command
ssh2john id_rsa > id_rsa.hash
john --wordlist=path/to/rockyou.txt id_rsa.hash
we find the password, then we login to the ssh as kay dont forget to chmod +x id_rsa
then we find the password sitting in the file pass.bak