Hack The Box : Expressway

Hi guys.

Today I will do a simple writeup on the Hack The Box machine which is now retired named 'Expressway'. It is an Easy difficulty machine. I did this box during active period and since it is retired, I decided to put it here.

1) First step is to always nmap the box to search for open ports. the usual command that I use is nmap -sS -sV -sC -o <name of file>.txt <ip>


Initial scan shows nothing. In this case, it is always good to check UDP ports as well.

2) Scanning for UDP ports


Now we see some open port. From a quick Google search, it is found that port 500 is for IPSec.

"IPsec is widely recognized as the principal technology for securing communications between networks (LAN-to-LAN) and from remote users to the network gateway (remote access), serving as the backbone for enterprise VPN solutions."

Upon further research, I stumbled upon a useful blog on how to exploit IPSec.


The blog explain about basic info on IPSec and how to approach it.

3) Using ike-scan to get PSK.


Now I got the PSK. Time to crack it.

4) Cracking PSK.


5) Using the cracked PSK as SSH credential. We already know the user ike@expressway.htb from ike-scan. We can use the cracked credential and user found for SSH login.


Now we managed to login as ike. 

6) Running sudo -l to check for priv but nothing. Checking sudo version for potential exploit on version.



Found the current version of sudo is vulnerable.

7) Set the necessary permission and run it. BOOM you are now root.  



As per the description on the box, it is an Easy box. Much easier than my previous writeup for Dog. Straightforward and easy to understand on what are the exploit and how to exploit it. That's it for today. Peace.











Comments

Popular posts from this blog

Petraware pTransformer ADC before 2.1.7.22827 allows SQL Injection via the User ID parameter to the login form.

Setting up MobSF in Ubuntu 18.04

Cert-Fixer : Simplify your CA certificates installation