Tryhackme — Internal (Linux) (Blackbox)
We begin the scanning with AutoRecon tool
Nmap Result
As we can see, there are not many port are open. Port 22 SSH is likely not exploitable with credential so we will begin with HTTP port 80.
Initial Access
Based on our Nikto scan we found the Wordpress login
Then we attempt to do WPscan and the username admin is found.
Next, we attempt to bruteforce the password with the username admin we found previously.
And is SUCCESS, so now we are into the Wordpress. We will inject php code in 404.php here
And we got a shell!
Privilege Escalation
During our enumeration we found some user and able to SSH into it with below credentials
Then we found there is another port 8080 open that is running Jenkins
Then we proceed to do port forwarding so that we are able to access the Jenkins locally.
At first, we try a few credentials that we have previously but none of it success to login.
Then we attempt to bruteforce again using hydra with the username admin
Now we are into Jenkins we can do code execution easily to get a shell.
During our enumeration, we found a password again at /opt/ but this time the user is root
And now it is rooted