HTB-Vaccine

vaccine htb machine

image.png

Nmap Enumeration

port 21 , 22 and 80 (http) open so as you can see deeply through this enum result , ftp login is anonymous allowed

just done , i reached the ftp for anonymous login and got acess ;)

2> cracking the zip

as we got the backup.zip i got a prompt for password and then i thought to go for the john the ripper ;) bro code!!

i got the pass i.e 741852963

after this i doned cat index.php

and we got some intresting info there !!

i.e username = admin and pass is md5 hash 2cb42f8734ea607eefed3b70af13bbd3

to crack md5 i used crackstation

i got password qwerty789

and got redirected to dashboard.php and after that there was a search bar

and i tried to just put some payload like search=hi’SLEEP(5)

this was just a lzy try here !!

idk but i saw this and gone to the sqlmap and it was sucessfull !!

so this is what i had done to get to dump the available databases and trust me here the reall game begains for me !!

i went into the public but got nothign but cars so i was like what can i do here , then i thought of seraching the email adress or lik eusername and password in the databases !!

this was my cmd and i got intresting things !! like rol_user and password

this was pretty intresting for me but i got nothing like idont have a username atleast !!

so there is a usernmae we can say or something that we can do innto this i got this info by

sqlmap -r req.txt --current-user

i checked using this cmd and i got postgres as the current user then i rushed for the steps we have to do if we get the data dump or like acess into sql databases

i started with

    • os-shell , before that we have to capture the req in burp and copy the req and paste it in new file called req.txt or any you want !!

at first i got nothing but error due to phpsession id , then i again cpied it correctly and boom i got shell ;)

see above as i got shell i done ls and tried to think as much as i can , after a eternity i got some intresting thought to put a revershe shell i startied putting

and started a listner on nc -lvnp 4444

from here you just have to put the command to find the user.txt , adn you will get it on

/var/lib/postgresql/user.txt

3> privilage esclation

for priv esc i tried to get password txt find by many commands and i got by grep command , but you have to be into the particular directory like i moved to /var/www/html

we got dbname=carsdb user=postgres password=P@s5w0rd!”

instantly i gone for ssh login and i got loggedin

the first thing i done is sudo -l and i got something intresting like i can only use vim , as the path you can see

so this was the stuff i was trying to do , like setting upp reverse shell thorugh making a tmp/shell.sh

see i kept it simple as i can

i opened it and then i pressed ESC and typed

:set shell=/bin/sh

after this you will be stilll on the vim ad just type the following , so this was according to the gtfobins :shell

type :shell and you will get the root shell !!!!

see this was the hard work behind this root so like i tried even harder and harder !!!

happy hacking !!

connect with me here ;) https://linktr.ee/thorfinxvinlandarrow-up-right

Last updated

Was this helpful?