hello hacker, just wanted to share with you this easy retired machine from hack the box. I was just bored and decided to do something that won't consume my enegy, actually it was easy but i like it, learned something new because always HTB is cool with exploits, i like the struggle with HTB.
N/B: To access the machine you must be a VIP member.
lets start hacking our baby paper retire machine. fire up the instance
So far we can see that we have three open ports,But i was not sustified with this port only so i decided also to scan further but didn't find any usufull ports
With enumeration here i started enumerating one port after another, so that i can get the full structural of how things are supposed to be while approaching this target.
with port 22, nothing of interest for now because we don't have any creds to login with, but also tried to check for vulnerable version of this just ended up with DoS.
with port 80 also we find nothing of interest.
with port 443 we need first a domain name, because if we try to access it by just adding the 'https' it displays with the same as port 80
N/B: So far I didn't get anything even the nmap scanning was proving more info.
We see that we have a '/manual' directory, but wasn't usufull for me. so i decided to move on.
After a while strugle finding more info about my target i just found myself onto burp-suite LOL. i spend like 40 minutes trying to find a initial footholding
If you take a close look with burp suite request and response you will find that there is some juice info there dispite it is responding (client error or 403).
Now from here, lets add this into our host(/etc/hosts) file.After doing that I tried to access the with both https and http but the one with more info is 'http://office.paper'
Decided to give a visite now and play around and see what i can get from here
At this stage i decided to do three things at one time, while am studying the site i will let them run at the background.
N/B: To identify this target technolgies being used here i normally use wappalyzer tool on my browser it is easy to tell me which technlogies are being used
Lets go with command line tool.
Now we can see that we have something like wordpress and its version, so I decide to google the CVE of this wordpress version
After some such i found this CVE
The idea behind this CVE is Viewing Unauthenticated/Password/Private Posts
And I found this interesting info by just adding this payload.
Now i saw that there is a convo abt secret registration url for employees
After visiting the site we find a registration form, you can try to register also and login as well
After some google-fu about rocket.chart I found that I can interact with a bot(recyclops).
Here we can see that this bot is used to interact with some
After checking the help menu, found this interesting
After checking i decided to look for something like id_rsa but wasn't present.
My next phase was try to access the /etc/passwd and know the number of users here i have.
Now since I knew that id_rsa wasn't present my next step i was finding the password for user 'dwight'
after some deep checking here and there, i found this files being linked together
To understabd abt how to reach here is that there is a start_bot.sh try to follow that path and you will endup with the .env file with the password.
With privilege escalation 'sudo -l' is not usesfully here, uploading linpeas and executing it give us some interesting things such as sudo version.
After some google-fu i found this CVE CVE abt how to exploit this sudo version and its exploit can be found github which is a simple to use.
The idea behind this CVE is the polkit priv escalation.
After transfering the payload to the target i decided to edit alittle bit this exploit because i knew what it was doing so far.( if u dodn't understand you can just change the username and password but it is better to understand it first).
There you can find all the flags, user(user.txt) and root.txt
Hope you enjoyed it was very easy