API Information Disclosure

API Information Disclosure

Hello All,

In this post I will provide you an overview about how to exploit Broken Object Level Authorization vulnerability.

Definition: Attackers substitute the ID of their own resource in the API call with an ID of a resource belonging to another user. The lack of proper authorization checks allows attackers to access the specified resource. This attack is also known as IDOR (Insecure Direct Object Reference).

OR

APIs tend to expose endpoints that handle object identifiers, creating a wide attack surface Level Access Control issue. Object level authorization checks should be considered in every function that accesses a data source using an input from the user.

Lets say our vulnerable website is target[.]com

Steps I did to takeover all the accounts on the test platform. Since I was already registered user on the target website. I did functionality check of the reset password feature.


Reset Password Function

I added my email id and user id and intercepted the request.

Request

Then I’ve sent this request to repeater. And I was able to see the whole JSON response that was leaking the details along with the password. I’ve used the leaked password token to gain access to dashboard.


Response
Since most of the time update section of the user details are vulnerable. I checked for the broken object access control bug on update profile section. I intercepted the request and was able to see whole data in response in JSON format.

Note:  Broken Object Level Authorization happens when an application does not correctly confirm that the user performing the request has the required privileges to access a resource of another user. Almost every company has APIs that are vulnerable to BOLA


Edit Profile

To confirm the BOLA , I sent this request to intruder and changed the last two bit of hexadecimal string. I’ve entered the payload from
'00' to 'ff' and started the attack.


Intruder Request
Intruder Settings


Bruteforce attack

Intruder Response

By this way, I got accessed to all their data.

Feel free to provide me the feedback. Thanks for reading and I hope you enjoyed it.


Reference:

https://shubham-s-pandey.blogspot.com/2020/08/introduction-to-idor.html

https://owasp.org/www-project-api-security/



Comments

Popular posts from this blog

My OSCP Journey - A Review

Introduction to IDOR