VulnNet: Node
VulnNet Entertainment has moved its infrastructure and now they're confident that no breach will happen again. You're tasked to prove otherwise and penetrate their network.
Last updated
VulnNet Entertainment has moved its infrastructure and now they're confident that no breach will happen again. You're tasked to prove otherwise and penetrate their network.
Last updated
First of all, I scan the machine for open ports. I used rustscan
to do that because it is faster than nmap and I can choose same options.
I've discovered that only port 8080 is open, indicating an HTTP service likely running on the Node.js framework in the background. Let's explore the website to uncover its contents. Typically, my initial step involves running a Nikto command, as it provides comprehensive insights but may take some time. In this time, I manually scan the website for default pages like robots.txt or sitemap.xml, aiming to find potentially interesting information such as user data, email addresses, or domain details.
After this, I proceeded with fuzzing; however, even after changing the wordlist, I did not find any results.
In login page I tried some SQLinjection, but without results. At this step I was stuck, but after minutes I remember that I forget to check the cookie. It was in base64 encoding.
So this cookie seems to be exploitable. After I google it I found a few interesting blogs who explains very well how it works.
I used the script found in the blog above and customize it to get a reverse shell.
Initially, I conducted user enumeration to determine available permissions. It was revealed that I had the capability to execute npm commands as another user. Consulting GTFobins, I sought methods to gain access as the "serve-manage" user.
The user.txt flag can be found in home directory of serve-manage user. Now let's get root privilege.
I found that I can run system service as root, but before that needs to change the content of the vulnnet-auto.timer
and vulnnet-job.service
file.
vulnnet-auto.timer
vulnnet-job.timer
execute commands