santacloud - intigriti

At the very beginning, when you land on the main page, you’ll notice a few important notes:
Should leverage a vulnerability on the challenge page.
Shouldn't be self-XSS or related to MiTM attacks.
Should require no user interaction.
This basically means the goal is not XSS. The goal is to compromise the application without any user interaction.
So any bug that requires user interaction is either rejected or considered out of scope for this challenge.
Alright, let’s open the first page.
We’re greeted with a login page.
So what’s the first thing that comes to mind?

SQL Injection, right?
Yeah, that was my first thought too — and I actually tried it.
I attempted payloads like these in the username field:
But all attempts failed. Nothing worked which means there’s no SQL injection here, at least not in this part of the app.
We’re greeted with a login page.
So what’s the first thing that comes to mind?
SQL Injection, right?
Yeah, that was my first thought too and I actually tried it.
I attempted payloads like these in the username field:
But all attempts failed. Nothing worked . which means there’s no SQL injection here, at least not in this part of the app
Analyzing the JavaScript Code
Let’s take a look at the JS logic:
What’s happening here?
A POST request is sent to
/api/loginCredentials are sent as JSON
{ username, password }The response is awaited and parsed
If the response is successful and returns a token:
The token and user data are stored in localStorage
The token is also saved as a cookie
The user is redirected to
/dashboard
So at this point, we need one of two things:
Either get the token
Or find a valid username & password
The Hint That Changed Everything
While browsing X (Twitter), I found a very strong hint:
"Bug bounty hunters who spend time in reconnaissance are always rewarded well for their efforts..."

This hint was huge.
So I started digging deeper:
Source code
JavaScript files
Anything exposed
Nothing worked.
Then it hit me , keep it simple.
robots.txt

And yep… that was the first real step to the solution.
The file contained:
Most of these returned 404 Not Found.
Except one.
But!!!! ⇒ composer.json~
And this was its content:
What we care about here is obvious:

What Now?
In bug bounty / pentesting, the rule is simple:
Try everything and collect as much information as possible.
Let’s enumerate available directories:
Now let’s watch the API traffic using Burp and list endpoints:
First API: /api/gifts
/api/giftsIt returned data like:
gift_descriptionidstatus
But no flag here.
Nothing useful.
Second API: /api/notes
/api/notesThis one was interesting.

1 - Create New Note
Request body:
Response:
We now know:
user_idnote_id
2 - Delete Note
Response:
Works as expected.
3 - Edit / View Note
Response:
And here’s where it clicked.
This smells like IDOR.
But!!! What is IDOR ??
What is IDOR?
IDOR (Insecure Direct Object Reference) happens when a user can access another user’s data just by changing an ID in the request.
Example:
If changing the ID returns someone else’s data → IDOR vulnerability.
Why does it happen?
No ownership check on the backend
The server trusts user-supplied IDs
How to fix it (PHP example):
More reading:
Exploitation Phase
Instead of accessing our own note, let’s try:
Response:
Boom , Another user’s private note.
Now we brute-force IDs until we hit gold.
And finally:
Response:
Thanks Intigriti for this awesome challenge ❤️
Last updated