OTP Leaking Through Cookie Leads to Account Takeover
2023-1-17 17:36:25 Author: infosecwriteups.com(查看原文) 阅读量:11 收藏

OTP Bypass

leakage

Hello Hackers,

This time I am going to discuss an OTP leaking vulnerability that leads to account takeover in an e-commerce website.

Let’s Start

What is OTP?
A one-time password, also known as a one-time PIN, one-time authorization code or dynamic password, is a password that is valid for only one login session or transaction, on a computer system or other digital device
(source: wikipedia)

While searching for a bug bounty program on google, I got an e-commerce website. I started to check the website’s register and login page, I intercepted the requests and started searching for any sensitive data but I didn’t find anything.

After I registered an account and while trying to login, then I figured out the interesting thing on that website. I should have found the vulnerability in the register page itself.

Let’s Discuss it

After Registration, there were two options to login: with the password or with OTP

Login Page

I used Login with OTP, entered the registered number, and clicked LOGIN WITH OTP

Validate OTP

Then I checked the cookies, there is a new cookie appeared ‘otpcookies’ with the OTP value.

otp

I entered the OTP and validated it.

Successfully LoggedIn

We successfully loggedin to the account.

We can takeover any account by knowing their mobile number only. We can use the same method to register the account, and the most interesting part was there was no validation of mobile number and email id, which means we can register even with non-existing numbers and emails. These all happened on an e-commerce website :(

I reported the issue to the admin and they responded within hours, and accepted the bug. After that no response from their side and no updates till now. Let’s wait.

Thank You For Reading ….

Twitter: https://twitter.com/ag3n7apk

Linkedin: https://www.linkedin.com/in/abhijith-pk-ag3n7/


文章来源: https://infosecwriteups.com/otp-leaking-through-cookie-leads-to-account-takeover-4fb96f255e2f?source=rss----7b722bfd1b8d--bug_bounty
如有侵权请联系:admin#unsafe.sh