<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by NIKHIL RANE on Medium]]></title>
        <description><![CDATA[Stories by NIKHIL RANE on Medium]]></description>
        <link>https://medium.com/@hillrane24?source=rss-da8d39fd7f56------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2KWm9oLbTPDUuwkrBsjFZw.jpeg</url>
            <title>Stories by NIKHIL RANE on Medium</title>
            <link>https://medium.com/@hillrane24?source=rss-da8d39fd7f56------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 13:24:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hillrane24/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A tale of Facebook Cross-App Token Exploitation]]></title>
            <link>https://medium.com/@hillrane24/a-tale-of-facebook-cross-app-token-exploitation-dc9f6c65e0b9?source=rss-da8d39fd7f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc9f6c65e0b9</guid>
            <category><![CDATA[facebook-access-tokens]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[facebook-auth]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <dc:creator><![CDATA[NIKHIL RANE]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 09:04:07 GMT</pubDate>
            <atom:updated>2024-09-20T09:04:07.582Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Everyone, My name is <a href="https://www.linkedin.com/in/nikhilranecybersecurity/">Nikhil Rane</a>. I want to share a unique and interesting vulnerability I recently discovered during a penetration testing project. The company had assigned me the task of testing the Open Authentication (OAuth) feature of their website, which offered three social login options: Google, Facebook, and Apple.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*V88Kan6Y5y2GQ8yMj4hE4w.png" /><figcaption>Social login feature</figcaption></figure><h3>The Initial Investigation</h3><p>I began by exploring common vulnerabilities in OAuth implementations, such as token reuse, URL redirection and data manipulation to check for any potential unauthorized access. After creating an account and logging in, I noticed a feature allowing users to link their Facebook account — another endpoint to test, which immediately piqued my interest.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*bBKEfM3vMEmHCYjewjI4Ng.png" /><figcaption>Facebook linking</figcaption></figure><p>Upon testing this feature, I discovered that the same Facebook token could be used multiple times to link account. While this is generally a low-severity vulnerability (since users can only link and unlink their own account), it served as a good starting point for further testing.</p><h3>Delving into the Facebook Auth Flow</h3><p>I began dissecting the authorization flow where the <a href="https://developers.facebook.com/docs/facebook-login/guides/access-tokens/get-long-lived/">Facebook access token</a> is exchanged to verify the user and grant account access. This led me to wonder: <em>What would happen if I replaced my token with someone else’s token?</em></p><p>To test this theory, I replaced my Facebook token during the login process with a token from another account. As expected, I gained access to the second account. However, this was not the vulnerability since the token was still valid within the same web application but belonged to a different user — essentially an intended part of the OAuth flow.</p><h3>The Key Discovery: Cross-App Token Exploitation</h3><p>The next logical step was to see what would happen if I used a Facebook access token from a different web application in my target web app. After some research, I learned that Facebook issues two types of access tokens: short-term and long-term tokens.</p><p>While obtaining someone else’s Facebook token is typically a matter of recon. I took an access token from another web application (let’s call it XYZ.com) of different user and replaced it in the authentication flow of my target web app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bf3uM_s9Ih1lANim4hlfSQ.png" /><figcaption>Changing access token</figcaption></figure><p>To my surprise, the account was successfully created using the victim’s email associated with the Facebook token from XYZ.com. Since it was a social login, no additional verification process was required.</p><h3>Exploiting the Vulnerability for Persistence</h3><p>At this point, my goal was to establish persistence — a backdoor where an attacker could maintain access to the victim’s account. I remembered the Facebook linking feature within the account settings. After logging in with the victim’s credentials, I linked my own Facebook account to their account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*o0dQO3WqAT5a4xXsVBbuvQ.png" /><figcaption>Backdoor by linking Facebook account</figcaption></figure><p>Here’s the scenario: The victim’s account is created, and they can access it through OTP verification. Meanwhile, the attacker (me) has linked their Facebook account, allowing persistent access to the victim’s account and data. The attacker can now view the victim’s personal information and craft further attacks.</p><h3>The Core Issue: Lack of Token Validation</h3><p>The vulnerability stems from a lack of proper validation. The Facebook access token from one web application can be used to create an account on a different web application, leading to authentication bypass. This cross-app token usage is a significant security flaw, as it enables unauthorized access without requiring any further verification.</p><h3>Broader Implications</h3><p>During my testing, I found multiple vulnerabilities within the overall authentication flow. If a web application has similar social login functionality, there’s a high probability that this type of vulnerability can be exploited across multiple parameters.</p><h3>Conclusion</h3><p>This discovery highlights the importance of robust token validation processes in OAuth implementations. Failing to properly validate tokens from external sources can lead to severe authentication bypasses, putting user data and accounts at risk. If you’re developing or securing a platform that uses social logins, make sure to implement strict token validation to prevent this type of exploit.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc9f6c65e0b9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Power of CSRF]]></title>
            <link>https://medium.com/@hillrane24/power-of-csrf-43b736c74280?source=rss-da8d39fd7f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/43b736c74280</guid>
            <category><![CDATA[otp-bypass]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[csrf]]></category>
            <category><![CDATA[authentication-bypass]]></category>
            <dc:creator><![CDATA[NIKHIL RANE]]></dc:creator>
            <pubDate>Sat, 13 Apr 2024 08:37:18 GMT</pubDate>
            <atom:updated>2024-04-13T08:37:18.421Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello People, My name is Nikhil Rane and I am a Bug bounty hunter from India. This is my second blog of my methodology and exploitations of vulnerabilities. This is bit unique way of bypassing the verification process of mobile number and email, So lets start.</p><p>I discovered a public program where there was a sign up page. It was just like a normal account creation process where i was asked to verify my mobile number as well as my email address (I did not verify my email). I tried some manipulation technique to bypass mobile verification process but i was not able to do it. So i created my account and went to edit profile page i tried some manipulating process still same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IyJXRWoFCfpK-mLaVZHGPw.png" /><figcaption>edit profile traffic</figcaption></figure><p>To change email as well as mobile number verification is asked in the form of OTP, so my main focus was to bypass the mobile OTP as it is the primary source of authentication. I spent almost 30 to 45 minutes finding write up as well as some unique way to bypass verification — but i didn&#39;t found anything interesting.</p><p>So just for curiosity i intercepted the edit profile traffic just to look what i can do, but i did found something interesting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2D8a5tgZvQWxDsqZjqnubw.png" /></figure><p>I saw that i am getting phone number as well as email parameter in the intercepted traffic, I got confidence that i can find something interesting. I changed the mobile number in the request section and sent the request forward but nothing happened. So after analyzing the request i saw there is no CSRF protection, so i just generated the CSRF POC.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*P-2ochcXMHvHEAJL.png" /></figure><p>CSRF is an attack in which attacker capture the the action request like updating, deleting and changing of profile credentials or activity of the account followed by generating HTML code. Saving that request in the HTML file and sending it to victim. The victim click on the file unknowing executing the action request made by attacker. If the execution is successful the data or credentials will be changed of victims account. But here in my attacking scenario i did self attack on my own account, usually it is tested on the victim side. My moto was to bypass the verification so i executed this file on my own browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*o7H7gP1OblPm4oHFTN8FZg.png" /><figcaption>CSRF POC</figcaption></figure><p>I changed the mobile number and email address to some other or say to victims phone and email, clicked on the option “test in browser” and Opened file on my own browser tab just to get the success message.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*acMk8rZI9fVnO0TSw2jilQ.png" /></figure><p>So, the thing is i am able to bypass the email as well as mobile verification as the main authentication was mobile OTP. So this was my unique finding of bypassing the authentication process and OTP verification which i did back in past. The mitigation was done by adding CSRF token and by encrypting the input field upon capturing the edit profile request .</p><p>Now the catch is i did not try to link it with account take over. As i was new to the Bug bounty hunting i was not knowing the concept of chaining the attacks. But still this was my best finding back then. I could have simply send CSRF file to victim followed by victim download and execute the file in the browser. Victims account credentials might get change which can lead to ATO(Account take over). Once the credentials are changed we can ask for forget password link or OTP which will be on our changed number or email. This is just a scenario, which i could have tested back.</p><p>I hope you enjoy reading, Peace out :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=43b736c74280" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How i found Multiple IDOR]]></title>
            <link>https://medium.com/@hillrane24/how-i-found-multiple-idor-ab52815b375a?source=rss-da8d39fd7f56------2</link>
            <guid isPermaLink="false">https://medium.com/p/ab52815b375a</guid>
            <category><![CDATA[idor-vulnerability]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[NIKHIL RANE]]></dc:creator>
            <pubDate>Sat, 30 Mar 2024 21:35:38 GMT</pubDate>
            <atom:updated>2024-04-01T13:31:49.434Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi People, My name is Nikhil Rane and I am a Bug Bounty Hunter from India. I have never tried writing a blog before — this is not usually my thing. However, many people keep asking me about the type of vulnerabilities I report in my pen-testing / Bugbounty hunting so here it goes — a glimpse into a recent probe. I hope you enjoy the read :)</p><p>Whenever I begin testing a private Bugbounty website: The login functionality, is where I start. This is where I look for the widest range of attacks. I always go for the sign up and login website as I get multiple parameters and functionalities to test.</p><p>IDOR is a vulnerability, which comes under the Broken Access Control Category in the OWASP top 10. As we know, when we create an account, every account has its own unique ID number, which can be random in sequence — just like when we were in school each student has its own roll number. Through IDOR, we can do multiple things such as read, change and delete things of other users. So just by changing the ID number to victim’s accounts ID number, we can delete other users data, read other users data, as well as change other users data according to request.</p><p>I started navigating all the things in the website and exploring the parameters; there was a option to create your Wishlist, add item in the basket and delete item. Therefore initially, I went for the stored XSS and other injection attack, however this was blocked by the firewall. There was CSRF token placed on every other functionality so I tried bypassing it — but failed.</p><p>I started adding items to buy in the basket and started playing with the parameter. Sadly, I didn’t found anything interesting. I navigated to the basket page and there I found out that there is an option to delete the basket. I intercepted the traffic and found out there is no CSRF token so I immediately generated CSRF POC but while generating CSRF POC, I found out that the basket has a unique number so I dropped my plans for CSRF attack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*3XuD3I-aoLTAziusAylYDQ.png" /><figcaption>basket id</figcaption></figure><p>Immediately, I created another account naming it “victim” and added items in the victim’s basket — copied the victim’s unique ID number of the basket and replaced it with my ID number. The item was deleted from the victim’s basket, so I started testing the same vulnerability on the adding item, creating a wish list and deleting wish list. As there was the same functionality used by the developer I was able to exploit the vulnerability in the same way.</p><p>Now, the question is how I got the unique ID number of the victim? How did I find this out? I will try to explain: Let’s take an example, if my ID number is 100, I know that there are people with account number 1 to 99. Therefore, I make a list of numbers in a text file from 1 to 99 and will perform an brute force attack / dictionary attack.</p><p>To show more impact in deleting basket, I mentioned in the impact that an attacker can create a file with uniquid ID from 00000000 to 99999999 and can do a brute force attack / dictionary attack on the unique ID parameter, therefore an attacker can delete all the users basket item. While deleting I obtained the legitimate ID number of victim because when the basket is deleted it was showing 302 status code in response: So I can change the name of the wish list just to trouble or troll the other users. Similarly, I exploited this IDOR on changing wish list name and deleting wish list. Still more things to be explored in website. As I was able to chain my attack it is impactful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*tjWlNq3duQOQel-qRoOGyw.png" /><figcaption>status code</figcaption></figure><p>As there are multiple similar functionality in the website there are high possibility of chances similar vulnerability can be exploited. So I kept on exploring functionalities. Within a couple of days, I got a reply and the reward is yet to be decided due to Easter break :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*N9PFMPUd8Snk-hqZ8uOzNg.png" /><figcaption>Reply from the company.</figcaption></figure><p>Thank you for reading. Peace out :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ab52815b375a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>