Post

Write-up / Cap Hackthebox.

Write-up exploiting an IDOR, finally we perform Capabilities exploitation privilege escalation.

Write-up / Cap Hackthebox.

Machine: hackthebox > Cap.

Discovery

Port scan.

We have to start scanning the target to find the open ports and services running. img-description

Three open ports 21,22,80.

img-description

Let’s acces the the http service. img-description

We have some functionalities in the web, let’s explore theme.
img-description

Exploitation.

Accesing to “Security Snapshots” We can download a .pcap file.

img-description

img-description

img-description

The file was empty, let’s go back to the web.

IDOR

Checking the url i noticed that we can try to download more data changing the number. img-description

IDOR Fuzzing.

Let’s create a .txt file containing a list of numbers.

img-description

After that we can use a tool (fuff in my case) to brute force this paramether.

img-description

ffuf show all the results, let’s filter them to have a cleaner output.

img-description

Great! We have more files to download.

The file 0 had some data. After searching for something interesting I saw a password.

img-description

img-description

img-description

PASSWORD: Buck3tH4TF0RM3!

The target machine had two interesting services runing where we can try the password. I tried the ssh service first and the connection was succesful.

Post Exploitation.

img-description

I executed a linpeas scan to find how to elevate my privileges and I saw that we have some capabilities to exploit in python3.8 bin.

img-description img-description

To exploit capabilities we can referr to gtfobins and follow the instructions img-description img-description img-description img-description

We finally obtained the root flag!

This post is licensed under CC BY 4.0 by the author.