Sitemap

HTB OnlyHacks Walkthrough

3 min readOct 28, 2026

--

The box “OnlyHacks” is a web based box having a Insecure Direct Object Reference (IDOR) vulnerability. It is rated Very Easy on HTB

Press enter or click to view image in full size
Press enter or click to view image in full size

I started up the target and connected to the HTB VPN. I then, opened up a new tab and pasted in the provided URI.

Press enter or click to view image in full size

A web application opened up with a login page along with a signup prompt. I checked the source for any commented-out credentials or any secrets at all — did not find any, so moved to the /register endpoint.

Press enter or click to view image in full size

In the register page we are asked for a lot of info like username, password, profile picture, email, age, bio and our preference.

Press enter or click to view image in full size

I filled up the profile with expected data to analyze the application behaviour first.

Press enter or click to view image in full size

After registering a new account, cards of different profiles show up.

Press enter or click to view image in full size

Upon source code inspection, it turns out to be static cards instead of dynamically generated. I then, tried for common endpoints like sitemap.xml, robots.txt, security.txt — no luck.

Press enter or click to view image in full size

So I decided to run a fuzzer to check if any common endpoints are available. The results did not reveal any unknown endpoints. I decided to change my approach and analyze the application behaviour further.

Press enter or click to view image in full size

After liking all the profiles, a match appears in /chat endpoint. On opening the chat, I saw a parameter “rid=6”

The rid is being used to open particular chats.

I tried with a few other rid values, since it was a integer and likely incremental and

Press enter or click to view image in full size

for the rid value of 3, found out the flag.

Press enter or click to view image in full size

Submitted the flag and pwned the room successfully.

Get Amrik Hore’s stories in your inbox

Join Medium for free to get updates from this writer.

The primary vulnerability here was that the application was not checking whether the user has proper authorization to view a particular rid/chat.

To prevent this, we have to implement proper access controls and authorization checks at the backend. We should also preferrably use UUID/GUID identifiers for reference chats instead of incremental integer UID which can be easily guessed or predicted.

--

--

Amrik Hore
Amrik Hore

Written by Amrik Hore

0 followers

fascinated with technology