🕯️IDOR TO Account Takeover






-------------------------------------------------------------
IDOR How to find
Find the endpoint within the request.
Change the ID to another account you own - don't test on an account you don't own.
if it works it's an IDOR.
Find endpoints that require admin permissions.
Login to an account to the admin endpoints, changing the cookie.
if it works it's an IDOR.
-------------------------------------------------------------
درخواست کے اندر اختتامی نقطہ تلاش کریں۔
ID کو اپنے کسی دوسرے اکاؤنٹ میں تبدیل کریں - ایسے اکاؤنٹ پر ٹیسٹ نہ کریں جس کے آپ مالک نہیں ہیں۔
اگر یہ کام کرتا ہے تو یہ IDOR ہے۔
ایسے اختتامی مقامات تلاش کریں جن کے لیے منتظم کی اجازت درکار ہو۔
کوکی کو تبدیل کرتے ہوئے ایڈمن اینڈ پوائنٹس پر ایک اکاؤنٹ میں لاگ ان کریں۔
اگر یہ کام کرتا ہے تو یہ IDOR ہے۔
-------------------------------------------------------------
Tips to Find IDOR
APIs can be great for finding IDORs
It never hurts to do some recon on the API endpoints
Sometimes validation might only be client side, so worth it to do everything in Burp
IDORs can appear in many different kinds of web apps
The impact of an IDOR can range from low to critical
-------------------------------------------------------------
Method IDOR Deleting other People's Tasks
Creating a task with User A
Login with user B
Create a task with user B
Turn on interceptor
Delete User B task
Change the ID to User A task in an interceptor
--------------------
صارف A کے ساتھ ایک کام بنائیں
صارف B کے ساتھ لاگ ان کریں۔
صارف B کے ساتھ ایک ٹاسک بنائیں
انٹرسیپٹر آن کریں۔
صارف B کا کام حذف کریں۔
انٹرسیپٹر میں ID کو User A کام میں تبدیل کریں۔
-------------------------------------------------------------
Method IDOR Bug to See Hidden Function of any user even when you don't have access right
Create 2 accounts: admin, guest
Use the admin account to create a function
Change the visibility setting so people cannot see the function
The guest account can still view the function ID via a request
Impact: Users can see the hidden function
--------------------
2 اکاؤنٹس بنائیں: منتظم، مہمان
فنکشن بنانے کے لیے ایڈمن اکاؤنٹ کا استعمال کریں۔
مرئیت کی ترتیب کو تبدیل کریں تاکہ لوگ فنکشن کو نہ دیکھ سکیں
مہمان اکاؤنٹ اب بھی درخواست کے ذریعے فنکشن ID دیکھ سکتا ہے۔
اثر: صارفین پوشیدہ فنکشن دیکھ سکتے ہیں۔
-------------------------------------------------------------
How to Bypass access authorization authentication using the OPTIONS method
GET /instructor/performance/students/?course_id=497558 HTTP/1.1 : 403 Forbidden
OPTIONS /instructor/performance/students/?course_id=497558 HTTP/1.1: 200 OK
-------------------------------------------------------------
Simple --> IDOR
login 1st Account
open cookie Editor and Change Cookie/JWT Value and Enter
then Refresh the page and See the Responce> BOOM
-------------------------------------------------------------
Autorize --> IDOR
login Attacker Account and Victim Account
open cookie Editor and Copy Attacker Cookie/JWT Value with Header
open Autorize Extention in Burp-suite
and Paste Cookie/JWT Value with Header
and Add filters
(1) Scope items only (2) URL Not Contains (simple String): socket.io (3) URL Contains (regex): .+/api/.+
then tick Auto-Scroll Check Box
Click the Autorize Box on
then Manuly Chek Authorization and Authentication and Privilege Access Functions on Victim Account and With See the Result on Autorize TAB
-------------------------------------------------------------
Graphql Introspection to Account Takeover
1- Tried Logical Manipulation or (Parameter Pollution) and Supplied IDs (UUID) like attackerid,victimid and it returned Victim's Auth Token.
2- Using the victim's auth token, changed their email address to Attacker Controlled Email and reset their Password, and have Full Control of their Victim Account.
-------------------------------------------------------------
Insecure Direct Object Reference -> IDOR
1- Register on website
2- In account settings, we have a parameter called ID, It’s have normal ID
3- I register a second account
4- Change the email and ID for second account
5- email changed successfully
6- Reset password then takeover
-------------------------------------------------------------
Privilege escalation to Acceso admin panel with Full Control
1- register account
2- intercept request
3- here’s the response in image so in “role” parameter we have ROLE_USER So I don’t know what I can replace it to privilege my account to admin
4- Open source code and look in JS files
5-So in js files I user ctrl+F to search about “user_role” i found another value that’s called “admin_role”
6- so I use match and replace to replace values
7- Boom privilege my account to admin account with full control
-------------------------------------------------------------
Test IDOR Vulnerability that leads to All User Data Leakage
Change the /me Endpoint to /user.
Change the GET Method to POST.
Add Content-Type: application/json header.
Add this Payload to the HTTP Request Body. Payload: {"ids":["1"]}
-------------------------------------------------------------
IDOR on upload Profile functionality
Vulnerable URL: https://██████████/███████ID/#Common/EditOne/Person/{account_id} steps to reproduce:
1).browse the image and click on the upload button
2).capture this request in burp suite
3). Change the value 'personId' parameter to account2 account_id (please see screenshot1)
4).then goes to account2, then you will see the uploaded image is successfully goes to the approved tab
Impact
An attacker is able to change the profile image of any user
-------------------------------------------------------------
Broken Access Controls Tips and tricks for finding
Identify sensitive functions and data.
Test for access control bypass by modifying user IDs in requests.
Check for IDOR vulnerabilities by modifying unique identifiers in URLs.
Test role-based access control (RBAC) by logging in with different user roles.
Look for unprotected APIs and see if you can update another user's profile.
Test for horizontal and vertical privilege escalation by modifying session tokens.
-------------------------------------------------------------
Server Security Misconfiguration
1- Capture reset password request
2- Send it to intruder
3- Repeat request 50 times
4- If you get 50 messages in your email (reset password) you can report it
-------------------------------------------------------------
Session Hijacking testing steps
Login your account
Use cookie editor extension in browser
Copy all the target cookies
Logout your account
Paste that cookies in cookie editor extension
Refresh page if you are logged in then this is a session hijacking
-------------------------------------------------------------
Last updated