<?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 Sujal Sahu on Medium]]></title>
        <description><![CDATA[Stories by Sujal Sahu on Medium]]></description>
        <link>https://medium.com/@sahusujal.dev2004?source=rss-9757e6e039c9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-_fpYSEfBUQbPHoKEAmPVA.jpeg</url>
            <title>Stories by Sujal Sahu on Medium</title>
            <link>https://medium.com/@sahusujal.dev2004?source=rss-9757e6e039c9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 07:50:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sahusujal.dev2004/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[EASIEST P4 TO FIND IN BUG BOUNTY PART 1]]></title>
            <link>https://medium.com/@sahusujal.dev2004/easiest-p4-to-find-in-bug-bounty-part-1-b903ad3cea37?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b903ad3cea37</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bugs]]></category>
            <category><![CDATA[real-world-bug-hunting]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Sat, 08 Feb 2025 18:38:32 GMT</pubDate>
            <atom:updated>2025-02-08T18:38:32.687Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. So today we’ll discuss easiest P4 bug in bug bounty.</p><h3>Let’s start!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*PbKPoK97nGf_FGSufCde3w.png" /></figure><h3>What is SPF/DMARC policy?</h3><p>SPF (Sender Policy Framework) is responsible for email authentication of the domain owner. If it is not properly configured, we can send emails from the domain without any authentication.</p><h3>How to Find and Exploit SPF/DMARC Bug?</h3><p><strong>STEP 1:</strong> Go to your target company and collect all the possible emails of that company. <strong>STEP 2:</strong> Now check the SPF and DMARC record of all the emails on:</p><pre>https://mxtoolbox.com/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E1aJdO6gXQh5y8MXOuoCrg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E1aJdO6gXQh5y8MXOuoCrg.jpeg" /></figure><p><strong>STEP 3:</strong> Now if you get an email (<a href="/service/mailto:xyz@company.com">xyz@company.com</a>), then go for its exploitation.</p><h3>EXPLOITATION BEGINS</h3><p><strong>STEP 1</strong>: Visit URL in order to exploit the issue</p><pre>https://emkei.cz/</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*50t5d5RpPFSkUqpYU94k-A.jpeg" /></figure><p><strong>STEP 2:</strong> Here you’ll need to fill From-email, To, and Subject.</p><p><strong>STEP 3:</strong> In From-email, add the company’s email; in To, add your own email; and in Subject, you can add anything (like “Hacking You,” “Bounty Time,” etc.).</p><p><strong>STEP 4:</strong> Check your inbox and you’ll get the email from that company which was sent by you.</p><h3>IMPACT</h3><p>Email spoofing is a tactic used in phishing and spam campaigns because people are more likely to open an email when they think it has been sent by a legitimate source. The goal of email spoofing is to get recipients to open, and possibly even respond to, a solicitation.</p><h3>REPORTS</h3><p><a href="https://hackerone.com/reports/1198439">https://hackerone.com/reports/1198439</a><br><a href="https://hackerone.com/reports/117159">https://hackerone.com/reports/117159</a><br><a href="https://hackerone.com/reports/263736">https://hackerone.com/reports/263736</a><br><a href="https://hackerone.com/reports/1125143">https://hackerone.com/reports/1125143</a><br><a href="https://hackerone.com/reports/864696">https://hackerone.com/reports/864696</a></p><h3>Summary</h3><p>I hope you enjoyed this article and that you maybe have picked up an idea from this. thanks for taking the time to read it anyway.</p><h3>Happy Hacking!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b903ad3cea37" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Configure credentials In Jenkins and Used Them]]></title>
            <link>https://awstip.com/how-to-configure-credentials-in-jenkins-and-used-them-841511f59776?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/841511f59776</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[cicd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[jenkins-pipeline]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Thu, 06 Feb 2025 16:12:52 GMT</pubDate>
            <atom:updated>2025-02-10T18:04:17.987Z</atom:updated>
            <content:encoded><![CDATA[<h3>How To Configure Credentials In Jenkins and Used Them</h3><p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. So today we’ll discuss how we configure credentials in Jenkins.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/396/1*wSsfvlxDUhCpo-EHOL0eig.png" /></figure><h3>Let’s start!</h3><h3>What is Jenkins?</h3><p>Jenkins is a free open-source tool that helps to automate the CI/CD process. It is a popular tool used by many DevOps engineers.</p><h3>Let’s get back to the topic</h3><p>Today we’ll learn about how we can configure credentials like AWS Secret Key, GitHub Secret Key, SSH Private Key, and any platform credentials, etc. So let’s understand step by step.</p><h3>How Do We Install Jenkins on Our Instance?</h3><p>I’m not wasting your time on simple stuff — you can follow this article to learn how to install Jenkins on your instance:</p><p>Link:- <a href="https://medium.com/tech-insider/jenkins-installation-and-setup-from-scratch-on-linux-5d9746b11fce">https://medium.com/tech-insider/jenkins-installation-and-setup-from-scratch-on-linux-5d9746b11fce</a></p><h3>Let’s see how to configure credentials</h3><p><strong>On Step 1</strong>: you have to login into your Jenkins dashboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b6EhO45tx5z4Tp6V3f923w.png" /></figure><p><strong>In Step 2:</strong> Navigate to the Manage Jenkins option and go to the Credentials tab as shown in the image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iTdKIcYcU4V6JUTFhNsKow.png" /></figure><p><strong>Step 3:</strong> Click on System, then <strong>Global credentials (unrestricted)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*Y_x7f_Mqq_sjoBEx2yFYZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w6BMHbFs12Q9nZckFIVgFA.png" /></figure><p><strong>Step 4:</strong> Now you have to click on “Add credentials”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wIw3xOEscOxkYJDf_cHgw.png" /></figure><h3>Now I’ll Explain Different Options Present Here</h3><p>1&gt; In the Kind section, there are several options present. As shown in the picture, you can select based on the credential you stored</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*svMa5ibYon1kXXBtOjOG3w.png" /></figure><p>2&gt; In the Scope section, there are 2 options present. If the secret is used at the time of Pipeline execution, then you have to select the Global option. If it is related to Jenkins or Node, then you have to select the System option</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*UCtjqSdY7XbjkPuXDPAphA.png" /></figure><h3>There is One Important Field Called ID</h3><p>This field must be used as it is the name of the credential. If we want to use the credential, then we have to use it by its ID</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zp3h9O-460cF6WYYJveV9A.png" /></figure><p>The rest of the fields are common, and you can fill them in on your own.</p><h3>After configuring, how can we use credentials in our pipeline?</h3><p>You can use credentials by using the function <strong>withCredentials. In this function, you need to provide the credential’s unique ID, and Jenkins will handle the rest</strong></p><pre>withCredentials([usernamePassword(credentialsId: &#39;Dockerhub&#39;, usernameVariable: &#39;USERNAME&#39;, passwordVariable: &#39;PASSWORD&#39;)]) {<br>                     echo $USERNAME<br>                }</pre><h3>Summary</h3><p>I think you all learned something from this article. If that’s true, then why not give it a clap and make sure to follow me on Medium, LinkedIn, and GitHub for more DevOps and cybersecurity related articles.</p><h3>HAPPY LEARNING!!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=841511f59776" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/how-to-configure-credentials-in-jenkins-and-used-them-841511f59776">How To Configure credentials In Jenkins and Used Them</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FINDING UNIQUE BUG BOUNTY PROGRAMS]]></title>
            <link>https://medium.com/@sahusujal.dev2004/hello-everyone-8550eb37820f?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8550eb37820f</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bounty-program]]></category>
            <category><![CDATA[bug-bounty-dorks]]></category>
            <category><![CDATA[bug-bounty-program]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Sat, 25 Jan 2025 10:18:14 GMT</pubDate>
            <atom:updated>2025-01-25T11:44:46.031Z</atom:updated>
            <content:encoded><![CDATA[<h3>HOW TO FIND UNIQUE BUG BOUNTY PROGRAM</h3><p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. So today we’ll discuss about finding the unique bug bounty Program</p><h3>Let’s start!</h3><p>In this article, I’ll discuss how to make completely unique dorks to find bug bounty programs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*6oyW3fCj71PkQ356Qq2IRw.png" /></figure><h3>Why this is Important</h3><p>In the world of bug bounty hunting, there is a lot of competition. To stay ahead of the competition, we need to work uniquely, as everyone is using similar dorking techniques that are available on Google. For example <a href="https://github.com/sushiwushi/bug-bounty-dorks/blob/master/dorks.txt">https://github.com/sushiwushi/bug-bounty-dorks/blob/master/dorks.txt</a> , most hunters are using the same dork file to find bug bounty programs.</p><p>So if we are using the same dorks, there will be higher chances that the program we choose has already been hunted by many hunters.</p><p>In order to find programs with fewer hunters, we need to create our own Google dorks to find bug bounty programs.</p><h3>How we Craft Unique Dorks using AI</h3><p>In order to craft unique dorks, we don’t need to learn about Google dorking. All we need to do is just some basic prompt engineering and make AI work for us.</p><p>To generate dorks using AI, we first need to provide some sample dorks so that AI ( ChatGPT, Gemini) can learn about the dorks used to find bug bounty programs. The corrections made include:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1019/1*rUKpU0INxGmwga7u6rCeLA.png" /></figure><p>In this prompt, I’ve told him to analyze the file that has sample dorks. You can easily find sample dorks on the Internet</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNQ_rmuBfuVFMSm_fTXglg.png" /></figure><p>In the next step, I’ve told ChatGPT to generate dorks based on the sample dorks. These generated dorks are unique, so now we have Google dorks which can help us find bug bounty programs that likely have fewer hunters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mtGIx1BPNq5PPg6TwmtpkA.png" /></figure><p>You can clearly see that by using the Google dorks generated by ChatGPT, we can find many bug bounty programs. There is a higher chance that these programs have fewer hunters because we are finding them using unique dorks.</p><h3>Summary</h3><p>I hope you enjoyed this article and that you maybe have picked up an idea from this. thanks for taking the time to read it anyway.</p><h3>Happy Hacking!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8550eb37820f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[REMOTE S3 BACKEND SETUP FOR TERRAFORM]]></title>
            <link>https://awstip.com/remote-s3-backend-setup-for-terraform-10c26835dd60?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/10c26835dd60</guid>
            <category><![CDATA[terraform-remote-state]]></category>
            <category><![CDATA[iac]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[terraform]]></category>
            <category><![CDATA[aws]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Thu, 23 Jan 2025 11:35:07 GMT</pubDate>
            <atom:updated>2025-02-06T18:32:30.212Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. So today we’ll discuss the remote backend setup for Terraform.</p><h3>Let’s start!</h3><h3>What is Terraform?</h3><p>Terraform is an open-source tool by Hashi Corp used to manage organizational infrastructure as code. It is used to automate the creation, management, tracking, and deletion of infrastructure on any cloud provider like AWS, Azure, and GCP.</p><h3>Why do we need Remote Backend Setup for Terraform?</h3><p>Terraform is used to track and automate the provisioning of infrastructure as code. Terraform tracks the whole infrastructure in the form of a state file, so if the state file is locally operated and becomes corrupted by mistake, there is no way to recover it. That’s why we use remote backend to keep the state file secure.</p><h3>Let’s start with the setup</h3><p>We are setting up the following architecture as shown below in the picture</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Ya4L903fjSGBip2Vd3tT9w.jpeg" /></figure><p>As per the architecture, we are using AWS S3 buckets to store our state file with versioning enabled, and we are using DynamoDB to lock the state of the file to prevent concurrent conflicts.</p><h3>Why do we use DynamoDB?</h3><p>There is a case when 2 users run Terraform at the same time and such cases can mess up the state file. To prevent such cases, we use DynamoDB to lock the file when it is being used by someone so that it can be protected from concurrent conflicts.</p><p>So in Step 1, we are creating a file named <a href="http://backend.tf/">Backend.tf</a> to create the S3 bucket and DynamoDB. The content of the file is as follows:</p><pre>#gathering accound_id</pre><pre>data &quot;aws_caller_identity&quot; &quot;current&quot; {}</pre><pre>locals {<br>    account_id = data.aws_caller_identity.current.account_id<br>}</pre><pre>#create S3 bucket</pre><pre>resource &quot;aws_s3_bucket&quot; &quot;name&quot; {<br>    bucket = &quot;${local.account_id}-terraform-states&quot;</pre><pre>    versioning {<br>      enabled = true<br>    }</pre><pre>    server_side_encryption_configuration {<br>      rule {<br>        apply_server_side_encryption_by_default {<br>          sse_algorithm = &quot;AES256&quot;<br>        }<br>      }<br>    }<br>}</pre><pre>#create DynamoTable for locking machenism</pre><pre>resource &quot;aws_dynamodb_table&quot; &quot;state_lock&quot; {<br>  name = &quot;state-lock&quot;<br>  billing_mode = &quot;PAY_PER_REQUEST&quot;<br>  hash_key = &quot;LockID&quot;</pre><pre>  attribute {<br>    name = &quot;LockID&quot;<br>    type = &quot;S&quot;<br>  }<br>}</pre><p>The following code is responsible for the creation of S3 bucket and DynamoDB.</p><p>After adding the <a href="http://backend.tf/">backend.tf</a> file, we need to run Terraform to create these resources which we will configure in later steps.</p><pre>terraform init<br>terraform plan<br>terraform apply</pre><p>Now moving forward to the second step, we will configure our backend resource details with the terraform <a href="http://main.tf/">main.tf</a> file so that it can interact with the remote backend.</p><p>To configure the backend with terraform, we need to add the following code with details in the <a href="http://main.tf/">main.tf</a> file:</p><pre>#Comfigure terraform Provider<br>terraform {<br>  backend &quot;s3&quot; {<br>    bucket = &quot;bucket-name&quot;<br>    dynamodb_table = &quot;state-lock&quot;<br>    key = &quot;global/mystatefile/terraform.tfstate&quot;<br>    region = &quot;ap-south-1&quot;<br>    encrypt = true<br>  }<br>  required_providers {<br>    aws = {<br>      source  = &quot;hashicorp/aws&quot;<br>      version = &quot;~&gt; 5.0&quot;<br>    }<br>  }<br>  required_version = &quot;&gt;= 1.10.4&quot;<br>}</pre><pre>provider &quot;aws&quot; {<br>  region = &quot;ap-south-1&quot;<br>}</pre><p>after add the following code into the <a href="http://main.tf/">main.tf</a> file we need to run the following commands</p><pre>terraform init<br>terraform plan<br>terraform apply</pre><p>You can find the full code in my GitHub repo. Link: <a href="https://github.com/sahu-sujal/Ideal_terrafrom_setup/tree/master/remote_state">https://github.com/sahu-sujal/Ideal_terrafrom_setup/tree/master/remote_state</a></p><p>Kindly fork or star this repository for quick access.</p><h3>Summary</h3><p>Thank you for reading this article! I hope you found it helpful and picked up some useful ideas about setting up remote Terraform backends.</p><h3>Happy Learning!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10c26835dd60" width="1" height="1" alt=""><hr><p><a href="https://awstip.com/remote-s3-backend-setup-for-terraform-10c26835dd60">REMOTE S3 BACKEND SETUP FOR TERRAFORM</a> was originally published in <a href="https://awstip.com/">AWS Tip</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Various Methods to Exploit Insecure Direct Object Reference (IDOR)]]></title>
            <link>https://medium.com/@sahusujal.dev2004/various-methods-to-exploit-insecure-direct-object-reference-idor-f50a131fe651?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f50a131fe651</guid>
            <category><![CDATA[bug-reporting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[web-penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Mon, 20 Jan 2025 09:33:55 GMT</pubDate>
            <atom:updated>2025-01-20T09:36:57.816Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. so Today we discuss various methods to exploit IDOR vulnerabilities</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*G6cQDpHyohc_v_qMsnsQOw.png" /></figure><h3>letsss start!!</h3><h3>What is Insecure Direct Object Reference (IDOR) ?</h3><p>IDOR Is an Access Control Vulnerability allow an attacker to maliciously interact with a web application by manipulating a “direct object reference”, It Happen When an Application Feches Data on the Basis of User Controable Object and doesn’t Implement Proper Authorization</p><h3>For Example</h3><p>changing the values in the parameter or after the endpoint in the following instances can go to IDOR!</p><pre>target.com/users/profile/1<br>target.com/accounts.php?user=rahul0x01&amp;id=42496<br>target.com/account.php?id=24<br>target.com/accounts/2.log<br>target.com/accounts?user=2</pre><h3>How IDOR Works</h3><p>When Application Expose the Internal Object Reference like Filename, ID, Key then if there is no proper access control then attacker can change there reference leades to the IDOR!!</p><p>Suppose there is an Profile Page with URl :-</p><pre>www.example.com/profile?id=123</pre><p>the above URl fetches data on the basis of “ID” Object so an attacker can change this Parameter</p><pre>www.example.com/profile?id=124</pre><p>Because of lack of access control attacker is able to retrive the profile of user 124</p><h3>Various Methods to Exploit</h3><h3>1. hanging HTTP Method</h3><p>we can Try IDOR by changing the Request Method From GET to POST or PUT etc.</p><pre>GET /user/APIKEY/USERID --&gt; 401 Unauthorized<br>POST /user/APIKEY/USERID --&gt; 200 OK</pre><h3>2. Swap AplhaNumeric ID’s With Numeric ID’s</h3><p>we can try changing Alphanumeric Id’s Numeric Id’s</p><pre>GET /file?id=952des6f625fsv5f6des269ds625vsf5 --&gt; 401 Unauthorized<br>GET /file?id=45266262 --&gt; 200 OK</pre><h3>3. Check Function Level Access Control</h3><p>we can try by change the case sensitivity of the endpoint</p><pre>GET /admin/profile --&gt; 401 Unauthorized<br>GET /ADMIN/profile --&gt; 200 OK<br>GET /AdmiN/ProfILe --&gt; 200 Ok</pre><h3>4. Change The Data Type of Object or ID’s</h3><p>we can try to change the data od ID’s from numeric to Array</p><pre>{&quot;id&quot;:1234} --&gt; 401 Unauthorized<br>{&quot;id&quot;:[1234]} --&gt; 200 ok</pre><h3>5. Send Wildcard Instead of an ID</h3><p>we can try send wildcard character instead of ID</p><pre>GET /user/v1/{id} --&gt; 401 Unauthorized<br>GET /user/v1/* --&gt; 200 OK</pre><h3>6. Try different Version of An API Endpoint</h3><p>Try to change the Version of an API Endpoint to Older Version</p><pre>GET /v3/userdata/4567 --&gt; 403 Forbidden<br>GET /v1/userdata/4567 --&gt; 200 OK</pre><h3>7. Add multiple Values for Same Parameter</h3><p>Try to add multiples values for the sanme parameter</p><pre>GET /api/userdata/profile?userid=&lt;victum&gt; --&gt; 403 Forbidden<br>GET /api/userdata/profile?userid=&lt;attacker&gt;&amp;userid=&lt;victum&gt; --&gt; 200 Ok<br>GET /api/userdata/profile?userid=&lt;victum&gt;&amp;userid=&lt;attacker&gt; --&gt; 200 Ok</pre><h3>8. Try Adding different extension at the end (eg-: .json, .txt, .php, .png etc)</h3><p>we can try by add extension at the end of the endpoint</p><pre>GET /userdata/1234 --&gt; 403 Forbidden<br>GET /userdata/1234.json --&gt; 200 Ok</pre><h3>Final Words</h3><p>I hope you enjoyed this article and that you maybe have picked up an idea from this. thanks for taking the time to read it anyway. There are alot more method to exploit IDOR vulnerabilities and not possible to cover in One blog.</p><p>If you have any questions or suggestions, don’t hesitate to drop a comment below!</p><p><strong>Happy Hacking!!</strong></p><p>Follow me on various Platform</p><p>Linkedin :- <a href="https://www.linkedin.com/in/sujal-sahu/">https://www.linkedin.com/in/sujal-sahu/</a></p><p>Github :- <a href="https://github.com/sahu-sujal/">https://github.com/sahu-sujal/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f50a131fe651" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[S3Bucket Enumeration and Takeover]]></title>
            <link>https://medium.com/@sahusujal.dev2004/s3bucket-enumeration-and-takeover-f1ff24ad8187?source=rss-9757e6e039c9------2</link>
            <guid isPermaLink="false">https://medium.com/p/f1ff24ad8187</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[s3-bucket]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[information-disclosure]]></category>
            <category><![CDATA[bucket-takeover]]></category>
            <dc:creator><![CDATA[Sujal Sahu]]></dc:creator>
            <pubDate>Sat, 18 Jan 2025 19:30:18 GMT</pubDate>
            <atom:updated>2025-01-20T09:52:30.811Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/353/1*mNe-MHRV3RZz7umhTx4shA.jpeg" /></figure><p>Hello everyone!</p><p>I’m Sujal Sahu, Third Year B.Tech — AIDS Engineering Student at JEC, Jabalpur. A Cyber Security Enthusiast, DevOps Learner, and a Bug Bounty Hunter. so Today we discuss methods to Enumerate and Takeover</p><p>letsss start!!</p><h4>What is AWS?</h4><p>AWS is a web-based cloud platform offering computing services like servers, databases, firewalls, and load balancers.</p><h3>What is AWS S3 Buckets?</h3><p>AWS S3 Bucket stands for Amazon Simple Storage Service. It’s an object-based storage system that stores data as objects within buckets.</p><h3>What is AWSCLI?</h3><p>AWSCLI is a console-based tool used to interact with AWS services. With AWSCLI, we can create, delete, or update services on AWS. To use AWSCLI, we first need to configure it.</p><h3>How to configure AWSCLI?</h3><ul><li>Create an Account on AWS</li><li>you can follow this artice on how to setup aws account :- <a href="https://medium.com/@selvarajk/how-to-create-an-aws-account-3a6682818355">https://medium.com/@selvarajk/how-to-create-an-aws-account-3a6682818355</a></li><li>Now create an IAM user and copy Secret Access key and Access key ID</li><li>Now install awscli with the help of apt package manager</li></ul><pre>Sudo apt install awscli -y</pre><ul><li>To configure Run the folling command and set Secret Access key, Access key ID and Region</li></ul><pre>aws configure</pre><h3>S3 URL Format :-</h3><h3>This is how an S3 bucket URL looks like :-</h3><ul><li><a href="https://s3-[region].amazonaws.com/[Name]"><strong>https://s3-[region].amazonaws.com/[Name]</strong></a></li><li><a href="https://[name].s3.amazonaws.com"><strong>https://[name].s3.amazonaws.com</strong></a></li></ul><h3>How to Find S3 Buckets ?</h3><p>To Find S3 Bucket for the target we can use Google Dorking and Automated Tools available on the Github.</p><h3>Here is an List of Popular Tools :-</h3><ul><li><strong>LAZY_s3</strong> :- <a href="https://github.com/nahamsec/lazys3">https://github.com/nahamsec/lazys3</a></li><li><strong>cred_scanner</strong> :- <a href="https://github.com/disruptops/cred_scanner">https://github.com/disruptops/cred_scanner</a></li><li><strong>bucket_finder</strong> :- <a href="https://digi.ninja/projects/bucket_finder.php">https://digi.ninja/projects/bucket_finder.php</a></li><li><strong>DumpsterDiver :-</strong> <a href="https://github.com/securing/DumpsterDiver">https://github.com/securing/DumpsterDiver</a></li><li><strong>cloud_enum :-</strong> <a href="https://github.com/initstring/cloud_enum">https://github.com/initstring/cloud_enum</a></li></ul><p><strong>Here is an Example of Google Dorking :-</strong></p><pre>site:.s3.amazonaws.com &quot;Company&quot;<br>site:&lt;http://s3.amazonaws.com&gt; intitle:index.of.bucket<br>site:&lt;http://amazonaws.com&gt; inurl:&quot;.s3.amazonaws.com/&quot;<br>site:&lt;http://s3.amazonaws.com&gt; intitle:Bucket loading<br>site:*.amazonaws.com inurl:index.html</pre><h3>How to Takeover misconfigured S3 Bucket ?</h3><ul><li>During recon try to find all the S3 Bucket for the Target for this blog we use <strong>cloud_enum</strong> for enumeration :-</li></ul><pre>Command: python3 cloud_enum.py -k &lt;company_name&gt; -k &lt;www.example.com&gt;</pre><p><strong>The s3 bucket looks something like this:</strong></p><p><a href="https://[name].s3.amazonaws.com/"><em>https://[name].s3.amazonaws.com/</em></a></p><p>when you visit the s3 bucket look something like this</p><ul><li>we can intrect with the S3Bucket withe the help of AWSCLI</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K8OltIwhS2YqrGX1vYf5xA.png" /></figure><pre>To list Object in the S3 Bucket we use<br> aws s3 ls s3://my-bucket-name/</pre><ul><li>now Lets check for the vurnable Bucket One by One</li><li>If the bucket is vurneable then It’ll list the objects without Authentication</li></ul><pre>Command: aws s3 ls s3://[bucketname] -no-sign-request</pre><ul><li>If we found an Vurneable Bucket then we can try some More Commands on it</li></ul><pre>Read File: aws s3 ls s3://[bucketname] --no-sign-request<br>Copy Files: aws s3 cp yourfile s3://[bucketname]/test-file.svg --no-sign-request<br>Delete Files:  aws s3 rm s3://[bucketname]/test-file.svg --no-sign-request</pre><ul><li>Suppose we Found an S3 bucket with copy file permission then</li><li>we upload an vurneable file on S3 bucket the try to open this file In my case i’ve upload the XSS vurneable File and after open that file my XSS payload trigger</li></ul><pre>Command : aws s3 cp ./test-file.svg s3://[bucket-name] -no-sign-request</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/1*SJKCMke6DPWiE0tUZv-1Jw.png" /></figure><ul><li>If you are successfully able to upload File or delete any file the Congo!! you’ve successfully takenover the Bucket</li></ul><h3>Hackerone Report</h3><ul><li><a href="https://hackerone.com/reports/1791558">https://hackerone.com/reports/1791558</a></li><li><a href="https://hackerone.com/reports/819278">https://hackerone.com/reports/819278</a></li><li><a href="https://hackerone.com/reports/209223">https://hackerone.com/reports/209223</a></li><li><a href="https://hackerone.com/reports/507097">https://hackerone.com/reports/507097</a></li><li><a href="https://hackerone.com/reports/128088">https://hackerone.com/reports/128088</a></li></ul><h3>Summary</h3><p>I hope you enjoyed this article and that you maybe have picked up an idea from this. thanks for taking the time to read it anyway. You can also Practicing Expoiting S3 bucket by solving HTB Starting point Tier 1 lab:- <strong>Three</strong></p><h3>Happy Hacking!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f1ff24ad8187" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>