<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Weekly Bug Bounty Content</title>
    <description>Subscribe for Weekly Bug Bounty &amp; Web Application Security related content in your inbox!</description>
    
    <link>https://weekly-bugbounty-content.beehiiv.com/</link>
    <atom:link href="https://rss.beehiiv.com/feeds/POM1cHgkdg.xml" rel="self"/>
    
    <lastBuildDate>Fri, 7 Aug 2026 00:16:13 +0000</lastBuildDate>
    <pubDate>Mon, 30 Jan 2023 12:37:00 +0000</pubDate>
    <atom:published>2023-01-30T12:37:00Z</atom:published>
    <atom:updated>2026-08-07T00:16:13Z</atom:updated>
    
      <category>Blockchain</category>
      <category>Cybersecurity</category>
      <category>Community</category>
    <copyright>Copyright 2026, Weekly Bug Bounty Content</copyright>
    
    <image>
      <url>https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/publication/logo/b8fa4312-0b90-4eaa-b9fa-b28e031fcf27/Copy_of_Untitled_Design.png</url>
      <title>Weekly Bug Bounty Content</title>
      <link>https://weekly-bugbounty-content.beehiiv.com/</link>
    </image>
    
    <docs>https://www.rssboard.org/rss-specification</docs>
    <generator>beehiiv</generator>
    <language>en-us</language>
    <webMaster>support@beehiiv.com (Beehiiv Support)</webMaster>

      <item>
  <title>Cross-Site Request Forgery (CSRF): CSRF exploitation</title>
  <description>Ultimate Guide into Finding and Exploiting Cross-Site Request Forgery Vulnerabilities</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a4b6f010-af9a-41fa-b4df-dbff8a4a2ee5/image.png" length="60306" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/cross-site-request-forgery-exploitation</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/cross-site-request-forgery-exploitation</guid>
  <pubDate>Mon, 30 Jan 2023 12:37:00 +0000</pubDate>
  <atom:published>2023-01-30T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="Ultimate Guide into Understanding and Identifying Cross-Site Request Forgery Vulnerabilities" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a4b6f010-af9a-41fa-b4df-dbff8a4a2ee5/image.png"/></div><p class="paragraph" style="text-align:justify;">Today&#39;s estimated reading time is: <b>13 min</b></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Last week we saw a brief introduction to cross-site request forgery</p><p class="paragraph" style="text-align:justify;">In this post, I will show you almost all methods to exploit CSRF vulnerabilities with some common bypasses!</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b></p><p class="paragraph" style="text-align:center;">The cloud-based attack surface management & vulnerability detection platform that finds vulnerabilities before you do.</p><p class="paragraph" style="text-align:center;"><b>Waitlist is open, join today ===&gt; </b><span style="text-decoration:underline;"><b><a class="link" href="https://novasec.io/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></span></p><h2 class="heading" style="text-align:left;"><b>Basic CSRF Exploitation:</b></h2><p class="paragraph" style="text-align:justify;">So we’ve seen what cross-site request forgery issues are</p><p class="paragraph" style="text-align:justify;">And although it might be still a bit vague for you, today’s post should take care of that as we are going to look more into the exploitation part</p><p class="paragraph" style="text-align:justify;">Basic CSRF exploitation involves you making a request that causes an action that modifies data on behalf of an authenticated user’s account</p><p class="paragraph" style="text-align:justify;">And a simple proof of concept may look like this:</p><div class="codeblock"><pre><code>https://example.com/messages/compose?receiver=account2%40example.com&amp;message=test&amp;send=1</code></pre></div><p class="paragraph" style="text-align:justify;">The above PoC is a simple <b>GET</b> request made to the <code>/messages/compose</code> endpoint and it will send a message on behalf of our first test account to our second test account (<code>account2@example.com</code>) with the message “test”</p><p class="paragraph" style="text-align:justify;">In a real-world attack scenario, an attacker might:</p><ol start="1"><li><p class="paragraph" style="text-align:justify;"><b>send this as a link to the victim through social engineering</b></p></li><li><p class="paragraph" style="text-align:justify;"><b>include this in the vulnerable web app as an iframe, image src, link, etc</b> as long as the <a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">SameSite cookie</a><b> </b>doesn’t interfere (everyone who visits that page with the iframe/image/… or clicks on the link, will send the message)</p></li><li><p class="paragraph" style="text-align:justify;">or <b>send a link to an attacker-controlled page that auto-submits an HTML</b> <b>form</b> (more on this later)</p></li></ol><h2 class="heading" style="text-align:left;"><b>CSRF Exploitation bypasses:</b></h2><h3 class="heading" style="text-align:left;"><b>Method-based CSRF:</b></h3><p class="paragraph" style="text-align:left;">We’ve seen what a basic CSRF PoC can look like however chances of finding such simple cases are very rare</p><p class="paragraph" style="text-align:justify;">And GET requests are almost never used to perform an action so developers usually fall back to using a POST/PUT/PATCH request</p><p class="paragraph" style="text-align:justify;">The thing here is, they sometimes forget to remove other accepted HTTP methods or are just unaware of the capabilities of the technology they use (CMS, framework, library to parse requests, …)</p><p class="paragraph" style="text-align:justify;">And this can open a gap for us to still exploit CSRF by changing the request method, let’s look at an example below:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e08e9f56-98f9-4984-a525-4d1c79d18cbe/image.png"/></div><p class="paragraph" style="text-align:justify;">In the image above, we can see a PUT request getting sent to the API</p><p class="paragraph" style="text-align:justify;">And we can’t just send a PUT request using an HTML form (not possible) or Ajax request without triggering <a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">CORS</a> (another browser security feature that allows you to declare what resources are allowed to be shared on other origins)</p><p class="paragraph" style="text-align:justify;">But on further inspection, you can notice that you can change the request method to <code>GET</code> and supply all the body parameters in the URL query</p><p class="paragraph" style="text-align:justify;">We can easily send this link and it would send the message on the victim’s behalf:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/02d5ff63-ce8d-456f-ae9d-c1e76cde9a52/image.png"/></div><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:justify;">Some frameworks like Laravel and Ruby on Rails support parameters or request headers that <b>allow you to override the HTTP method</b>!</p><p class="paragraph" style="text-align:justify;"></p><p class="paragraph" style="text-align:justify;"></p><p class="paragraph" style="text-align:justify;">This means sending a request like <code>/api/xyz?_method=POST</code> will send a <b>GET request</b> but will be <b>parsed as a POST request on the server-side</b>! </p><p class="paragraph" style="text-align:justify;"></p><p class="paragraph" style="text-align:justify;"></p><p class="paragraph" style="text-align:justify;">On Ruby on Rails you can use the <code>X-HTTP-Method-Override: GET</code> request header, on Laravel: <code>_method=GET</code></p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><h3 class="heading" style="text-align:left;"><b>Content-Type-based CSRF:</b></h3><p class="paragraph" style="text-align:justify;">Most REST APIs only make use of JSON data in requests</p><p class="paragraph" style="text-align:justify;">And thing is, if you try to replicate the request using an HTML form, you’ll notice that it is not possible to do so using <code>application/json</code> content-type</p><p class="paragraph" style="text-align:justify;">Even if you try using an AJAX request, a pre-flight request will be made and will block you because of <a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">Cross-Origin Resource Sharing (CORS)</a></p><p class="paragraph" style="text-align:justify;">In this scenario, you’d need to try and enumerate any other content types that the endpoint may accept</p><p class="paragraph" style="text-align:justify;">For example, changing <code>application/json</code> request body to <code>application/x-www-form-urlencoded</code> may look like this:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3ee0c3c9-563a-430d-938e-3ac7c8bfda38/image.png"/></div><p class="paragraph" style="text-align:justify;">This would enable us to still perform the CSRF using an HTML form as no CSRF token is used (because developers initially thought that using JSON is sufficient to mitigate CSRF):</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3b45a1f9-f811-406f-bf6b-b1a8ff237bda/image.png"/></div><p class="paragraph" style="text-align:justify;">In some cases, you may notice that only a JSON object is allowed but any content type is accepted</p><p class="paragraph" style="text-align:justify;">In this case, you’d want to make use of the <code>text/plain</code> content-type inside an HTML form:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9ca07775-9494-4654-b134-925e1ca159a0/image.png"/></div><p class="paragraph" style="text-align:justify;">In the image above, we need to split up the JSON object to make it fit in an HTML form, typically, it’ll add a = between the name and value of the parameter</p><p class="paragraph" style="text-align:justify;">We fixed this by inserting it in the message field</p><h3 class="heading" style="text-align:left;"><b>Lack of CSRF token validation:</b></h3><p class="paragraph" style="text-align:justify;">I’ve seen cases where a CSRF token is present (in the request header or as a parameter) but isn’t validated at all</p><p class="paragraph" style="text-align:justify;">This opens up a lot of possibilities for us, for example, we could:</p><ul><li><p class="paragraph" style="text-align:justify;">Remove the CSRF parameter or header completely and send the request</p></li><li><p class="paragraph" style="text-align:justify;">Change it with a guessable value like “1” or “batman” or anything else</p></li><li><p class="paragraph" style="text-align:justify;">Change it with another value as long as it is the same length as the original CSRF token</p></li><li><p class="paragraph" style="text-align:justify;">Change it with another CSRF token (one of your second account or a previously generated CSRF token)</p></li></ul><p class="paragraph" style="text-align:justify;">To provide some more context on the last case: this is usually because the CSRF token is not tied to the user’s session</p><p class="paragraph" style="text-align:justify;">Instead, developers decided to add all generated tokens (that are active) and save them in a database </p><p class="paragraph" style="text-align:justify;">And that means that any generated token can be used by any user (as long as the token is present in the database)</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:justify;">Some developers assume that CSRF tokens can’t be modified and often don’t escape it whenever they reflect it in the response (when an invalid token is sent for example)<br><br>I found an XSS some time ago, so make sure you check for it too (and don’t limit yourself, try to transform request headers into query/body parameters to get a working proof of concept 😉)!</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><h3 class="heading" style="text-align:left;"><b>Cookie-based CSRF:</b></h3><p class="paragraph" style="text-align:justify;">Another approach that some developers take to mitigate CSRF attacks is generating the token and saving it in a cookie + supplying it in the request body</p><p class="paragraph" style="text-align:justify;">And on the server side, both values get compared</p><p class="paragraph" style="text-align:justify;">If both tokens match, then the action is allowed. Otherwise, your request gets rejected</p><p class="paragraph" style="text-align:justify;">Now, this approach is generally not recommended as you can create a cookie yourself using a CR/LF injection (or some other function that allows you to set cookies) and supply the same token in the body as well, like in the image below:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/74c2ce3e-1b45-4d1d-9d1b-511fe6b6a476/image.png"/></div><p class="paragraph" style="text-align:justify;">To further explain what’s happening here is:</p><ol start="1"><li><p class="paragraph" style="text-align:justify;">First of all, we make use of a <a class="link" href="https://owasp.org/www-community/vulnerabilities/CRLF_Injection?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">CRLF</a> Injection to inject the <code>Set-Cookie: CSRF_TOKEN=&#123;CSRF_TOKEN&#125;</code> in the response body (the CSRF token can be a previously generated one or any token that has the same character length). This will set the cookie for us and we use an image src for it as a simple GET request is required</p></li><li><p class="paragraph" style="text-align:justify;">Next, it will submit the request using<b> the same token as the one set in the cookie</b></p></li></ol><h3 class="heading" style="text-align:left;"><b>Login/logout CSRF:</b></h3><p class="paragraph" style="text-align:justify;">You’ll often notice that you can log yourself out by visiting an endpoint or a route, for example <code>/account/logout</code></p><p class="paragraph" style="text-align:justify;">This is called “Logout CSRF”, the same as when logging in via OAuth for example (when you opt-in for your credentials to be saved), this CSRF issue is called “Login CSRF”</p><p class="paragraph" style="text-align:justify;">Login/Logout CSRF are generally not considered to be an issue in bug bounty as all that matters is the impact — which is none at the moment (unless otherwise mentioned by the program)</p><p class="paragraph" style="text-align:justify;">However, this bug is perfect for chaining it with a stored self-XSS!</p><p class="paragraph" style="text-align:justify;">I won’t go into depth here but I will link down an article that goes over this attack scenario</p><p class="paragraph" style="text-align:justify;">The lesson here is that “useless CSRFs” are not always “useless”, sometimes you’ll need to chain multiple bugs together to achieve the most impact</p><h3 class="heading" style="text-align:left;"><b>Referer header CSRF:</b></h3><p class="paragraph" style="text-align:justify;">I personally haven’t encountered this before but apparently, there are developers that check if a request is valid if the referer header is matched</p><p class="paragraph" style="text-align:justify;">And the way to exploit this is by trying to match the loosely set regex pattern</p><p class="paragraph" style="text-align:justify;">For instance, you could try:</p><ul><li><p class="paragraph" style="text-align:justify;">and <b>make sure the target’s domain is present in the URL query parameter or path</b>: <code>https://attacker.com/target.com/x?target.com</code></p></li><li><p class="paragraph" style="text-align:justify;">or try to use the target’s domain name as the subdomain: <code>https://target.com.attacker.com/x</code></p></li></ul><p class="paragraph" style="text-align:justify;">Sometimes there’s no handling done at all when the <span style="text-decoration:underline;"><a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">referer header</a></span> is not set</p><p class="paragraph" style="text-align:justify;">In that case, it is always a good idea to remove it from the request by setting the following tag in the head element of your proof of concept:</p><div class="codeblock"><pre><code>&lt;meta name=&quot;referrer&quot; content=&quot;no-referrer&quot;&gt;</code></pre></div><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">I recommend trying out all different methods and combining these (such as change content-type + request method)!</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">I also recommend using a CSRF exploit generator to easily create proof of concepts. <span style="text-decoration:underline;"><a class="link" href="https://portswigger.net/burp/documentation/desktop/functions/generate-csrf-poc?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">Burpsuite has a built-in one</a></span> but only if you have the professional version. I’m sure that ZAProxy has it as well</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Resources worth reading:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://book.hacktricks.xyz/pentesting-web/csrf-cross-site-request-forgery?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">CSRF guide on exploitation + various PoCs</a> by <b>HackTricks</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://www.cobalt.io/blog/a-pentesters-guide-to-cross-site-request-forgery-csrf?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">Another CSRF exploitation guide</a> (this one includes a cheatsheet to check if your target is vulnerable to CSRF) by <b>Cobalt</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/csrf?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">CSRF lab to practice exploitation</a> by <b>Portswigger Academy</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://brightsec.com/blog/cross-site-request-forgery-csrf/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">Some more CSRF Examples</a> by <b>BrightSec</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://shahmeeramir.com/methods-to-bypass-csrf-protection-on-a-web-application-3198093f6599?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">6 CSRF Bypasses explained</a> by <b>Shahmeer Amir</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://medium.com/@renwa/the-underrated-bugs-clickjacking-css-injection-drag-drop-xss-cookie-bomb-login-logout-csrf-84307a98fffa?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation#67e0" target="_blank" rel="noopener noreferrer nofollow">A chain of Self-XSS + Login/Logout CSRF to account takeover</a> by <b>Renwa</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://hackerone.com/hacktivity?querystring=CSRF&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">A list of disclosed reports of real-world CSRF examples</a> on <b>Hackerone Hacktivity</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://medium.com/intigriti/how-i-hijacked-your-account-when-you-opened-my-cat-picture-9a0a0acca9e8?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank" rel="noopener noreferrer nofollow">Account takeover via CSRF by sharing a cat picture</a> by <b>Matti Bijnens</b></p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>If you&#39;re interested in levelling up your bug bounty game, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server for recon:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank"><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> m.do.co/c/7b360ceed203 </p></div><img class="embed__image embed__image--right" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/></a></div><ul><li><p class="paragraph" style="text-align:left;">Help <b>automate your vulnerability and recon scans </b>with<b> less effort </b>using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Cloud-based Web & API Security Scanning. Simplified - Nova Security </p><p class="embed__description"> Cloud-based next-gen vulnerability scanners to keep your online business safe 24/7! Start securing your website now! </p><p class="embed__link"> novasec.io/?ref=newsletter </p></div></a></div><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed & learned something new from this post!</p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email directly </b>or <b>send me via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-csrf-exploitation"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=207cfa3f-5c1e-4bef-a36d-7465a35a3160&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Cross-Site Request Forgery (CSRF): Understanding CSRF vulnerabilities</title>
  <description>Ultimate Guide into Understanding and Identifying Cross-Site Request Forgery Vulnerabilities</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a4b6f010-af9a-41fa-b4df-dbff8a4a2ee5/image.png" length="60306" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/cross-site-request-forgery</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/cross-site-request-forgery</guid>
  <pubDate>Mon, 23 Jan 2023 12:37:00 +0000</pubDate>
  <atom:published>2023-01-23T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="Ultimate Guide into Understanding and Identifying Cross-Site Request Forgery Vulnerabilities" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a4b6f010-af9a-41fa-b4df-dbff8a4a2ee5/image.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>7,6 min</b></span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Last few weeks we&#39;ve seen Broken Access Control vulnerabilities, how to identify + exploit various cases.In the coming weeks, we&#39;re going to dive deeper into <b>Cross-Site Request Forgery</b> vulnerabilities!In today&#39;s post, we will mainly focus at what CSRF vulnerabilities are and how they arise, next week will all be about exploitation!</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b>The attack surface management & vulnerability detection platform that finds vulnerabilities before you do.<b>Waitlist is open, join today ===&gt; </b><b><a class="link" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></p><h2 class="heading" style="text-align:left;"><b>Cross-Site Request Forgery:</b></h2><p class="paragraph" style="text-align:justify;"><b>Cross-Site Request Forgery</b> (or <b>CSRF</b>) are vulnerabilities that allow attackers to conduct actions on behalf of the victimNow do not confuse this with IDORs (or BAC issues in general) as CSRF happens after deceiving a victim into clicking a malicious linkLet&#39;s take a look at a simple example to understand it even betterImagine this...You&#39;ve logged into your second test accountAnd you&#39;re now testing a feature that allows you to send messages to other users and whenever you click on the &quot;Send&quot; button, the following HTTP request gets sent:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/21fb6eff-d46f-4d00-b99e-39560cae4245/image.png"/><div class="image__source"><span class="image__source_text"><p>Guess what other vulnerability type might be exploitable here ;)</p></span></div></div><p class="paragraph" style="text-align:justify;">In the image above, we can see a <b>GET request</b> with <b>2 query parameters</b>Now again imagine if we change those 2 query parameters&#39; values and open the link using our first test accountCorrect, it will perform the same action but on our first account (victim), <b>resulting in sending messages to anyone on the first test account&#39;s behalf without the victim&#39;s knowledge</b>.Now of course this is a simple case of a CSRF vulnerabilityAnd the impact depends on how important the messaging feature wasIn some cases, CSRF vulnerabilities can even lead to account takeovers (imagine if you could apply the same method as above but change the user&#39;s email address or password!)However, the chances of finding these kinds of CSRFs are slim as most applications have some form of CSRF protectionBut don&#39;t worry about that, next week we will go over various exploitation approachesLet&#39;s first look at how you can easily identify these + how these issues often arise</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Identifying CSRF vulnerabilities:</b></h2><p class="paragraph" style="text-align:justify;"><b>Any (privileged) function that performs some kind of action</b> (like modification of data) can be <b>potentially vulnerable to CSRF</b>However, there are a few conditions that must be met to make it exploitable:</p><ol start="1"><li><p class="paragraph" style="text-align:left;">First of all, you should find a privileged action. One that can modify, add or delete data such as changing a user&#39;s email address or sending a message or even sending/verifying transactions</p></li><li><p class="paragraph" style="text-align:left;">The second thing is your session ID (the ID with which a web application can verify your account and privileges) should be a <b>cookie</b> (with SameSite disabled) or <b>HTTP Basic/certificate-based authentication</b> should be used so that the <b>browser automatically adds the authentication data to the request</b>.</p></li><li><p class="paragraph" style="text-align:left;">The last condition is that the <b>request should not contain any kind of value that is unpredictable</b> (such as in a query parameter or request header)</p></li></ol><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">SameSite cookie policy is a security feature that instructs modern browsers to decide <b>whether to add cookies in all requests</b> or <b>only in the requests coming from the web application itself</b></p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Most modern browsers automatically set the SameSite=Lax attribute to cookies (even if the SameSite attribute is not set).</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">This option makes sure that cookies are sent when a user <b>navigates</b> (via a link for example) to the origin site but not when loading images or frames from a third-party site</p><figcaption class="blockquote__byline"> SameSite Cookies </figcaption></blockquote></div><p class="paragraph" style="text-align:justify;">Besides these 3 conditions, there are also some other factors that play a role in whether for example, an API endpoint is vulnerable to CSRF or notBut also the <b>request method</b> and <b>content type</b> that the API accepts (this will become more clear once we start looking at exploiting CSRF attacks)Now you may think that it&#39;s super hard to find an exploitable case because of all the requirements, but understand that:</p><ul><li><p class="paragraph" style="text-align:left;">Even if the web application only sends a specific type of request to an endpoint, it is possible that the endpoint also accepts <b>other request methods</b> or <b>content types</b></p></li><li><p class="paragraph" style="text-align:left;">The <b>request method</b> can sometimes be <b>overridden</b> using query parameters or HTTP request headers</p></li><li><p class="paragraph" style="text-align:left;"><b>Not every query parameter</b> you see in a request (even the ones that have unpredictable values)<b> is required</b> to be supplied</p></li><li><p class="paragraph" style="text-align:left;">You can automate the process of crafting a working CSRF proof of concept</p></li></ul><p class="paragraph" style="text-align:justify;">But again, this will become all clear in the next post when we learn to exploit and craft our CSRF payloads</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://owasp.org/www-community/attacks/csrf?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Cross-Site Request Forgery Attacks</a> by <b>OWASP</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/csrf?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">A guide + labs to learn more about CSRF vulnerabilities</a> by <b>Portswigger Academy</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Learn more about what SameSite cookies are</a> by <b>MDN</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/csrf/bypassing-samesite-restrictions?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Bypassing SameSite cookie restrictions</a> by <b>Portswigger Academy</b></p></li></ul><p class="paragraph" style="text-align:justify;">Don&#39;t worry, way more resources in next week&#39;s post ;)!</p><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>If you&#39;re interested in leveling-up your bug bounty gameI can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your <b>Virtual Private Server </b>for<b> recon</b>:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div><ul><li><p class="paragraph" style="text-align:left;">Help <b>automate your vulnerability and recon scans </b>with<b> less effort </b>using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Automated Web Security Scanning Simplified - NOVA SECURITY </p><p class="embed__description"> Actively search for vulnerabilities 24/7 using next-gen automated security tools! Start securing your website now! </p><p class="embed__link"> https://novasec.io/?ref=newsletter </p></div></a></div><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed & learned something new from this post!If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!Have a nice day and see you in the next post!You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#222222;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-request-forgery-csrf-understanding-csrf-vulnerabilities"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=c04a5847-679e-403d-805a-8ed18206546a&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Broken Access Control (BAC): Advanced IDOR exploitation</title>
  <description>The Ultimate Guide into Finding &amp; Exploiting More IDORs!</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/34e35ffc-d799-4dd7-8131-27e3a3732e5f/Frame_1__3_.png" length="52966" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control-advanced-idor-exploitation</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control-advanced-idor-exploitation</guid>
  <pubDate>Mon, 16 Jan 2023 14:45:00 +0000</pubDate>
  <atom:published>2023-01-16T14:45:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="The Ultimate Guide into Finding & Exploiting More IDORs!" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/34e35ffc-d799-4dd7-8131-27e3a3732e5f/Frame_1__3_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>11,5 min</b></span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Last week we went over <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control-idor-exploitation?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">various different IDOR cases</a> and how you can exploit each one of them.In this week&#39;s issue, we are going to look at <b>more advanced (and harder-to-spot) IDOR vulnerabilities</b>.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b>The attack surface management & vulnerability detection platform that finds vulnerabilities before you do.<b>Waitlist is open, join today ===&gt; </b><b><a class="link" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></p><h2 class="heading" style="text-align:left;"><b><b>Advanced IDOR exploitation:</b></b></h2><h3 class="heading" style="text-align:left;"><b>&quot;Object-based&quot; IDOR:</b></h3><p class="paragraph" style="text-align:justify;">Most APIs that you&#39;ll come across nowadays are REST APIsThese kinds of APIs often accept data in the form of a JSON object and sometimes developers mess up with handling this dataAnd you can use this to your advantageLet&#39;s go through some examples belowYou surely have seen this kind of request before:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/34ce5b14-3286-44a5-b71a-57f0f318a52d/image.png"/></div><p class="paragraph" style="text-align:justify;">In the above request, we tried to update the data of our second test account (using our first test account)And as you can see, it of course returned a 401 UnauthorizedNow it is possible for us to <b>wrap the user ID in an array</b> and with that <b>supply</b> <b>multiple IDs</b>:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6291df20-a1bd-443d-a506-faa5d4b87a7f/image.png"/></div><p class="paragraph" style="text-align:justify;">Now, depending on how to backend might handle it, it can <b>update the data for both users</b> just like in this caseYou can also map it into another JSON object (example of the POST body):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/77bcea84-0b70-42cb-8bc4-c50760218e22/image.png"/></div><p class="paragraph" style="text-align:justify;">Or use a boolean (be careful with this):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/1efa943a-f119-4ff2-a75b-460dce37a5ee/image.png"/></div><p class="paragraph" style="text-align:justify;">You can try various other things such as:</p><ul><li><p class="paragraph" style="text-align:left;">replacing the user ID with a very large digit: <b>123500000</b></p></li><li><p class="paragraph" style="text-align:left;">adding zeros in front of the user ID: <b>000001235</b></p></li><li><p class="paragraph" style="text-align:left;">replacing the user ID with a negative digit: <b>-1</b> or <b>-1235</b></p></li><li><p class="paragraph" style="text-align:left;">replacing the user ID with a decimal number: <b>1235.0</b></p></li><li><p class="paragraph" style="text-align:left;">passing multiple user IDs as a string value separated by a comma: <b>&quot;1234,1235&quot;</b></p></li><li><p class="paragraph" style="text-align:left;">replacing the user ID with a wildcard or a percentage sign (again, be careful with this if you&#39;re testing it on features that update/delete data): <b>&quot;*&quot;</b> or <b>&quot;%&quot;</b></p></li></ul><p class="paragraph" style="text-align:justify;">These are just a few examples and I recommend trying all of these outAnd depending on your target, it can result in an IDOR vulnerability</p><h3 class="heading" style="text-align:left;"><b>Multi-step IDOR:</b></h3><p class="paragraph" style="text-align:justify;">These types of IDORs can often easily be exploited as they are sort of &quot;hidden&quot; behind the first pageBasically, the vulnerable API endpoint is used AFTER you complete a step or a series of stepsFor example, say you got a target that has a feature that allows you to send in your details and apply for job offers:1) You fill in the first form and click next (data gets saved in the background as a draft application, but no IDOR on the auto-save endpoint)2) You submit your application (data gets saved another time, no IDOR on this new endpoint)3) In the last step, you get to review your details before submitting the final application (data gets saved but no authorization checks are set in place &gt;&gt;&gt; IDOR on this last endpoint)From the example above, we had to go through a series of steps that all looked secure but the last step (reviewing and submitting final changes) did not properly check for any authorizationThese are multi-step IDORs and can easily be exploited if you understand the target you&#39;re testing well enough</p><h3 class="heading" style="text-align:left;"><b>Second-Order IDOR:</b></h3><p class="paragraph" style="text-align:justify;">Second-Order IDORs are IDOR vulnerabilities but the only difference here is that the web app uses your input to <b>indirectly reference an object or resource</b>.<b>Your ID gets stored first</b>, and then <b>used later to reference a data resource.</b>There are a lot of different cases like these but I will only go over 1 case in this article (check the <b>additional resources</b> section for another case of this type)I found this special case a while ago where an API reflected my input without any validation in the path of an internal-only API request It allowed me to make HTTP requests on behalf of the backend API (SSRF) and unfortunately, there was nothing that I could chain this with except the IDORLet&#39;s first understand how this case of IDOR can arise as it will help you understand how you can identify these easily as wellMost companies today tend to separate their web project into components (or layers, it&#39;s called a &quot;multi-tier&quot; or an &quot;n-tier architecture&quot;)And the thing here is, when user data is passed without any type of validation to another layer (or service), it may introduce weird (and exploitable) behaviour, just like in this caseNow one thing to mention is that I found this on 1 single API endpoint, the other endpoints seemed to URL encode my input first before forwarding it to the internal API (I recommend checking for all API endpoints)Let&#39;s take a look at a simple diagram:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/abbf60b0-ac0e-4c09-94c9-7e714a444613/image.png"/></div><p class="paragraph" style="text-align:justify;">When I requested my profile data, a <b>POST request was sent to the API</b>Next, the request got <b>forwarded to the internal API</b>, and afterwards, the internal API retrieved my info from the database and returned it backAnd as you might have noticed, the user ID got reflected in the path <b>but without any validation</b>This gives us 2 options:</p><ul><li><p class="paragraph" style="text-align:left;">We could either inject a new line feed character and request any other resource on behalf of the internal API</p></li><li><p class="paragraph" style="text-align:left;">Or we could traverse paths and retrieve another user&#39;s ID</p></li></ul><p class="paragraph" style="text-align:justify;">At first, I tried exploiting the SSRF vulnerability:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/b0abad9f-63bc-48d4-8e9b-0289e4886105/image.png"/></div><p class="paragraph" style="text-align:justify;">And now you may ask how I came up with thisI simply tried injecting a path and it returned a 404 (you could also try passing a hash fragment, a query parameter and/or URL encode your input):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f4a1e0cc-8da4-4320-8e15-ee68b90974a2/image.png"/></div><p class="paragraph" style="text-align:justify;">The second option is traversing paths like below:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2e5d3847-c8c6-4b27-94fa-b91f586178b6/image.png"/></div><p class="paragraph" style="text-align:justify;">And depending on the target, it can be vulnerable if there are no authorization checks put in place on the internal APIThis is most likely when <b>the API does not forward the authorization header</b> for exampleThis is just one case of a second-order IDOR why my user input was used in a second query without any validation</p><h3 class="heading" style="text-align:left;"><b>&quot;ID-less&quot; IDOR:</b></h3><p class="paragraph" style="text-align:justify;">ID-less IDORs are just like any other IDOR vulnerabilities <b>however, they are a bit harder to spot.</b>Let me explainSay you have a target that you&#39;re testing out and looking at the intercepted requests, you keep seeing that all your profile data gets retrieved from the following API endpoint (<i>this is just an example, there are many other variations</i>):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d9783feb-d783-4afe-9961-2f4a81055be0/image.png"/></div><p class="paragraph" style="text-align:justify;">If you haven&#39;t noticed yet, the <b>&quot;current&quot; keyword is a reference to your account</b>But in the response, we can also see that there&#39;s a customer ID in thereAnd you may have already guessed it, sometimes replacing the <b>&quot;current&quot; keyword with your ID</b> will return<b> the same response</b>:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f125b47d-0afe-4ea1-a438-44c78e5ed274/image.png"/></div><p class="paragraph" style="text-align:justify;">And if it did (in your case), then it may be <b>vulnerable to IDOR</b>Now let&#39;s be real, chances to find an IDOR on such a critical endpoint are very slimThat&#39;s why you should look furtherSo here&#39;s what I did:I found the exact same case a while ago, I replaced the current keyword with my ID (that I retrieved from my response) and got the same response (if you receive a 404 Not Found status, know that the ID is ineffective on that endpoint and try other identifiers such as your email)So I went ahead and changed the ID to my second account&#39;s ID and as you might&#39;ve guessed, I faced a 401 UnauthorizedBut instead of stopping there, you should try<b> the same technique on other API endpoints</b>I did just like that and found that I was able to remove 2FA from my second account</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://ozguralp.medium.com/a-less-known-attack-vector-second-order-idor-attacks-14468009781a?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Another example of a second-order IDOR vulnerability</a> by <b>Ozgur Alp</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://inonst.medium.com/a-deep-dive-on-the-most-critical-api-vulnerability-bola-1342224ec3f2?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">A deep dive into Broken Access Control Vulnerabilities</a> by <b>Inon Shkedy</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/access-control/idor?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">An IDOR Lab by Portswigger to test for IDORs</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://twitter.com/search?q=%23bugbountytips+%22IDOR%22&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">A Twitter search query for IDOR bugbountytips</a> (writeup links often get shared on Twitter, recommend taking a look there for any resource you need)</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed & learned something new from this post!</p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div><ul><li><p class="paragraph" style="text-align:left;">Help <b>you save time</b> & <b>earn more bounties</b> using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-advanced-idor-exploitation" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Cloud-based Web &amp; API Security Scanning. Simplified - Nova Security </p><p class="embed__description"> Cloud-based next-gen vulnerability scanners to keep your online business safe 24/7! Start securing your website now! </p><p class="embed__link"> https://novasec.io/?ref=newsletter </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=ee0799f9-68a6-4f53-9f1f-f33cabe37b2b&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Broken Access Control (BAC): IDOR exploitation</title>
  <description>The Ultimate Guide into Finding &amp; Exploiting More IDORs!</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/34e35ffc-d799-4dd7-8131-27e3a3732e5f/Frame_1__3_.png" length="52966" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control-idor-exploitation</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control-idor-exploitation</guid>
  <pubDate>Mon, 09 Jan 2023 12:40:00 +0000</pubDate>
  <atom:published>2023-01-09T12:40:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="The Ultimate Guide into Finding & Exploiting More IDORs!" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/34e35ffc-d799-4dd7-8131-27e3a3732e5f/Frame_1__3_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>13 min</b></span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Last week we saw a brief <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">introduction to broken access control issues</a>, what they are in general and where they often are present in web applications.Today we are going to dive deeper into IDORs. IDORs are easy to spot but most people aren&#39;t finding them because they aren&#39;t looking where they should be.That&#39;s why I made these posts. By the end of these, you will be able to <b>find way more IDORs</b>. I highly recommend also reading all the articles I attached in the additional resources section.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b>The attack surface management & vulnerability detection platform that finds vulnerabilities before you do.<b>Waitlist is open, join today ===&gt; </b><b><a class="link" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></p><h2 class="heading" style="text-align:left;"><b>Insecure Direct Object Reference:</b></h2><p class="paragraph" style="text-align:justify;">IDOR vulnerabilities arise when the web app you&#39;re testing accepts & uses user input to get back or update a data entry without validating if that supplied ID is in fact yours.As a new bug bounty hunter, you&#39;ll notice that despite all the claims that this vulnerability type is easy to spot, you still can&#39;t find an IDOR vulnerability.<b>And that&#39;s okay, </b>to find more IDORs you should <b>spend more time on targets</b> that have a <b>large code-base</b> + should focus on <b>newly introduced features or forgotten/less-accessible features</b>. As these will often contain such vulnerabilities (they usually haven&#39;t been tested before).For example:• Instead, of looking for IDORs on your profile (a heavily tested functionality), look for them under your backup settings (a less exposed place).• Instead of focusing on the main feature (posting an image), look at the options it has (editing posts or images).• Instead of focussing on editing the post, look at the auto-backup feature.• Instead of testing a feature that has been tested over and over again, test that newly implemented 2FA security feature.See a trend here now? GoodNow that we&#39;ve clarified where to look for IDORs, let&#39;s start with looking at <b>some basic IDOR examples</b> and in the <b>next post look at some more advanced and harder-to-spot </b>cases (this will be sent next week)!</p><h3 class="heading" style="text-align:left;"><b>Basic IDOR:</b></h3><p class="paragraph" style="text-align:justify;">Basic IDOR vulnerabilities are where we can easily change a predictable identifier (ID) such as a numeric int value with another ID.Let&#39;s take a look at a small example. Our current account has the user ID of &quot;1234&quot;.Making the following request should allow us to return the data of another user, in this case, our second test account.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/97a169a4-6cff-4ced-9bd4-2979fc4fbe71/image.png"/></div><p class="paragraph" style="text-align:justify;">It&#39;s sometimes just as easy as that, but it can get trickier.Let&#39;s go through some more cases.</p><h3 class="heading" style="text-align:left;"><b>UUID-based IDOR:</b></h3><p class="paragraph" style="text-align:justify;">More and more web apps start to enforce the use of UUIDs because they aren&#39;t predictable and can not be brute-forced in any way.If you are unfamiliar with what a UUID is, no issue below is an example of one:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/31d8337e-7858-47da-b8ef-e68c30691120/image.png"/></div><p class="paragraph" style="text-align:justify;">However, this shouldn&#39;t be seen as the only measure against IDOR vulnerabilities. As many times, these UUIDs can be retrieved or returned back in the response in another way (or form).Say we got the following API endpoint: <b>/api/users/{UUID}</b></p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/b0e9d6e7-58d2-4034-82c9-292577468f4d/image.png"/></div><p class="paragraph" style="text-align:justify;">Making a GET request to that endpoint returns all data associated with that user. However, upon taking a closer look at the response returned back, we can see a <b>second user ID</b>. One that is predictable.What we could do now to exploit this IDOR is 1) <b>try replacing the UUID with the numeric ID</b> and 2) <b>find the UUID referenced elsewhere in the web application</b>.The first option is easy, we simply send the following GET-based request and <b>check whether the same information is returned</b>, and apparently, <b>it is</b>:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ad41b2e8-fd18-4a09-9dac-4191ce2e7f6b/image.png"/></div><p class="paragraph" style="text-align:justify;">The second option involves us looking for our UUID in the responses. One way to do so is by using our proxy interceptor and <b>searching for our UUID</b> and <b>afterwards looking for other users&#39; UUIDs at the same place</b>.Another way is to just simply to check common places where that UUID may get leaked. For example, public profiles, built-in messaging features (they have to identify the receiver in one way, right?), profile pictures, etc.You could also look for these on <b>public sources</b> such as the Wayback Machine (archive of the internet) or search engines such as Google, Bing, etc.Don&#39;t worry if you are unfamiliar with using public sources, here&#39;s an example.Say we are looking for more UUIDs, all we got to do in this case is use search filters and search on Google and Bing: &quot;<b>site:api.example.com inurl:/api/user</b>&quot;You could also search the <b>internet archive for any archived UUIDs</b>. Simply visit <a class="link" href="https://archive.org/web?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">archive.org/web</a> and submit the URL, afterwards look at the saved URLs as that is where you would want to look.</p><h3 class="heading" style="text-align:left;"><b>Method-based IDOR:</b></h3><p class="paragraph" style="text-align:justify;">Before I tell you how to test for this type of IDOR, let&#39;s first take a look at a small code snippet. It&#39;ll help you understand why and where these types of misconfigurations often arise.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/dd69f7ba-ab13-4d50-9905-0b428013fd36/image.png"/></div><p class="paragraph" style="text-align:justify;">As you can see in the above image, 1 route is defined: <b>/api/messages/{ID}</b>However, it accepts <b>2 HTTP methods</b>, one function accepts the <b>POST method</b>, and the other one the <b>DELETE method </b>(both functions are able to delete the message).And as you might have noticed, the <b>POST method does enforce the authentication & authorization checks</b>. Meanwhile, the <b>DELETE method</b> <b>does not</b>.This is often the case when <b>new API endpoints are added</b>. Developers forget about implementing the right authentication & authorization checks and it doesn&#39;t get caught until you find & report it.Getting back to the example. Sending a <b>POST request</b>, like below, to delete another message ID (that isn&#39;t yours, like &quot;1235&quot;) will return a <b>401 Unauthorized</b>.Meanwhile sending a <b>DELETE</b> <b>request</b> to the same endpoint, will delete the other message and return <b>200 OK</b>.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3688668e-c62b-4503-b7ed-65463fa5bb29/image.png"/></div><p class="paragraph" style="text-align:justify;">I also recommend trying and <b>changing the content type of your request body </b>as sometimes, the same can happen here as well.</p><h3 class="heading" style="text-align:left;"><b>IDOR through outdated API Version:</b></h3><p class="paragraph" style="text-align:justify;"><b>This is also applicable to different API versions. </b>For example, say the <b>/api/v2/message</b> endpoint did not allow you to delete the message using the DELETE method.Trying an older API version such as<b> /api/v1/message</b> might allow you to do so easily:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6ddb2917-851b-4cfe-9cef-1028a9a97e59/image.png"/></div><p class="paragraph" style="text-align:justify;">This is often the case when a new version of an endpoint gets introduced, but the older one is still accessible.</p><h3 class="heading" style="text-align:left;"><b>IDOR through parameter pollution:</b></h3><p class="paragraph" style="text-align:justify;">Parameter pollution is basically supplying <b>the same parameter name multiple times</b> in a request (each with a different value).And depending on the service that is running and accepting/parsing the parameters, it may <b>concatenate the values</b>, <b>only read the first value</b> or <b>only read the last one</b>.This <b>behaviour can be used to evade certain filters to still retrieve other users&#39; data</b>. That is why it is important to also test for parameter pollution when testing for IDOR vulnerabilities.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/56e9d7c5-3bb1-4998-8780-8936670ddb78/image.png"/></div><h3 class="heading" style="text-align:left;"><b>IDORs in GraphQL:</b></h3><p class="paragraph" style="text-align:justify;">As in other services, GraphQL can also be misconfigured and contain IDOR vulnerabilities (and much more).Exploitation however is sometimes much harder as you need to identify the <b>queries</b> and <b>mutations</b> (sort of like methods/functions to identify what action to conduct) available + craft a valid request.Sometimes, the <b>Introspection Query</b> (you ask GraphQL to return all information about what queries it supports) is enabled, and with that, you should be able to list all available operations.If that is not the case, you could also make use of the <b>built-in autocomplete feature</b>.<b> </b>As with that, you&#39;ll also be able to enumerate more operation names just by supplying a few common keywords.However, if both features are disabled, I recommend going through the whole application and using each and every functionality available + reading javascript files as they also often contain operation names.With that, you should be able to enumerate all operation names and test each one of them without any issues. <b>Sometimes it&#39;s just replacing an ID with another ID.</b></p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">I recommend using <a class="link" href="https://portswigger.net/bappstore/296e9a0730384be4b2fffef7b4e19b1f?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">InQL Burpsuite extension</a> for manually testing IDORs as it makes it a lot easier to test GraphQL!</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://16521092.medium.com/some-ways-to-find-more-idor-da16c93954e5?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Find more IDORs</a> by <a class="link" href="https://twitter.com/thaivd98?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">@thaivd98</a> (some very interesting cases)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://www.notion.so/IDOR-Attack-vectors-exploitation-bypasses-and-chains-0b73eb18e9b640ce8c337af83f397a6b?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">A Notion DB to find more IDORs</a> (you don&#39;t need Notion to view it)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://vickieli.medium.com/how-to-find-more-idors-ae2db67c9489?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Find more IDORs</a> by @<a class="link" href="https://twitter.com/vickieli7?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">vickieli7</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://www.aon.com/cyber-solutions/aon_cyber_labs/finding-more-idors-tips-and-tricks/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Tips and Tricks for finding more IDORs</a> by AON.com</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://medium.com/@nynan/what-i-learnt-from-reading-220-idor-bug-reports-6efbea44db7?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Top 220 IDORs found</a> by <a class="link" href="https://twitter.com/_nynan?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">@_nyan</a> (highly recommend going through all disclosed Hackerone reports)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://corneacristian.medium.com/top-25-idor-bug-bounty-reports-ba8cd59ad331?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">Top 25 IDOR reports</a> (again, read all 35 disclosed reports, it will help you understand IDORs!)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://owasp.org/www-project-web-security-testing-guide/latest/4-Web_Application_Security_Testing/07-Input_Validation_Testing/04-Testing_for_HTTP_Parameter_Pollution?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">More info about HTTP Parameter Polution</a> by OWASP (learn more about HPP vulnerabilities)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://graphql.org/learn/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">An official introduction to GraphQL</a> by GraphQL (recommended if you want to get really into GraphQL hacking)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://blog.yeswehack.com/yeswerhackers/how-exploit-graphql-endpoint-bug-bounty/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">A detailed blog post all about exploiting GraphQL</a> by <a class="link" href="https://twitter.com/yeswehack?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">@Yeswehack</a> (has the introspection query)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://twitter.com/search?q=%23bugbountytips+%22IDOR%22&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank" rel="noopener noreferrer nofollow">A Twitter search query for IDOR bugbountytips</a> (writeup links often get shared on Twitter, recommend to take a look there for <b>any resource you need</b>)</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In next week&#39;s issue, I will go through <b>advanced IDOR exploitation techniques</b>! Stay tuned!</p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div><ul><li><p class="paragraph" style="text-align:left;">Help <b>you save time</b> & <b>earn more bounties</b> using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-idor-exploitation" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Automated Web Security Scanning Simplified - NOVA SECURITY </p><p class="embed__description"> Actively search for vulnerabilities 24/7 using next-gen automated security tools! Start securing your website now! </p><p class="embed__link"> https://novasec.io/?ref=newsletter </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=2061b132-8e91-4632-ac71-07e2bf2b6fb9&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Broken Access Control (BAC): Understanding BAC vulnerabilities</title>
  <description>Ultimate Guide into Understanding and Identifying Broken Access Control Vulnerabilities</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a368a32a-f1e1-470e-a446-e5cb5f6f57d0/Frame_1__2_.png" length="69242" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/broken-access-control</guid>
  <pubDate>Mon, 02 Jan 2023 15:00:00 +0000</pubDate>
  <atom:published>2023-01-02T15:00:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="Ultimate Guide into Understanding and Identifying Broken Access Control Vulnerabilities" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a368a32a-f1e1-470e-a446-e5cb5f6f57d0/Frame_1__2_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>12 min</b></span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">We&#39;ve seen XSS vulnerabilities first as they are easy most of the time easy to spot.In the coming weeks, we&#39;re going to dive deeper into <b>Broken Access Control vulnerabilities</b>!They are generally also very easy to spot, as long as if you know what you&#39;re looking for, and are by nature, often high-severity vulnerabilities!Simply put, <b>BAC</b> or <b>B</b>roken <b>A</b>ccess <b>C</b>ontrol vulnerabilities <b>allow you to access and/or make changes to (sensitive) data, and functionalities or pages without being authorized to do so.</b>A simple example would be <b>you</b> having access to <b>order details of (all other/) another client on an online e-commerce webshop without their knowledge</b>.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b>The attack surface management & vulnerability detection platform that saves you time, and earns you more bounties.<b>Waitlist is open, join today ===&gt; </b><b><a class="link" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></p><h2 class="heading" style="text-align:left;"><b>Broken Access Controls:</b></h2><p class="paragraph" style="text-align:justify;">Access controls are present within an application to prevent unauthorized users from accessing certain pages of functions.However, sometimes it is quite possible that during the implementation of a new feature, these access controls get forgotten about.<b>That&#39;s why you should always aim at looking for vulnerabilities in new features as a beginner.</b></p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">Some people mix up these terms quickly and it should be mentioned that these two terms <b>authorization</b> and <b>authentication </b>are <b>NOT</b> the same.</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;"><b>Authentication</b>: Identifies the user and validates their identity (usually during the login process for example)</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Meanwhile</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;"><b>Authorization</b> checks whether you have the correct privileges to conduct an action or access data or a page (often after the login process, say only an admin user has access to certain pages or can edit blog posts).</p><figcaption class="blockquote__byline"> Authorization vs Authentication </figcaption></blockquote></div><p class="paragraph" style="text-align:left;">Now that we covered what access control issues are and where they usually originate from, let&#39;s take a closer look at what kind of shapes and forms they can all come in.In next week&#39;s post, I will continue with this topic by explaining <b>more in detail</b> <b>where you can find them</b> and <b>what payloads you can use</b>.</p><h2 class="heading" style="text-align:left;"><b>Vertical Access Control issues:</b></h2><p class="paragraph" style="text-align:justify;">Vertical access control issues are very easy to understand as the name says it all.You <b>elevate your privileges vertically.</b>So what does that mean? Let&#39;s take a look at a small example.Say you found a vulnerability that allowed you to take over any user account. Taking over an <b>admin or staff account</b> would <b>elevate your privileges vertically</b> as those types of accounts often have <b>way more access</b> than standard user accounts do.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Insecure Direct Object Reference (IDOR) issues:</b></h2><p class="paragraph" style="text-align:justify;"><b>I</b>nsecure <b>D</b>irect <b>O</b>bject <b>R</b>eference or <b>IDOR</b> vulnerabilities are a form of <b>horizontal access control issues</b>.IDORs are usually found in APIs and websites. Exploitation often includes changing an account identifier to someone else&#39;s.Don&#39;t worry if you didn&#39;t fully get it, let&#39;s take a look at a quick example below:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f96b5091-7723-4340-b554-7e7f71757f32/Computer_A__2_.png"/></div><p class="paragraph" style="text-align:justify;">In the image above, we can see the front end making a request to the API to fetch our user data.However, if we examine the request more carefully, we can see that a user ID is supplied as a request parameter.<b>Removing the query parameter</b> returns a <b>400 Bad Request</b>, which tells us that <b>the parameter is used by the backend to fetch our data</b>!Supplying <b>another user ID</b> of our <b>second test account</b> confirms that this particular API endpoint is <b>vulnerable to IDOR</b> as it <b>returns the user data associated with the second account</b>.This is a <b>major issue</b> as anyone can <b>view the private data of other users without being authorized</b>.Besides reading data, IDORs can also allow us to <b>modify</b>, <b>create</b> or even <b>delete</b> <b>someone else&#39;s data without being authorized to do so</b>.Another thing to note is that user identifiers or user IDs can come in multiple forms and shapes. IDs can sometimes be email addresses, UUIDs, hashes or even signatures.It is always recommended to look at a request very carefully for any IDs.Do remember that <b>IDORs usually lead to vertical access control issues</b>.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>File-based access control issues:</b></h2><p class="paragraph" style="text-align:justify;">To view certain (sensitive) files, you must have the right privileges in order to view them.At least, that&#39;s what should happen. However, this is not always the case.Sometimes, developers deploy code to their hosting platform (such as Amazon S3 or Google GCP, etc.) or place sensitive configuration files in the same folder where the website is hosted.When this is the case, and no single server rule is set to block anyone from reading the file contents, it&#39;ll give you access to sensitive web config files or sometimes even backup files.This is sometimes the case for web config, GIT config data & htaccess/htpasswd files for example. These files often contain sensitive server configuration data and are not meant to be public.The same case for backup files (which often contain full source code of the backend for example).Very recently, I found a JAR file referenced in one of the javascript files which was obtained via a very unique approach (I will tell you more about it in a few weeks or so).It turned out that each new version of the compiled JAR file gets uploaded with the Java application.I was able to download and decompile it locally. It gave me access to the entire source code of the app (pentesting a web application when you have the source code is way easier and often allows you to find vulnerabilities that are very hard to find).File-based access control issues do not stop here, it is sometimes possible to get access to an unprivileged part of the web application through <b>forced browsing</b>.This attack often revolves around navigating to the <b>path</b> or <b>file directly </b>and with that <b>bypassing any set restrictions</b>.No issue if you didn&#39;t fully get it. Let me explain to you with a simple illustration:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ae16ab07-cd2a-4a27-9dce-e4e2e9dd04a6/Computer_A__3_.png"/></div><p class="paragraph" style="text-align:justify;">As we can see in the image above, requesting the <b>/admin</b> route will redirect us back to <b>/admin/login</b> (watch the Location response header).Now say we did our homework today and found through content discovery another route called <b>/admin/dashboard</b>. Navigating it resulted in a <b>200 status code</b> with a <b>huge response body </b>(meaning that we most likely successfully bypassed the login interface and got <b>unauthorized access to the admin dashboard</b>).This technique can be used in many examples, such as for example <b>bypassing 2-factor authentication pages</b>, <b>email verification</b>, etc.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Access control issues via controllable request parts:</b></h2><p class="paragraph" style="text-align:justify;">Say, for example, a developer added for development purposes a query parameter that when supplied, would bypass an authentication form or display more and expose you to more functions or data than normal.For example, navigating to <b>/dashboard</b> would return you to your dashboard as usual, however, passing the <b>?debug=1</b> query parameter & navigating to <b>/dashboard?debug=1</b> suddenly returns a lot of sensitive configs & debug data.Sometimes, web apps may allow you to view certain pages based on a <b>request header</b> such as the <b>Referer</b> header. <a class="link" href="https://portswigger.net/web-security/access-control?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities#referer-based-access-control" target="_blank" rel="noopener noreferrer nofollow">Portswigger Labs has a perfect example of it.</a>I&#39;ve personally never encountered this with the Referer header before except with some custom headers that gave me access to other endpoints. You often find them referenced in JavaScript files.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Location-based access control issues:</b></h2><p class="paragraph" style="text-align:justify;">This is a more uncommon or less detectable access control issue as your device&#39;s location matters.Basically, if your public IP matches a certain whitelist that the organization or company has set up, then you may get access to additional features that are only available in a specific country or region.You can test these by using different VPNs.I personally encountered this type of access control issue only once and I realized it was location-based after the triager couldn&#39;t reproduce my previously found vulnerabilities.It turned out that they whitelisted a public IP space and mine was included in it (I couldn&#39;t access the vulnerable staging website with a VPN for example).</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/access-control?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">A more in-depth article with some more examples of access control vulnerabilities</a> from Portswigger (<b>including labs</b>)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://owasp.org/www-community/Broken_Access_Control?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">OWASP&#39;s Broken Access control post with some common examples</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://learn.snyk.io/lessons/broken-access-control/javascript/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Broken Access Control examples by Snyck</a></p></li></ul><p class="paragraph" style="text-align:left;">Next week, I will <b>add much more resources</b> and <b>writeups</b> to start finding way more IDORs!</p><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In next week&#39;s issue, I will continue to go through <b>Broken Access Control issues</b>! Stay tuned!</p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div><ul><li><p class="paragraph" style="text-align:left;">Help you <b>save time</b> & <b>earn more bounties </b>using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=broken-access-control-bac-understanding-bac-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Automated Web Security Scanning Simplified - NOVA SECURITY </p><p class="embed__description"> Actively search for vulnerabilities 24/7 using next-gen automated security tools! Start securing your website now! </p><p class="embed__link"> https://novasec.io/?ref=newsletter </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=8ac6ac76-e3a8-4ea1-98ec-2beca8cdb176&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Cross-Site Scripting (XSS): Exploiting XSS vulnerabilities</title>
  <description>The Ultimate Guide In Crafting Payloads And Exploiting XSS Vulnerabilities For Higher Bounties</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/be688e31-9860-457b-922d-c4a165f3a58d/Frame_1.png" length="62006" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/xss-exploitation</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/xss-exploitation</guid>
  <pubDate>Mon, 26 Dec 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-12-26T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="The Ultimate Guide In Crafting Payloads And Exploiting XSS Vulnerabilities For Higher Bounties" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/be688e31-9860-457b-922d-c4a165f3a58d/Frame_1.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is:</span><span style="font-size:1.5rem;"><b> 12 min</b></span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Imagine thisYou found an injection point, spent 2 hours finding a bypass that works and <b>FINALLY</b> got that alert box popupAnd now you&#39;ve got to escalate the XSS to an account takeoverYou look at the cookies, all sensitive ones are HTTPOnly :/You check whether you can change the password, and you notice that the previous password is really requiredYou checked whether you can turn off 2FA, and you see that the current 2FA code is also required...You tried so many ways and conclude that you can&#39;t escalate it any further...In today&#39;s post, I will help you go over plenty of ways how you can escalate XSS vulnerabilities to account takeovers through leaked session cookies, access tokens, and sometimes even to RCE!<b>I will also share some unique findings I found a while back, let&#39;s get into it!</b>Just a small reminder, all the proof of concept code that I share here is just to give you an idea of how you can achieve different tasks. Please adjust the PoC code according to your target for it in order to work.Also, to keep the post length reasonable, it is not possible to include all possible ways to achieve account takeover (as there are plenty of ways to do so). I&#39;ve included the ones that are generally not very known or shared.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13b8a328-1fe7-4ed6-9f58-2a53f36a651a/darkmode_banner.png"/></div><p class="paragraph" style="text-align:center;">Today&#39;s post is brought to you by <b>Nova Security</b>The attack surface management & vulnerability detection platform that saves you time, and earns you more bounties.<b>Waitlist is open, join today ===&gt; </b><b><a class="link" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">https://novasec.io/</a></b></p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Sensitive cookie leak:</b></h2><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">As we&#39;ve seen earlier, HTTP is a stateless protocol, meaning that the server has no idea of the previous request, and if it belonged to you. But to allow servers to identify requests of multiple users, cookies are used (sometimes Authorization header or some other kind of token or identifier).</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">HTTPOnly is basically a cookie security feature that tells your web browser to not allow anyone to read your cookies through client-side code such as JavaScript (think of document.cookie).</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Cookies can only be sent in the request if the cookie policy (that has been set) is satisfied. I won&#39;t go into detail here but do check out the Additional Resources section in this post.</p><figcaption class="blockquote__byline"> What are HTTPOnly cookies? </figcaption></blockquote></div><p class="paragraph" style="text-align:left;">Sometimes, even when cookies are set to HTTPOnly, they can be reflected elsewhere in the application.This is usually due to developers reflecting it in the response body by error or because they need it to be retrieved later (while also enforcing the cookie security).A few ways to look for this are:</p><ul><li><p class="paragraph" style="text-align:left;">Looking in your proxy interceptor&#39;s sitemap for your session cookie&#39;s value (or cookie name). If you do not have Burpsuite Pro, you can also crawl the entire site as an authenticated user and grep for the token in the response body.</p></li><li><p class="paragraph" style="text-align:left;">Checking the response body of the API that returns your profile data (example: /api/v1/me, /api/v1/profile, ...)</p></li><li><p class="paragraph" style="text-align:left;">Checking for any CRLF injections on pages that return your cookie in the <b>Set-Cookie</b> response header (important thing is to make sure your injection point is <b>ABOVE</b> the Set-Cookie header as you need to transform the remaining headers in the response body).</p></li></ul><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/61b96d2b-65ad-4e3b-8d1b-cb0bb00469d2/image.png"/></div><p class="paragraph" style="text-align:justify;">Now, if you&#39;ve found your session cookie being reflected inside the response body, all you&#39;ve got to do is to make an HTTP request to that page. Extract the value using a regex pattern and send it back to your end.Here&#39;s a simple proof of concept code (you may copy this, but do adjust the details first according to your needs):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/8436ec8e-bee4-4ac9-bbde-770fa712b083/image.png"/></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Access Tokens and JWTs:</b></h2><p class="paragraph" style="text-align:justify;">Most modern web applications today are built with front-end JavaScript libraries and frameworks such as React, NextJS, VueJS, Angular, etc.And to keep track of users, they usually don&#39;t make use of cookies but instead, use JSON Web Tokens or access tokens.These are often stored in your web browser&#39;s <b>local or session storage</b> and can be easily accessed via the <b>LocalStorageAPI</b> or <b>SessionStorageAPI</b>.Sometimes, these can even be stored in your <a class="link" href="https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">IndexedDB</a> or <a class="link" href="https://www.w3.org/TR/webdatabase/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Web SQL Database</a> (although that may be much rarer to find).I recommend mapping out all possible ways that the web application may have been used to store your access token.One last note: <b>web applications built using front-end javascript libraries and frameworks are not vulnerable to reflected XSS as they are built differently. By default, they encode all user input before reflecting it. However, this does not protect it from being vulnerable to DOM-based XSS vulnerabilities! If the web application passes your raw input into a DOM source, you may be able to execute javascript.</b></p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/53d4cbd4-97ed-425b-b656-eb26fbd8f4b5/image.png"/></div><p class="paragraph" style="text-align:justify;">If you did find the access token in your local or session storage, all you&#39;ve got to do is use the API to retrieve the token, and send it back to your end:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/0bade941-c4ee-48e2-b51a-a4056f23b845/image.png"/></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Access Tokens and JWTs in PWAs:</b></h2><p class="paragraph" style="text-align:justify;">One thing I&#39;ve encountered in the past was a web application that was built using the NextJS framework.It was vulnerable to DOM-based XSS, but I couldn&#39;t identify any kind of sensitive tokens in the local storage or session storage.However, if you&#39;re familiar with how Progressive Web Applications (PWAs) work, you&#39;d understand that these <b>save user data in the response body as a JSON object </b>(to be retrieved later).</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;"><a class="link" href="https://web.dev/progressive-web-apps/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Progressive Web Apps</a> are websites that look and feel like apps on your phone, and can even work offline (that&#39;s why you see sensitive data getting stored in the response).</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Looks like magic right?</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">It&#39;s the service workers that make this possible.</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">You can think of Service Workers as scripts that run in the background and allow PWAs to intercept network requests, cache assets, and provide offline functionality.</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">Basically, a client-side proxy (a server that forwards requests) that helps pages load way faster.</p><figcaption class="blockquote__byline"> What are Progressive Web Applications? </figcaption></blockquote></div><p class="paragraph" style="text-align:justify;">You can usually identify a PWA using Wappalyzer or by just looking for the &quot;__PWS_DATA__&quot; id in one of the script tags.</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3a2cef52-46cd-45d1-8e41-6adb0fa8a5da/image.png"/></div><p class="paragraph" style="text-align:justify;">All I had to do to obtain all user data (including PII such as the address, full name, phone number etc. + access token to invoke the API), was to read the data from the window property (or make a request to any page). Extract the script tag&#39;s value, and parse its contents using the JSON parse method to retrieve the access token for example. And send it back to my end.</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/1c62aa45-8b5f-49c1-9ab4-780c105df744/image.png"/></div><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f7dd69da-d871-4618-a819-8274f3f89a1e/image.png"/></div><p class="paragraph" style="text-align:justify;">In my case, the company was using Apollo GraphQL and had all that data stored inside the JSON object.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>WordPress XSS to RCE:</b></h2><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/c63014ca-214b-4b21-8e2e-eb0cf65d5419/image.png"/><div class="image__source"><a class="image__source_link" href="https://twitter.com/brutelogic/status/1544693054791106561?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" rel="noopener" target="_blank"><span class="image__source_text"><p>Twitter</p></span></a></div></div><p class="paragraph" style="text-align:justify;">Ever heard of XSS to RCE? Now you do.Next time when you find an XSS vulnerability in a CMS like WordPress, escalate it further via CSRF to remote code execution!I can&#39;t explain it any better than <a class="link" href="https://twitter.com/brutelogic?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">@brutelogic</a> himself, but instead of going for an alert box, you basically trick the admin into visiting your XSS PoC link. And create a plugin on behalf of the admin!Easy, impactful yet most forget about this!</p><div class="embed"><a class="embed__url" href="https://brutelogic.com.br/blog/compromising-cmses-xss/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://brutelogic.com.br/blog/wp-content/uploads/2017/06/linux-hacked.png"/><div class="embed__content"><p class="embed__title"> Compromising CMSes with XSS - Brute XSS </p><p class="embed__description"> CMSes (Content Management Systems) are a perfect target for XSS attacks: with their module installation features and the possibility to know all the requests done by a legit administrator of the system previously, it’s pretty easy to mount a CSRF (Cross-Site Request Forgery) attack against him/her. By taking the anti-CSRF token/nonce and doing the subsequent … Continue reading Compromising CMSes with XSS </p><p class="embed__link"> https://brutelogic.com.br/blog/compromising-cmses-xss/ </p></div></a></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Cookie attributes</a> by Mozilla Web Docs (explains cookie security flags in detail)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://twitter.com/PortSwiggerRes/status/1418147798554484738?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Use cookieStore() in case WAF blocked you</a> by <b>@PortSwiggerRes</b> (basically, if session cookies are not HTTPOnly but document.cookie is blocked, you could still subscribe to the cookieStore interface and retrieve all cookies)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://infosecwriteups.com/stored-xss-to-account-takeover-going-beyond-document-cookie-970e42362f43?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Account takeover through Session Data in IndexedDB</a> by <b>@SMHTahsin33</b> (this post walks you through on how you can extract data from IndexedDB)</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://brutelogic.com.br/blog/compromising-cmses-xss/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">XSS to RCE in Content Management Systems</a> by <b>@brutelogic</b></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://github.com/hakluke/weaponised-XSS-payloads?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Weaponised XSS Payloads</a> by <b>@hakluke</b> (drop him a follow as well)! This GitHub repo contains a set of payloads for upgrading your XSS to a P1 (RCE) for different CMSs (helped me get my very first account takeover through XSS a few years ago)!</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In next week&#39;s issue, I will go through <b>Broken Access Control issues</b>! Stay tuned!</p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div><ul><li><p class="paragraph" style="text-align:left;">Help you <b>save time</b> & <b>earn more bounties </b>using Nova Security:</p></li></ul><div class="embed"><a class="embed__url" href="https://novasec.io/?ref=newsletter&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-exploiting-xss-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://novasec.io/assets/banner.png"/><div class="embed__content"><p class="embed__title"> Automated Web Security Scanning Simplified - NOVA SECURITY </p><p class="embed__description"> Actively search for vulnerabilities 24/7 using next-gen automated security tools! Start securing your website now! </p><p class="embed__link"> https://novasec.io/?ref=newsletter </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=ece0492e-f02c-4253-9877-a4685669c5ae&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Cross-Site Scripting (XSS): Custom payload crafting</title>
  <description>The Ultimate Guide In Crafting Payloads And Exploiting XSS Vulnerabilities For Higher Bounties</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/99609497-5710-4d01-9936-82e6c86900d4/Frame_1__4_.png" length="58783" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/xss-payloads</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/xss-payloads</guid>
  <pubDate>Mon, 19 Dec 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-12-19T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="The Ultimate Guide In Crafting Payloads And Exploiting XSS Vulnerabilities For Higher Bounties" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/99609497-5710-4d01-9936-82e6c86900d4/Frame_1__4_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>10 min</b></span><span style="font-size:1.5rem;"> (hope you like the new theme colors!)</span></p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Today, you&#39;ll learn how to craft your own payloads to bypass filters and web application firewall rules!Let&#39;s get into it!<i>This post assumes you&#39;ve identified a valid injection point that allows you to render HTML tags. If this is not the case (yet), read the following post: </i><a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-xss?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">[#1] Cross-Site Scripting (XSS)</a></p><h2 class="heading" style="text-align:left;"><b>Table of Contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Reflected & Stored XSS</p></li><li><p class="paragraph" style="text-align:left;">DOM-based XSS</p></li><li><p class="paragraph" style="text-align:left;">Resources</p></li></ul><h2 class="heading" style="text-align:left;"><b>Reflected & Stored XSS:</b></h2><p class="paragraph" style="text-align:justify;">In order to craft a payload, you first need to be aware of a few things.First of all, <b>your context</b>. Is your injection point inside a script tag? Is it inside a value of an HTML attribute? Or between a specific HTML tag (for example style tags)?You should always determine your injection point <b>before</b> crafting any payload. Your script alert(1) payload won&#39;t work everywhere.</p><p class="paragraph" style="text-align:justify;">If your input got reflected inside the style tag (or any other tag that doesn&#39;t directly allow you to render tags that can execute javascript code, such as the textarea), then it is recommended to first close the preceding tag before opening the new one (your payload):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/376f8a67-f5fd-459c-88ed-1ee032083196/image.png"/></div><p class="paragraph" style="text-align:justify;">Another example. In case your unencoded input got reflected inside the script tags (as a value of a variable for example), then you should close the value and add a function.In the code snippet below, assume that the &quot;lang&quot; query parameter&#39;s value gets reflected inside the javascript variable:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/66fbb2a8-0d11-42c3-89f5-452c7f79afce/image.png"/></div><p class="paragraph" style="text-align:justify;">Another example. If your input was reflected inside an href attribute of an a-tag for example, you could inject a payload that uses the <b>javascript protocol</b> (assuming that the opening & closing tags are encoded or escaped):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/2c02f8bc-7d5e-4a40-a542-781f5c03696e/image.png"/></div><p class="paragraph" style="text-align:justify;"><b>Remember that you should always go for a payload that executes with no additional user input needed possible:</b></p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/74a94b89-14c7-4011-94d9-782785167733/image.png"/></div><p class="paragraph" style="text-align:justify;">Now that we got the basics, we should start crafting our payload using various bypassing techniques. To make things easier, let&#39;s first get into the developer&#39;s mind:I&#39;m a full-stack developer myself, and whenever I see developers recommending security measures to each other on public forums (Stack Overflow for example).I see that they are most of the time aware of any security vulnerabilities that may be present but have a quite vague understanding of any existing bypasses.And XSS is one of them. Some think that XSS vulnerabilities are all about tags, and try to solve this by encoding input based on a loose regex pattern.Can you tell me what&#39;s wrong with the following pattern? It seems to do the job, no?</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9849664c-ee19-4089-9e99-428d5ad7e7b8/image.png"/></div><p class="paragraph" style="text-align:justify;">No worries if you couldn&#39;t figure it out yet, after all, you&#39;re reading this post to learn more about crafting payloads & bypassing rules!First of all, <b>it only matches input when it is delivered with an opening AND a closing tag</b>. The second thing, <b>it&#39;s a global pattern and not a multi-line pattern</b>. This means it will only check for <b>matches of the pattern on the first line</b>.This can easily be bypassed in multiple ways:</p><ul><li><p class="paragraph" style="text-align:left;">This regex won&#39;t be helpful if your <b>injection point is inside the value of an HTML attribute</b> or the <b>href attribute of an a-tag</b> for example.</p></li><li><p class="paragraph" style="text-align:left;">This regex can easily be bypassed using <b>CRLF characters</b> as it only checks for it on 1 line.</p></li><li><p class="paragraph" style="text-align:left;">This regex only checks for <b>an opening AND a closing tag</b> (and everything in between). However, we can <b>omit the closing tag in some common cases.</b></p></li><li><p class="paragraph" style="text-align:left;">This regex won&#39;t be helpful if any input is passed to a DOM sink (depending on the sink, you can in some cases also pass <b>escaped Unicode characters</b>.</p></li></ul><p class="paragraph" style="text-align:justify;">Let&#39;s take a closer look by using the pattern to match against different variations of our payload on <a class="link" href="https://regexr.com/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">https://regexr.com/</a> :</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d2d8dca5-af33-4900-847e-3053dbd50297/image.png"/></div><p class="paragraph" style="text-align:left;">Wondering how a payload <b>without a closing tag</b> works? Here&#39;s an example:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/06cec2c9-9777-4cbb-82a8-7138d0a04cbc/image.png"/></div><p class="paragraph" style="text-align:justify;">You can apply the same bypasses if the keyword or the pattern<b> /javascript/g</b> is used (this is how I found so many XSS vulnerabilities).There are so many ways to bypass rules.Here&#39;s an example of how I used the techniques above to craft payloads that bypass (custom) WAF rules for example:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f89fe29c-f283-4373-961d-68fcb87dae90/image.png"/><div class="image__source"><a class="image__source_link" href="https://twitter.com/0xblackbird/status/1581610153794830337?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" rel="noopener" target="_blank"><span class="image__source_text"><p>Twitter</p></span></a></div></div><p class="paragraph" style="text-align:justify;">In the example above, I used the <b>SVG tag</b> (it was one of the tags that were allowed) in combination with the <b>&quot;onload&quot; event handler</b>. I used a <b>double URL encoded Carriage Return</b> character and made use of <b>hostname</b> (instead of document domain as &quot;document&quot; was blocked)You could also <b>concatenate code as it is much harder to detect:</b></p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/cdab9b2a-cb56-4cc7-b9d5-ed16429ee57c/image.png"/></div><p class="paragraph" style="text-align:justify;">Now that we&#39;ve covered most of the bypasses, there&#39;s another type of stored XSS that is quite common when no (basic) validation is done in file upload features.As I stated in my previous post, it is possible to execute javascript in script-based contexts. This means that SVG and XML files for example are also capable of executing javascript.Here&#39;s one for an <b>SVG file</b> for example:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/41ee22a6-43ed-4ece-b128-75d89f03a983/image.png"/></div><p class="paragraph" style="text-align:justify;">It is always recommended to try and upload SVG files when there&#39;s a file upload on your target.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>DOM-based XSS:</b></h2><p class="paragraph" style="text-align:justify;">For DOM-based XSS, a payload really depends on the sink to which it&#39;ll end. For example, a script tag won&#39;t work in the example below:</p><div class="image"><img alt="DOM XSS example" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a054079c-5610-4523-a076-7f6b5a64b8a2/Computer_A__2_.png"/></div><p class="paragraph" style="text-align:justify;">However, the javascript protocol will. I&#39;ve encountered a lot of times where &quot;javascript&quot; is blacklisted or just some parts (such as &quot;java&quot; or &quot;script&quot; is blacklisted).I was almost always able to bypass it using URL-encoded CRLF characters (remember multi-line??).I also encountered cases where everything is whitelisted as long as it matches the following pattern (the app wanted to support HTTP as well as mobile app links):</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/4c9f9fd4-8bb6-4812-a1e8-c05d24453d53/image.png"/></div><p class="paragraph" style="text-align:left;">The developer might&#39;ve thought that this was safe, right? Or is it?</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ec689b1c-4c7a-452a-b430-7a8c1d3c7d16/image.png"/><div class="image__source"><a class="image__source_link" href="https://twitter.com/0xblackbird/status/1553263876019556352?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" rel="noopener" target="_blank"><span class="image__source_text"><p>Twitter</p></span></a></div></div><p class="paragraph" style="text-align:justify;">It isn&#39;t, using a URL-encoded line separator character (U+2028) we can easily circumvent the regex pattern and still inject our malicious code.</p><p class="paragraph" style="text-align:justify;">Now what if your input got in the &quot;<b>innerHTML&quot;</b> sink <b>AND opening and closing tags are filtered</b>?</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/11f986cb-7eca-478c-864a-3e5059656146/image.png"/></div><p class="paragraph" style="text-align:justify;">Use Unicode! Supplying the following payload would render an image tag with the &quot;onerror&quot; event handler. I recommend using tools like <a class="link" href="https://cyberchef.org/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">CyberChef</a> and Burpsuite&#39;s decoder or <a class="link" href="https://portswigger.net/bappstore/65033cbd2c344fbabe57ac060b5dd100?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">Hackvector</a> to encode/decode text easily:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9213338e-073a-4596-ae6b-c4f7affe149e/image.png"/></div><p class="paragraph" style="text-align:justify;">There are countless amount of bypasses like these, as every target is different, I keep trying different ways until I find one that works.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://blog.yeswehack.com/yeswerhackers/web-application-firewall-bypass/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">Here is another detailed blog post from YesWeHack on bypassing web application firewalls</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://ghostlulz.com/xss-svg/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">A detailed post of achieving XSS using SVG files</a> from Ghostlulz</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://hacken.io/discover/how-to-bypass-waf-hackenproof-cheat-sheet/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">A WAF bypass cheatsheet</a> from Hacken.io</p></li><li><p class="paragraph" style="text-align:left;">Another resource on <a class="link" href="https://brutelogic.com.br/blog/transcending-context-based-filters/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">bypassing filters in different contexts</a> from Brutelogic</p></li><li><p class="paragraph" style="text-align:left;">Want to test out a payload? <a class="link" href="https://portswigger-labs.net/xss/xss.php?context=html&x=XSS&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank" rel="noopener noreferrer nofollow">Portswigger has a playground</a> where you can test new tags</p></li></ul><p class="paragraph" style="text-align:justify;"><b>I also recommend keeping an eye on Twitter&#39;s bug bounty community as most of the time, new WAF bypasses get shared there.</b></p><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next newsletter issue, I will go through a topic I still need to figure out (suggest me some)! Stay tuned!<b>By the way, congratulations on making it this far! You are one of the few who have come this far and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-custom-payload-crafting" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=abaad16d-6be6-47dc-a83a-13409a20cc1c&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>Cross-Site Scripting (XSS): Understanding XSS vulnerabilities</title>
  <description>The ultimate guide in understanding, identifying and exploiting XSS vulnerabilities for higher bounties</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/be26d8a4-9745-45bf-905d-eb4dbaf0cc0f/Frame_1__3_.png" length="52316" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/xss</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/xss</guid>
  <pubDate>Mon, 12 Dec 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-12-12T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
    <category><![CDATA[Web Vulnerabilities]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="The ultimate guide in understanding, identifying and exploiting XSS vulnerabilities for higher bounties" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/be26d8a4-9745-45bf-905d-eb4dbaf0cc0f/Frame_1__3_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated reading time is: </span><span style="font-size:1.5rem;"><b>19,7 min</b></span></p><p class="paragraph" style="text-align:justify;">Hi mate! Glad to see you back again reading my newsletter! By the end of this post, you&#39;ll have a better understanding of what Cross-Site Scripting (XSS) vulnerabilities are and in what forms they often are or can be found!This week will be all about understanding XSS, next week I will show you how you can identify and exploit them using custom-crafted payloads! <b>Throughout this post, I may give additional information about where & how I found some of the most unique XSS vulnerabilities</b>, don&#39;t miss out on this and take notes ;)!</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Table of Contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Cross-Site Scripting (XSS) introduction</p></li><li><p class="paragraph" style="text-align:left;">Types of XSS vulnerabilities</p><ul><li><p class="paragraph" style="text-align:left;">Reflected Cross-Site Scripting</p></li><li><p class="paragraph" style="text-align:left;">Stored Cross-Site Scripting</p></li><li><p class="paragraph" style="text-align:left;">DOM-based Cross-Site Scripting</p></li></ul></li><li><p class="paragraph" style="text-align:left;">Testing Methodology</p><ul><li><p class="paragraph" style="text-align:left;">Reflected & Stored XSS</p></li><li><p class="paragraph" style="text-align:left;">DOM-based XSS</p></li></ul></li><li><p class="paragraph" style="text-align:left;">Additional Resources</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Cross-Site Scripting introduction:</b></h2><p class="paragraph" style="text-align:justify;">Cross-Site Scripting (or XSS in short) is an injection vulnerability that can be present on the client side as well as on the server side.Simply put, XSS vulnerabilities allow attackers to execute client-side javascript code on behalf of their victim (usually, without their knowledge). Or on the server side (think of HTML to PDF generators, or just some code that renders your HTML and JS code on the server side, etc.)And as they can execute javascript in the victim&#39;s web browser, they basically can redress the whole UI, perform unwanted actions or in severe cases, get a hold of the victim&#39;s session cookies (more on this when we approach the exploitation part).XSS vulnerabilities exist due to bad user input validation. Developers often underestimate what parameters attackers can control. However, sometimes, they just forget about it. This is often the case for example when the application is super complex and has a very large code base (<i>take notes...</i>).Modern web browsers can&#39;t fully mitigate this vulnerability as it is hard to determine whether the script that is loaded or code that gets executed comes from a trusted source or not (think of a third-party script that gets injected after the DOM has loaded).However, over the past few years, new browser security headers and features (such as Content Security Policy) started to get introduced and can (partially) mitigate this.The only most reliable mitigation is to <b>validate user input</b> and <b>always encode it</b> wherever possible.<b>One small note:</b>Most make this mistake, but understand that <b>XSS vulnerabilities can not be exploited in a server&#39;s redirect</b> (whenever the Location response header is set and a 3XX status code is returned).Say we have the following PHP code:</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/90c0f57f-25d0-4e3b-ace1-1b2f13a917e9/Code_snippet.png"/></div><p class="paragraph" style="text-align:justify;">Then even if we try to inject an XSS payload using a payload, which will give us the following response</p><div class="image"><img class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/94e7df4c-30d7-46a2-bdd0-e07cef22016c/response.png"/></div><p class="paragraph" style="text-align:justify;">The browser will just redirect you to the destination host.</p><p class="paragraph" style="text-align:justify;">And, as we&#39;ve seen in the previous post, <b>the response content type also plays a major role in how your browser will handle the server&#39;s response. </b>XSS vulnerabilities can <b>only be executed in script-based contexts. </b>Even if your payload got reflected in the response without any encoding, <b>it won&#39;t execute in responses with a content type</b> of for example &quot;<b>text/plain</b>&quot;, &quot;<b>application/json</b>&quot;, &quot;<b>text/javascript</b>&quot;, etc. (unless you managed to find a <b>CRLF injection</b> and forced the server to respond with <b>your </b>specified<b> content type</b>, crazy stuff I know, I&#39;ll explain this vulnerability type later).It will for example execute in responses with a MIME type of &quot;<b>text/html</b>&quot;, &quot;<b>image/svg+xml</b>&quot;, &quot;<b>text/xml</b>&quot;, etc.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Types of XSS vulnerabilities:</b></h2><p class="paragraph" style="text-align:justify;">XSS vulnerabilities can be present in various contexts and to further classify them, we further separate them into 3 classes: <b>Reflected XSS</b>, <b>Stored XSS</b> and <b>DOM-based XSS</b>.</p><h3 class="heading" style="text-align:left;"><b>Reflected Cross-Site Scripting:</b></h3><p class="paragraph" style="text-align:justify;"><b>Reflected</b>, <b>Reflective</b>, <b>Non-Persistent</b> or <b>Type-I</b> XSS are XSS vulnerabilities that get executed because invalidated or unencoded user input <b>gets reflected in the server&#39;s response whenever the payload is specified</b>.The victim must click on a malicious link that is provided by the attacker before it executes on the victim&#39;s browser.It only executes once whenever the malicious link is visited.Sometimes, it is possible to elevate a reflected cross-site scripting vulnerability to a (temporarily) stored cross-site scripting vulnerability through for example getting the server&#39;s response get cached.You often find reflected XSS vulnerabilities in search functions (that return the query) or in other input fields that reflect the value in the server response.You should also test <b>hidden input fields</b> and try to use <b>javascript variable names</b> as a query parameter.Do remember that parameters often get <b>re-used</b> by the developer on other <b>routes</b> or <b>endpoints</b> (if you found a reflected XSS on the <b>login page</b> using the &quot;<b>redirectURL</b>&quot; parameter, try to also check for XSS on the <b>register</b> or <b>forgot password</b> page).It is also pretty common that developers read the parameter from the <b>response body</b> and/or <b>URL query </b>(depending on where the parameter got supplied). So make sure to test it for both POST-based as well as normal GET-based XSS.Test <b>everything</b> that <b>accepts user input and reflects it somewhere else</b>.There&#39;s also <b>POST-based XSS</b>, where an injection point only reflects POST parameters. It&#39;s the same as a reflected XSS except for how you send the payload. Instead of a link with a payload, you send a link to your site with a simple HTML POST form.<b>Auto-submitting</b> the HTML form (when the link is visited) will <b>decrease the attack complexity</b>.One last form the reflected XSS can come in is in the<b> URL path</b>. Simply put, everything in the URL path may get reflected in the page, I&#39;ve encountered a few times where whenever you request a resource that doesn&#39;t exist, it returns a 404 status code along with the path unencoded. This allowed me several times to execute javascript code just make sure your payload is in the right format.</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">Use parameter brute-forcing tools to discover new or hidden parameters! <a class="link" href="https://portswigger.net/bappstore/17d2949a985c4b7ca092728dba871943?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">ParamMiner</a>, <a class="link" href="https://github.com/s0md3v/Arjun?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Arjun</a> and <a class="link" href="https://github.com/devanshbatham/ParamSpider?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">ParamSpider</a> are perfect tools for discovering hidden parameters!</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><h3 class="heading" style="text-align:left;"><b>Stored Cross-Site Scripting:</b></h3><p class="paragraph" style="text-align:justify;"><b>Stored</b>, <b>Persistent</b> or <b>Type II</b> XSS is another type of XSS, it&#39;s quite similar to <b>reflected XSS</b>.The only main difference is that it is stored (i.e. saved in a database or somewhere else) and later retrieved again (everything, even the payload).This means that any user who visits a particular page gets the malicious javascript payload executed in his/her browser (without the need of specifying the payload every single time)!By nature, stored XSSs are a high-severity vulnerability as they can cause severe damage to each user who visits the page.And as you might have guessed, stored XSS can be <b>anywhere </b>where <b>data is stored</b> and later <b>retrieved and reflected</b> in the <b>response body</b>!You can think of <b>comment sections</b>,<b> review forms</b>, <b>contact forms</b>, <b>user details</b> (when signing up for example), <b>file uploads</b> (when uploading an HTML or SVG file for example, I&#39;ll share the payloads in the next post), <b>chats</b>, <b>(login) logs</b>, <b>online viewable emails</b>, <b>notification system</b> (that is built in to the site, don&#39;t confuse this with the Notifications browser API), etc.</p><h3 class="heading" style="text-align:left;"><b>DOM-based Cross-Site Scripting:</b></h3><p class="paragraph" style="text-align:justify;">DOM-based XSS is different from reflective and stored XSS as your input does not get reflected in the source code.DOM-based XSS vulnerabilities arise when unsafe data (user input from a query parameter for example) gets processed in javascript and gets passed without proper validation.There are a few ways where user data can originate from, such as &quot;window.location&quot; object property. Every property that reads user-supplied input is called a <b>DOM source</b>.While each function that processes data in an unsafe manner is called a <b>DOM sink</b>.When user input gets passed from a DOM source to a DOM sink, DOM-based (XSS) vulnerabilities may arise.This may still be a bit vague, I know, but don&#39;t worry! Lets take a look at the following code snippet that is vulnerable to a DOM-based XSS vulnerability:</p><div class="image"><img alt="DOM XSS example" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a054079c-5610-4523-a076-7f6b5a64b8a2/Computer_A__2_.png"/></div><p class="paragraph" style="text-align:justify;">User input is read from the &quot;<b>redirect_url</b>&quot; query parameter (from the &quot;<b>location.search</b>&quot; <b>DOM source</b>) and is later passed on to the &quot;<b>location.href</b>&quot; <b>DOM sink</b>. If you send a request to that document with the &quot;redirect_url&quot; query parameter with a payload, you may execute javascript on the user&#39;s behalf!There are a lot of sinks that can lead to DOM-based XSS, I recommend going over them one by one in this <a class="link" href="https://portswigger.net/web-security/cross-site-scripting/dom-based?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities#which-sinks-can-lead-to-dom-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">article from Portswigger Academy</a>.</p><hr class="content_break"><p class="paragraph" style="text-align:justify;">Be aware that<b> Blind XSS also exists</b>. <b>Blind XSS </b>is hard to detect as you can&#39;t see the injection point (as it is often on a higher privileged or internal web dashboard, think of an admin&#39;s moderation dashboard where all data of a user gets reflected in the response) and can be any type of XSS. It often is <b>stored XSS</b> but this can also be a <b>blind reflected</b> or <b>blind DOM-based</b> (although these are much much harder to find).That is why it is also advisable to put your payload in other parts of your request such as your <b>User-Agent</b>, <b>Cookie header</b>, <b>X-Forwarded-For </b>(depending on how and what request headers the application processes), or in the <b>request body (as a parameter)</b> etc. Your request will eventually get logged and displayed on the admin&#39;s dashboard.Another trick you can use is to <b>cause an error</b> and have the request contain a <b>blind XSS payload </b>as errors often get logged separately to get resolved.</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">The best way to validate blind XSS is to send a specially crafted payload that when executed, sends a callback to your end (to validate the blind execution).</p><p class="paragraph" style="text-align:left;"></p><p class="paragraph" style="text-align:left;">XSSHunter.com is a great solution, however, it will soon be depreciated and only the self-hosted version will be available.</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><p class="paragraph" style="text-align:justify;">You might also come across <b>self-XSS</b> in program scopes. Self-XSS can also come in the form of the preceding 3 different types. To put it simply, self-XSS means just what you might think it means, <b>only you can get exploited and affected by it</b>.It often can not be used to harm other users. This is why it is almost always out of scope for most programs out there.You can come across it in various components of a web application such as your private profile or settings, an input field (with no query parameters) where the whole payload needs to be typed first (think of an auto-complete feature or similar features), etc.To save yourself and the company time, do not report self-XSS vulnerabilities. Instead, try to seek impact by chaining multiple vulnerabilities. This may not always be possible, however, the end results are always rewarding (you either learn something new or earn a bounty).</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Testing methodology:</b></h2><p class="paragraph" style="text-align:justify;">If you want to properly test XSS, I recommend going through the following steps. These have worked for me and allowed me to determine whether a specific field is vulnerable or not and have helped me find a lot of XSS vulnerabilities (all types).I usually first try a simple XSS payload just to save myself time but if that does not work, I fall back to these steps.This is how I always find XSS:</p><div class="image"><img alt="XSS Process" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ac8ae6be-92b5-4423-ac74-1f11fbf667fa/Computer_A__1_.png"/></div><p class="paragraph" style="text-align:justify;">Let me explain</p><h3 class="heading" style="text-align:left;"><b>Reflected & Stored XSS:</b></h3><ol start="1"><li><p class="paragraph" style="text-align:left;">Inject a simple <b>non-malicious HTML tag</b> followed by a unique string or int value (depending on what the website is expecting). The HTML tag can be a u-tag, s-tag or i-tag. In this step, you mainly only want to <b>identify injection points without getting blocked by a web application firewall</b>.<b> </b>If you found a reflection point where your HTML tag got rendered, proceed to the following step. </p></li><li><p class="paragraph" style="text-align:left;">This step involves you (manually) checking what tags are allowed. To do so, you can open <a class="link" href="https://portswigger.net/web-security/cross-site-scripting/cheat-sheet?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">the XSS cheat sheet provided by Portswigger Academy</a> and copy all the HTML tags. Going over them manually can be a tedious task, I recommend using a fuzzer such as your Burpsuite Intruder or any other tool that does the job. Take note of each single allowed tag, this will help you a lot in the following step.</p></li><li><p class="paragraph" style="text-align:left;">Now it&#39;s time to identify any allowed event handler (if the script tag is one of the allowed tags, skip this step, you already got XSS ;)). Usually, what you want to do now instead of directly injecting an event handler is to first determine if the keyword &quot;<b>on</b>&quot; is allowed or not. If it is, add an &quot;<b>x</b>&quot; after the &quot;<b>on</b>&quot; keyword. Keep on adding an &quot;<b>x</b>&quot; character until you reach the length of one of the event handlers. All you do know is to start checking what event handlers of the same length are allowed. You are mainly looking for event handlers that execute code without requiring any additional user input (such as &quot;<b>onload</b>&quot;, &quot;<b>onerror</b>&quot;, etc.). Note down each allowed event handler.</p></li><li><p class="paragraph" style="text-align:left;">This step is the final step, this is where you check what payload gets accepted and craft the final payload (including the code that is going to be executed). The code is often an alert popup including the document&#39;s domain as 1) it proves code execution and 2) it indicates on what domain it got executed.</p></li></ol><p class="paragraph" style="text-align:justify;">If you still couldn&#39;t find a payload, I recommend bruteforcing payloads (I never had to reach this step as I always found it after finishing the 4th step).</p><h3 class="heading" style="text-align:left;"><b>DOM-based XSS:</b></h3><p class="paragraph" style="text-align:justify;">For DOM-based XSS the methodology differs as your payload does not get reflected. That&#39;s why I recommend <b>reading and analyzing javascript</b> files for <b>DOM sinks and sources</b> and injecting your payload accordingly.</p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">There are tools that help identify DOM sinks & sources! Burpsuite&#39;s built-in Chromium browser has <a class="link" href="https://portswigger.net/burp/documentation/desktop/tools/dom-invader?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">DOMInvador</a>. <a class="link" href="https://github.com/filedescriptor/untrusted-types?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Untrusted Types from @filedescriptor</a> is another great alternative that helped me find a lot of DOM-based XSS vulnerabilities in web applications!</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Additional Resources:</b></h2><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://owasp.org/www-community/attacks/xss/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">OWASP has great resources on XSS</a> for if you want to read more about it.</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/cross-site-scripting/dom-based?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">Learn more about DOM-based XSS</a> (Portswigger Academy has awesome labs too)!</p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://portswigger.net/web-security/cross-site-scripting/cheat-sheet?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">XSS Cheat Sheet by Portswigger Academy</a></p></li><li><p class="paragraph" style="text-align:left;">If you&#39;re a developer yourself, you may want to look at how you can prevent this issue in your web apps. <a class="link" href="https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank" rel="noopener noreferrer nofollow">OWASP provides a Prevention Cheat Sheet</a> that you can follow.</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next part, I will go through <b>how you can craft your own custom XSS payloads while avoiding most web app firewalls</b>! Stay tuned!<b>By the way, congratulations on making it this far! You are one of the few who have come this far and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#181818;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=cross-site-scripting-xss-understanding-xss-vulnerabilities" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=c7d32832-fa97-44c3-ac36-d627ec9713b8&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty</title>
  <description>What&#39;s next?</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/5c3a4991-57fc-4db9-809c-1dc46ec4b22f/Frame_1__2_.png" length="38719" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-whats-next</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-whats-next</guid>
  <pubDate>Mon, 05 Dec 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-12-05T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/5c3a4991-57fc-4db9-809c-1dc46ec4b22f/Frame_1__2_.png"/></div><p class="paragraph" style="text-align:left;"><span style="font-size:1.5rem;">Today&#39;s estimated read time is: </span><span style="font-size:1.5rem;"><b>3,5 min</b></span></p><p class="paragraph" style="text-align:justify;">Hi mate! Congrats! You&#39;ve made it this far! You now got the technical basics just to get started in learning web security! If you keep following along, you&#39;ll soon be ready to hit real bug bounty targets and start earning those bounties!</p><h2 class="heading" style="text-align:left;"><b>What&#39;s next?</b></h2><p class="paragraph" style="text-align:justify;">From now on, I&#39;ll be covering all vulnerability types that often are present in websites!Just to give you an idea, each vulnerability type will be divided into 2 (or 3) parts, sent out each week.This is to keep the post lengths reasonable.The <b>first part</b> will be all about <b>understanding the vulnerability type</b>.In the <b>second week</b>, I will cover the practical stuff such as <b>common payloads and bypasses, and where to look for them</b>!And as a lot of you requested, we&#39;ll be covering <b>Cross-Site Scripting (XSS) vulnerabilities</b> in next week&#39;s issue!But before I close off this post, I wanted to ask for your feedback!Please reply to this email (or send me via Twitter DMs) anything that you want to be added or changed in this newsletter.Would you prefer to have <b>shorter posts</b> (and send <b>each week 2 emails</b>), or would rather prefer<b> longer posts</b> that may take <b>10min+</b> to read?<b>One important last note</b>, I noticed that a lot of emails stay unread whenever I post any technical content (e.g. payloads, bypasses, etc).Please whitelist my domain or add this sender as a contact if you want it to bypass the SPAM filter and keep receiving my emails.And as always, you can read all my previous posts on my blog:</p><div class="embed"><a class="embed__url" href="https://weekly-bugbounty-content.beehiiv.com/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty" target="_blank"><img class="embed__image embed__image--left" src="https://media.beehiiv.net/uploads/publication/thumbnail/b8fa4312-0b90-4eaa-b9fa-b28e031fcf27/landscape_Frame_1.png"/><div class="embed__content"><p class="embed__title"> Weekly Bug Bounty Content </p><p class="embed__description"> Subscribe for Weekly Bug Bounty &amp; Web Application Security related content in your inbox! </p><p class="embed__link"> https://weekly-bugbounty-content.beehiiv.com/ </p></div></a></div><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next part, I will go through cross-site scripting (XSS) vulnerabilities! Stay tuned!<b>By the way, congratulations on making it this far mate! You are one of the few who have come this far and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#ffffff;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=cf9b9069-3b4e-47ae-923c-eb2b83fa8aae&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty [Pt. 5]</title>
  <description>Tools</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/15e236b6-3b7f-4795-9949-89a8e60258f1/Frame_1__10_.png" length="42936" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt-5</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt-5</guid>
  <pubDate>Mon, 28 Nov 2022 14:28:26 +0000</pubDate>
  <atom:published>2022-11-28T14:28:26Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022! Part 5: Tools" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/15e236b6-3b7f-4795-9949-89a8e60258f1/Frame_1__10_.png"/></div><h2 class="heading" style="text-align:left;"><b>Recap:</b></h2><p class="paragraph" style="text-align:justify;">Hi mate! Glad to see you back on this post! I also want to welcome our <b>100+ new readers</b> who are joining us today! Thank you all <b>for your support!</b></p><p class="paragraph" style="text-align:justify;">Last week, we went over the HTTP protocol and covered <b>requests</b> and <b>responses</b> as well as <b>the components that form a valid request or response</b> (such as <b>HTTP methods</b>, <b>response status codes</b>, <b>request/response headers</b>, <b>request/response body</b>, etc). If you missed that post, it&#39;s always <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt4?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-5" target="_blank" rel="noopener noreferrer nofollow">available on my blog!</a>In today&#39;s issue, we will see what your web browser is all capable of in terms of testing web applications (lots of bug bounty hunters just don&#39;t know or use this!!). I will also go over the different proxy interceptors + the most used built-in capabilities and how they can be used to test web applications effectively!</p><h2 class="heading" style="text-align:left;"><b>Table of Contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Recap</p></li><li><p class="paragraph" style="text-align:left;">Web browser</p><ul><li><p class="paragraph" style="text-align:left;">Regex Search</p></li><li><p class="paragraph" style="text-align:left;">Source Maps</p></li><li><p class="paragraph" style="text-align:left;">Network Interceptor</p></li><li><p class="paragraph" style="text-align:left;">User-Agent spoofer</p></li><li><p class="paragraph" style="text-align:left;">Content Security Policy checker</p></li><li><p class="paragraph" style="text-align:left;">Hidden endpoints through the memory tab</p></li></ul></li><li><p class="paragraph" style="text-align:left;">Proxy Interceptor</p><ul><li><p class="paragraph" style="text-align:left;">Burpsuite</p></li><li><p class="paragraph" style="text-align:left;">ZAProxy</p></li><li><p class="paragraph" style="text-align:left;">Caido</p></li><li><p class="paragraph" style="text-align:left;">Proxy</p></li><li><p class="paragraph" style="text-align:left;">Repeater</p></li><li><p class="paragraph" style="text-align:left;">Intruder</p></li><li><p class="paragraph" style="text-align:left;">Sitemap</p></li></ul></li></ul><h2 class="heading" style="text-align:left;"><b>Web browser:</b></h2><p class="paragraph" style="text-align:justify;">Whichever web browser you use, Firefox or Edge or a Chrome-based browser (such as Google Chrome, Brave Browser or Chromium) your browser has developer tools built in it. These developer tools are meant for developers to debug and track any kind of issues on their site. However, we can use it to our advantage to find all types of vulnerabilities! A few examples: <b>we can use the memory tab + regex search to uncover (hidden) endpoints in for example SPAs (single page applications)</b>, but <b>we could also replicate the whole project folder using the sources tab by unpacking source map files! </b>Let&#39;s not waste any more time and get straight to it!Throughout this post, I will be using Brave browser. Other browsers such as Firefox also have the same tools built in, however, they may not be located in the same place.</p><h3 class="heading" style="text-align:left;"><b>Regex Search:</b></h3><p class="paragraph" style="text-align:justify;">Your developer tools provide you with a basic search along with a <b>regex search</b> to search for common patterns easily! All you have to do is open any file in your <b>&quot;Sources&quot;</b> tab, whether it&#39;s a javascript file or just an HTML file or your <b>&quot;Elements&quot;</b> tab and press <b>Ctrl+Shift+F </b>(keep focussing on your web console), you can now easily go through these files, and search for well-hidden endpoints and other hard-coded values or patterns (such as a custom request header or cookie you&#39;ve found elsewhere) in the web application!</p><div class="image"><img alt="Regex search" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/358248aa-a19e-4e81-a36a-01f6287b72bc/regex_search.png"/></div><h3 class="heading" style="text-align:left;"><b>Source Maps:</b></h3><p class="paragraph" style="text-align:justify;">You probably already have seen that javascript source map files can be easier to help you spot more vulnerabilities as you got access to the code. However, one thing a lot of bug bounty hunters do not know is, that you can unpack + replicate the whole project directory in your web console! Previously, most people downloaded the source map file, installed a source map unpacker, and had to replicate the whole project discovery on their own machine. This is of course doable for 1 or 2 source map files, but what if you&#39;ve got a lot of them?That&#39;s where you should use the <b>&quot;Sources&quot;</b> tab! You now got access to the entire front-end code in a structured and easy-to-read format! This allows you to directly search for where user input is collected + processed (I&#39;ve found lots of dom-based cross-site scripting issues using this technique + one even lead to an account takeover through a special case). You could also look for hardcoded values and trace back where they&#39;re used (to try and replicate the credentials) but this can also be used for basic content discovery by looking for endpoints.You&#39;re most of the time going to find source map files of web applications that were built using Webpack or similar site builders and only <b>if source maps are enabled</b>. You commonly come across these on Vuejs & React applications.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/81875f9e-e16d-4c26-a25e-35f9fe138d1a/image.png"/></div><h3 class="heading" style="text-align:left;"><b>Network Interceptor:</b></h3><p class="paragraph" style="text-align:justify;">Yes, your web console is also capable of intercepting and saving requests and responses! Opening the <b>&quot;Network&quot;</b> tab will present you with all the connections that you&#39;ve made or are making at the moment. These become helpful if you want to use your web browser as an interceptor (highly impractical) but you get the idea. You can inspect the responses to requests but most importantly, you can also replicate them <b>by copying the request as a command.</b> One of the lesser-known features of the web console (it really does save a lot of time if you need to reconstruct a whole cURL command or fetch function).</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/a5e3faa9-856a-485a-80e1-8fd9dd549da2/image.png"/></div><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/54d26eb6-74d5-4164-9392-e06d927d9029/image.png"/></div><h3 class="heading" style="text-align:left;"><b>User-Agent Spoofer:</b></h3><p class="paragraph" style="text-align:justify;">Correct, you can spoof your user-agent header using your web console! You might ask yourself why you even want to spoof your user agent. As we&#39;ve seen in the last post, from your user agent header, a web application can derive the browser, device and much more from where you&#39;re requesting a certain resource. And it is pretty common that you see a response differ based on your user-agent (useful for content discovery). Under the <b>&quot;Network conditions&quot;</b> tab, you can set a custom user agent (with an XSS or SQLi payload) or select a user agent from the menu:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d30a6569-b75d-49d9-baf5-d216911ca4e0/image.png"/></div><h3 class="heading" style="text-align:left;"><b>Content Security Policy Checker:</b></h3><p class="paragraph" style="text-align:justify;">A good content security policy is one, or should at least be, one of the last defences against cross-site scripting vulnerabilities (and clickjacking attacks). However, sometimes, XSS issues are available, and basic CSP misconfigurations may leave the vulnerability exposed to attackers. But you first need to find a misconfiguration in CSP itself. It is possible to do so using your web console through the <b>&quot;Lighthouse&quot;</b>. Previously, you had to go to <a class="link" href="https://csp-evaluator.withgoogle.com/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-5" target="_blank" rel="noopener noreferrer nofollow">the CSP evaluator</a> and check if CSP is set in place correctlyTo check for CSP misconfiguration, open your web console, open the <b>&quot;Lighthouse&quot;</b> tab and select <b>&quot;Best practices&quot;</b> and click on <b>&quot;Analyse page load&quot;</b>. Let the scan finish. Once finished, check under <b>&quot;Trust & Safety&quot; </b>for any misconfigurations:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e2f88329-6473-4ebe-9251-c5fc1c7a20e2/image.png"/></div><p class="paragraph" style="text-align:left;">In this case, no browser mitigations were set to prevent XSS from executing.</p><h2 class="heading" style="text-align:left;"><b>Hidden endpoints through the memory tab</b></h2><p class="paragraph" style="text-align:justify;">The memory tab gives developers the ability to track down memory leaks inside their web applications. However, we can also use this feature, but instead of tracking down memory leaks. We can search for endpoints or other hardcoded values as all these heap snapshots contain nodes and objects which are linked to the DOM!To use this feature, open your <b>&quot;Memory&quot;</b> tab, next click on <b>&quot;Take snapshot&quot;</b> and wait for it. Once the snapshot has finished, look for strings such as a custom request header, a cookie, an API endpoint, etc using the regex search!</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/13d17539-f9c1-4310-a288-e4892fc0cf01/image.png"/></div><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Proxy Interceptor:</b></h2><p class="paragraph" style="text-align:justify;">There are a few proxy interceptors that do the job. You&#39;ve even got a browser-based proxy interceptor (very useful if you want to have your proxy interceptor on your VPS for example)! Below are a few proxy interceptors, I will be mainly using Burpsuite Proxy interceptor as my main proxy interceptor in this post as well as feature posts but keep in mind that any proxy interceptor is okay as long as it does the job!Below, I will go over various tools that every proxy interceptor provides through a basic Server Side Request Forgery vulnerability. I will cover this vulnerability type in a later post, but all you have to know at the moment is that SSRF vulnerabilities arise when user input gets into a function that requests external resources. This means that you can request any resource on behalf of the server, this can be severe if for example non-protected sensitive content is located on the server-side&#39;s network (localhost, AWS or Google GCP metadata, etc).</p><h3 class="heading" style="text-align:left;"><b>Burpsuite:</b></h3><div class="embed"><a class="embed__url" href="https://portswigger.net/burp?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5" target="_blank"><img class="embed__image embed__image--left" src="https://portswigger.net/content/images/logos/burpsuite-twittercard.png"/><div class="embed__content"><p class="embed__title"> Burp Suite - Application Security Testing Software </p><p class="embed__description"> Get Burp Suite. The class-leading vulnerability scanning, penetration testing, and web app security platform. Try for free today. </p><p class="embed__link"> https://portswigger.net/burp?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5 </p></div></a></div><h3 class="heading" style="text-align:left;"><b>ZAProxy:</b></h3><div class="embed"><a class="embed__url" href="https://www.zaproxy.org/?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5" target="_blank"><img class="embed__image embed__image--left" src="https://www.zaproxy.org/img/zap-banner.png"/><div class="embed__content"><p class="embed__title"> The ZAP Homepage </p><p class="embed__description"> Welcome to ZAP! </p><p class="embed__link"> https://www.zaproxy.org/?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5 </p></div></a></div><h3 class="heading" style="text-align:left;"><b>Caido:</b></h3><div class="embed"><a class="embed__url" href="https://caido.io/?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5" target="_blank"><img class="embed__image embed__image--left" src="https://caido.io/images/replay.png"/><div class="embed__content"><p class="embed__title"> Caido - Lightweight Web Security Auditing Toolkit </p><p class="embed__description"> Caido - A lightweight web security auditing toolkit for professionals and enthusiasts. </p><p class="embed__link"> https://caido.io/?utm_source=newsletter&utm_medium=email&utm_campaign=from_zero_to_hero_in_bug_bounty_pt5 </p></div></a></div><h3 class="heading" style="text-align:left;"><b>Target:</b></h3><p class="paragraph" style="text-align:justify;">The Target tab displays the sitemap for each previously intercepted site. It allows you to define which targets are in scope for your current project, and also allows you to conduct various other actions by selecting a site or request individually:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/bb9b0eb7-1ce7-4281-a675-d6e291c057e8/image.png"/></div><p class="paragraph" style="text-align:justify;">Say we are only authorized to test <b>http://localhost.me</b>. We can set up our scope accordingly to exclude any other hosts except the in-scope host:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/4b55802b-f861-4b59-9467-617b956e3c69/image.png"/></div><p class="paragraph" style="text-align:justify;">Setting the sitemap to only show in-scope items will just show us every request made on <b>http://localhost.me/</b>:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/3d32cf32-af9d-4753-bb86-f516ee4d7ced/image.png"/></div><h3 class="heading" style="text-align:left;"><b>Proxy:</b></h3><p class="paragraph" style="text-align:justify;">The Proxy tab acts as an interceptor between your web browser and the server. When you set a proxy to redirect all traffic to Burpsuite&#39;s proxy, you&#39;ll notice that you can only intercept HTTP requests. For HTTPS requests, you&#39;ll have to install Burpsuite&#39;s generated certificate, I won&#39;t explain it here as there are a lot of tutorials already, but do know that you need to set up your proxy interceptor in order to intercept any request between your browser and server.Also, you&#39;ll notice that you can&#39;t intercept requests made to <b>localhost</b>. You&#39;ll have to manually edit your <b>etc hosts</b> <b>file</b> on UNIX-like systems and point <b>127.0.0.1</b> to any <b>hostname</b> of your choice (that&#39;s one way to go around this).The proxy interceptor allows you to examine, and edit requests and responses between your browser and the server. This is extremely helpful to evade client-side validation (when submitting your payloads). It also makes testing APIs more convenient.</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/70548644-26c6-4b80-83b9-a134d847b434/image.png"/></div><p class="paragraph" style="text-align:left;">Let&#39;s request the following resource: <b>http://localhost.me/</b></p><p class="paragraph" style="text-align:left;">Make sure your interceptor is <b>turned on</b>. Next, right-click it and select <b>&quot;Send to Repeater&quot;</b> or simply hit <b>&quot;Ctrl+R&quot;</b>.</p><h3 class="heading" style="text-align:left;"><b>Repeater:</b></h3><p class="paragraph" style="text-align:justify;">The Repeater tool allows you to edit and send an interesting HTTP or WebSocket message repeatedly. This tool is extremely helpful if we are looking for a payload that evades WAF for example. Let&#39;s take a look at the previously intercepted request.</p><p class="paragraph" style="text-align:justify;">From the source code and memory heap snapshot, we already know the potentially vulnerable query parameter. We now only need an appropriate SSRF payload. Thanks to the Repeater tab, we can repeatedly send a new variation of our initial payload over and over again (until we find one that works):</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/ad0cb319-8077-401d-9a0f-2ade0b4a7f51/image.png"/></div><p class="paragraph" style="text-align:justify;">And as you can see, we found that our payload allowed us to request a page on behalf of the server and even read local files!</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e2717fe4-4ada-4cad-9e04-b1763d1ca0af/image.png"/></div><h3 class="heading" style="text-align:left;"><b>Intruder:</b></h3><p class="paragraph" style="text-align:justify;">The Intruder tool allows you to conduct automated customized attacks against web applications and APIs. It can be used to automate all sorts of tasks. From content discovery to brute-forcing various payloads. Let&#39;s take a look at an example from before, in the Repeater tab, just hit <b>&quot;Ctrl + i&quot;</b>:</p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/01fcda24-7c92-4f55-b452-00ff1381162c/image.png"/></div><p class="paragraph" style="text-align:justify;">Select or load a wordlist and click <b>&quot;Start attack&quot; </b><i>(small side note: on Burpsuite&#39;s community edition, your requests will be throttled and gradually slow down. I recommend using another solution if you want to save time.)</i></p><div class="image"><img alt="" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/62e97144-7fc5-4b71-9105-af223b883c02/image.png"/></div><p class="paragraph" style="text-align:justify;">The SSRF from before was an extremely easy case that is less common nowadays. But suppose you did find a potential SSRF but you just can&#39;t get a payload that evades the web application firewall or filter. What you can do is send the request to Intruder, define the insertion points, select a wordlist with payloads and start the intruder scan. From the end results, we can achieve the same: we can check the <b>status codes</b> or<b> content length</b> of each response.</p><p class="paragraph" style="text-align:justify;">In this post, I&#39;ve only covered the basics just to get you started. However, if you want to learn more, you can read the available documentation, watch some videos or even take a course on learning your preferred proxy interceptor in-depth!</p><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next part, I will go through what is next in this newsletter! Stay tuned! <b>By the way, c</b><b>ongratulations on making it this far mate! You are one of the few who have come this far and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:justify;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:justify;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:justify;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#ffffff;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-5"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p></li></ul><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-5" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=849f028d-f944-4591-9ff5-3e5a3c9bed40&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty [Pt. 4]</title>
  <description>HTTP/101</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f056eb78-e350-4939-9a29-ecbc070a9b86/Frame_1__7_.png" length="42835" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt4</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt4</guid>
  <pubDate>Mon, 21 Nov 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-11-21T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022! Part 4: HTTP/101" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f056eb78-e350-4939-9a29-ecbc070a9b86/Frame_1__7_.png"/></div><h2 class="heading" style="text-align:left;"><b>Recap:</b></h2><p class="paragraph" style="text-align:justify;">Welcome back, buddy! You&#39;re progressing a lot in this guide! Only a few have managed to come this far (especially since networking isn&#39;t something anyone wants to learn about)! <b>Be proud of your progress!!</b>Last 2 weeks, we&#39;ve covered networking basics (see <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank" rel="noopener noreferrer nofollow">part 2</a> and<a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt3?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank" rel="noopener noreferrer nofollow"> part 3</a>) that were needed for starting out in bug bounty, we also talked about protocols, and one of them that we will be diving into is the <b>Hypertext Transfer Protocol</b> (or <b>HTTP</b> for short). It&#39;s the language that you (as the client) use to communicate with other servers on the internet! And since we carry most of our attacks on websites, we&#39;d need to master this and know everything about it to understand what is going on! It&#39;s going to help us tremendously later on!</p><h2 class="heading" style="text-align:left;"><b>Table of Contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Recap</p></li><li><p class="paragraph" style="text-align:left;">HTTP Introduction</p></li><li><p class="paragraph" style="text-align:left;">Request</p><ul><li><p class="paragraph" style="text-align:left;">Request Methods</p></li><li><p class="paragraph" style="text-align:left;">Request Headers</p></li></ul></li><li><p class="paragraph" style="text-align:left;">Response</p><ul><li><p class="paragraph" style="text-align:left;">Response Status Codes</p></li><li><p class="paragraph" style="text-align:left;">Response Headers</p></li></ul></li><li><p class="paragraph" style="text-align:left;">URL Encoding</p></li></ul><h2 class="heading" style="text-align:left;"><b>HTTP Introduction:</b></h2><p class="paragraph" style="text-align:justify;">As we&#39;ve seen earlier, the <b>Hypertext Transfer Protocol</b> (or <b>HTTP</b>) is located in the application layer of the OSI Model. HTTP is the protocol that allows us to communicate with servers on the internet. You&#39;ve probably seen a raw HTTP request before, but take a look at the request below:</p><div class="image"><img alt="Raw HTTP Request" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/87f4ca3f-e2d6-4dd3-beaf-ec7218651634/Computer_A__6_.png"/></div><p class="paragraph" style="text-align:justify;">In the example above, the client (we) request a document on another server on the internet. In this case, we are making a GET request (more on this later) to example.com to retrieve the home or index page. The server receives the incoming request, and returns the index document, just like we requested. (Depending on what technologies or server&#39;s configuration, the index file may vary. If the web application&#39;s backend is written in PHP, then the server is most likely to return <b>index.php</b>. For (static) HTML files, it&#39;ll return <b>index.html</b>., for websites that use the .NET framework, it&#39;ll return <b>Default.aspx</b>, etc.).HTTP can be used to request and return a variety of documents and media files such as images, videos, text files, XML files, etc. as long as the <b>Content-Type header</b> is defined, so that you (the client) as well as the server, can understand what type of file is being sent or received. This helps your web browser to render for example a PDF or HTML file instead of displaying it in plain text.You&#39;ll also come across <b>HTTP versions</b>, and at the time, the latest version is <b>HTTP/3</b>. Each new version introduces several changes, so far, HTTP/3 has abandoned TCP and is now relying on the QUIC protocol (on UDP, it&#39;s much faster for web applications). I&#39;m not going to get into detail here, but I do recommend you to read more about it.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Request:</b></h2><p class="paragraph" style="text-align:justify;">As we&#39;ve seen above, a typical <b>valid HTTP request</b> consists of a <b>request line</b> (an <b>HTTP method</b>, <b>path</b> and <b>HTTP version</b>), <b>request headers</b>, and, depending on the request method, a <b>request body</b> all followed by a newline consisting of <b>CR/LF</b> (Carriage Return: \r and Line Feed: \n) characters. Let&#39;s take a look at a typical <b>GET request</b> and go over the components of a <b>valid HTTP request</b>:</p><div class="image"><img alt="Raw HTTP Request" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/feb943e0-7c03-40f3-88f9-95e29987bf41/Frame_1__8_.png"/></div><h3 class="heading" style="text-align:left;"><b>Request Methods:</b></h3><p class="paragraph" style="text-align:justify;">There are a lot of HTTP methods, however, only some of them are documented (the others are custom but are also important in identifying weird exploitable behaviour). You can think of an HTTP method as an instruction to what the server should do. Should it retrieve a document for you? Then you&#39;re probably sending a <b>GET</b> request. Are you updating an existing value (for instance, updating your profile data) or perhaps requesting to create a new entry (for example registering your account)? In that case, you&#39;re most likely sending a <b>PUT</b> or a <b>POST</b> request. There are a lot of HTTP methods that are used to communicate with servers at the moment. I&#39;ve lined up below some of the most commonly used HTTP methods that you&#39;ll encounter.</p><div class="image"><img alt="HTTP Methods" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/5e16552b-ad91-4816-afdb-3e21f2e16b97/Frame_3.png"/></div><p class="paragraph" style="text-align:justify;">Please, do keep in mind that <b>developers are not always respecting RFCs</b>. This may <b>introduce security vulnerabilities.</b></p><h3 class="heading" style="text-align:left;"><b>Request Headers:</b></h3><p class="paragraph" style="text-align:justify;">HTTP request headers are necessary to provide additional information about the request or response. They are needed for example to tell which host or application you&#39;re trying to reach (it is pretty common to come across a website that shares the same IP/machine), or what type of file (that you&#39;re uploading) is in the request body, etc. Below is a list of commonly seen request headers with their corresponding description:</p><div class="image"><img alt="HTTP Headers" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/58f6947d-d8de-44d2-af35-d90ac97bd58b/Frame_1__9_.png"/></div><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">A lot of modern APIs or web applications and services also make use of custom HTTP request headers. This can help you identify technologies and take a more targeted approach when testing web applications. </p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><p class="paragraph" style="text-align:justify;">We&#39;ve covered valid HTTP requests and the reason why I keep repeating valid is that sending invalid HTTP requests may introduce weird behaviour and in some cases open up attack surfaces. Think about making HTTP requests on behalf of the server (Server-Side Request Forgery) after messing up with the host header or path or even the HTTP version. I will definitely come back at this when we&#39;re covering SSRF vulnerabilities!</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Response:</b></h2><p class="paragraph" style="text-align:justify;">A non-malformed (yes, you can cause the server to respond with a weird reply and introduce security vulnerabilities) HTTP response is similar to an HTTP request. It also consists of 3 main components, a status line (consisting of the <b>HTTP version</b>, the <b>HTTP status code</b>, and the <b>status message</b>), <b>0 or more response headers</b> (each followed by CR/LF characters), and often a <b>response body</b> (this can be absent if, for instance, you sent a HEAD request).</p><div class="image"><img alt="Raw HTTP Response" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/01db77ac-490b-4441-af1a-c7887f0483a3/Frame_2.png"/></div><h3 class="heading" style="text-align:left;"><b>Response Status Codes:</b></h3><p class="paragraph" style="text-align:justify;">HTTP status codes are codes separated into 5 different categories that range from <b>100</b> to <b>599</b> and provide us with details of how our HTTP request went. If our <b>request was successful</b>, then the server is most likely responding with <b>200 OK</b>. If it <b>couldn&#39;t find a resource</b> on the server, then it&#39;s probably responding with <b>404 Not Found</b>. I&#39;ve created a small table with the most common status codes that you&#39;ll come across along with their corresponding description to give you an idea of what it actually means:</p><div class="image"><img alt="HTTP Status Codes" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e1fdb725-9a57-4926-86e1-06de9844d5a7/Frame_4.png"/></div><p class="paragraph" style="text-align:justify;"><a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank" rel="noopener noreferrer nofollow">Mozilla Web Docs</a> provides a full list of HTTP status codes, you may want to explore and read through the list to familiarize yourself with the other status codes.Again, please keep in mind that developers are not always respecting RFCs, and sometimes use the wrong status code for a particular response. Or even think that it be used as a security measure (you read that right, sometimes developers think that redirecting the user is a sufficient measure to avoid them accessing unauthorized resources, say a component of an admin dashboard, as the response is invisible in a web browser. However, making an HTTP request using a tool like cURL can help us view the complete response).</p><h3 class="heading" style="text-align:left;"><b>Response Headers:</b></h3><p class="paragraph" style="text-align:left;">Response headers help provide more information about the response that we receive from the server, below are some commonly found response headers:</p><div class="image"><img alt="HTTP Response Headers" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/28821fce-3a75-41d2-8127-a4ff4c69cce2/Frame_2__1_.png"/></div><p class="paragraph" style="text-align:justify;">Of course, I couldn&#39;t add each and every header in this post (there are thousands of documented and undocumented headers) but if you&#39;d like to learn more about them and browse through other headers, I&#39;d highly recommend you take a look at <a class="link" href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank" rel="noopener noreferrer nofollow">Mozilla Web Docs</a>!</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>URL Encoding:</b></h2><p class="paragraph" style="text-align:justify;">here are a lot of characters in several languages (Arabic, Chinese, Russian, ...) around the globe. However, to support these in HTTP requests, they need to use the <b>ASCII character set</b> (<b>ASCII</b> stands for <b>American Standard Code for Information Interchange</b> and is based on the English alphabet). This is not always the case as there are plenty of characters that fall outside of that character set and that is why it is important to URL encode these characters. Each URL-encoded character is <b>prepended with a %</b> and the <b>character&#39;s hexadecimal value</b>. Here are some of the most used URL-encoded characters that you&#39;ll often need:</p><div class="image"><img alt="URL encoding" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/8c4aea2c-3c53-4d3c-b1d8-2ec41a8d12a0/Frame_5.png"/></div><p class="paragraph" style="text-align:justify;">If you&#39;re looking for a full list of these, you can find plenty of websites like <a class="link" href="https://www.ascii-code.com/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank" rel="noopener noreferrer nofollow">ascii-code.com</a> </p><div class="blockquote"><blockquote class="blockquote__quote"><p class="paragraph" style="text-align:left;">A lot of bypasses are around encoding your payload to make it less detectable by a filter. You do not have to memorize any of these as there are plenty of online tools to easily encode and decode payloads!</p><figcaption class="blockquote__byline"> TIP! </figcaption></blockquote></div><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thank you for reading this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next part, I will go through some tools that are commonly used to test web applications for security vulnerabilities! <b>By the way, c</b><b>ongratulations on making it this far mate! You are one of the few who have come this far and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:left;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:left;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:left;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="section" style="background-color:#ffffff;margin:0.0px 0.0px 0.0px 0.0px;padding:10.0px 10.0px 10.0px 10.0px;"><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4"><span class="button__text" style=""> Follow me on Twitter </span></a></div></div><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-4" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=62ef4ed0-ecd4-43a6-a52b-ffd52ee127c3&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty [Pt. 3]</title>
  <description>Networking Basics 2</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6f61193b-9682-4358-823b-32a6031a1bcc/Frame_1__5_.png" length="47099" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt3</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt3</guid>
  <pubDate>Tue, 15 Nov 2022 12:25:04 +0000</pubDate>
  <atom:published>2022-11-15T12:25:04Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022! Part 3: Networking Basics 2" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/6f61193b-9682-4358-823b-32a6031a1bcc/Frame_1__5_.png"/></div><h2 class="heading" style="text-align:left;"><b>Recap:</b></h2><p class="paragraph" style="text-align:justify;">Hi mate! Thanks for joining me on another part of this zero-to-hero bug bounty guide! You&#39;re doing an awesome job! <b>Keep going!</b>In <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-3" target="_blank" rel="noopener noreferrer nofollow">part 2 of this guide</a>, I went over common networking terminologies, explained the OSI-Model, briefly introduced you, with simple examples, to what a network was, and much more. If you haven&#39;t read it yet, no issue at all, you can <a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-3" target="_blank" rel="noopener noreferrer nofollow">access part 2 on my blog</a>. <b>If you did read it, I highly recommend rereading the post again to freshen up your networking knowledge!</b></p><p class="paragraph" style="text-align:justify;">In today&#39;s issue, I will explain <b>network ports</b> & <b>DNS</b>. I should&#39;ve added it to the previous part but it got a little lengthy. Long posts can be a bit challenging to follow and I tend to keep this guide simple & easy ;)! Without further ado, let&#39;s get started!</p><h2 class="heading" style="text-align:left;"><b>Table of Contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">Network Ports</p></li><li><p class="paragraph" style="text-align:left;">Domain Name System (DNS)</p></li></ul><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>Network Ports:</b></h2><p class="paragraph" style="text-align:justify;"><a class="link" href="https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-3" target="_blank" rel="noopener noreferrer nofollow">In the last post</a>, we&#39;ve seen that a destination IP address is required in order to communicate with another device in the same network. However, to make the connection complete, <b>we need to assign a service port to the IP address as well. </b>Let&#39;s take a look at the following example:</p><div class="image"><img alt="Network ports explained with example" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/95c1798a-f66c-472a-b9e1-445c1d853817/Computer_A__4_.png"/></div><p class="paragraph" style="text-align:justify;">As you can see in the illustration above, we had to connect to the host on port 80 (where the HTTP service is actually listening for any incoming connections). And our web browser is listening for a response from the server on the source PORT.Each IP address or device has <b>65535 network ports. </b>And each one of them can be registered by a running service or program. ICANN has divided this port range into 3 different classes, you do not necessarily need to remember these, but I do recommend you memorize the following common network port numbers and their associated service:</p><div class="image"><img alt="Reserved Service Ports" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/396a20bb-e377-487d-8f6b-ed46ed635ab8/Frame_1__6_.png"/></div><p class="paragraph" style="text-align:justify;"><b>Short summary:</b>The <b>IP address locates the host in the network</b>, while the <b>network port locates the requested service on the host </b>that is connected to the network.</p><hr class="content_break"><h2 class="heading" style="text-align:left;"><b>DNS:</b></h2><p class="paragraph" style="text-align:justify;">Domain Name System (or DNS for short) is responsible for making sure you connect to the correct host whenever you request a domain. You can think of it as a telephone book that converts each number to its associated contact name. Whenever you request a website, the DNS will try to resolve the domain name and get the IP. This means that you do not have to remember IP addresses, but instead, just connect to a domain name. Let&#39;s take a look at the following image below:</p><div class="image"><img alt="DNS" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/f09ccf1e-087d-4482-89db-615a10d023fc/Computer_A__5_.png"/></div><p class="paragraph" style="text-align:justify;">On your web browser, you request <b>example.com. </b>However, on the backend of this process, the DNS transforms that domain into an IP address to locate the host over the network and successfully make an HTTP connection.This is how DNS works, I do recommend learning more about DNS records (A records, CNAME records, MX records, TXT records, ...) as they will be valuable, especially in the reconnaissance phase!</p><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Thanks for making it this far!</b></h2><p class="paragraph" style="text-align:justify;">I hope you&#39;ve enjoyed this post! In the next part, I will explain the <b>HTTP</b> protocol in-depth and move on from there to commonly used tools! <b>Congratulations on making it this far mate! You are one of the few who have done this and you make much more chance to complete this guide and become a bug bounty hunter!</b></p><p class="paragraph" style="text-align:left;">If you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!</p><p class="paragraph" style="text-align:left;">Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:left;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-3"><span class="button__text" style=""> Follow me on Twitter </span></a></div><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-3" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=1d5d63ec-14cb-462f-a797-9858ef74a22c&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty [Pt. 2]</title>
  <description>Networking Basics 1</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/505f62fd-8dc0-4404-aaf9-fc0f1ff1c59b/Frame_1__4_.png" length="46704" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt2</guid>
  <pubDate>Mon, 07 Nov 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-11-07T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022! Part 2: Networking Basics 1" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/505f62fd-8dc0-4404-aaf9-fc0f1ff1c59b/Frame_1__4_.png"/></div><h2 class="heading" style="text-align:left;"><b>Introduction:</b></h2><p class="paragraph" style="text-align:justify;">Welcome back to my complete bug bounty guide! I, first of all, <b>want to thank everyone for your support</b> and <b>welcome all our new subscribers</b>!Last week, we left the guide on requirements in bug bounty, this week, I&#39;ll introduce you to networking in bug bounty.</p><p class="paragraph" style="text-align:justify;">Networking is significantly important in bug bounty as we are almost always dealing with network attacks and it also plays a huge role in reconnaissance. Knowing how everything works under the hood is essential and cannot be skipped (if you still proceed, you might find it challenging later on).</p><h2 class="heading" style="text-align:left;"><b>Table of contents:</b></h2><ul><li><p class="paragraph" style="text-align:left;">What is a Network</p></li><li><p class="paragraph" style="text-align:left;">Protocols</p></li><li><p class="paragraph" style="text-align:left;">The OSI Model</p></li><li><p class="paragraph" style="text-align:left;">The Internet Protocol</p></li><li><p class="paragraph" style="text-align:left;">Subnet mask</p></li><li><p class="paragraph" style="text-align:left;">CIDR Notation</p></li><li><p class="paragraph" style="text-align:left;">Networking terminologies</p></li></ul><h2 class="heading" style="text-align:left;"><b>What is a Network?</b></h2><p class="paragraph" style="text-align:justify;">Your home probably has several devices, let&#39;s say, you have a personal computer, a printer, a smartphone and probably also a desktop. When these devices are connected they form a network. A network makes it possible for them to transfer data from one device to the other. Let&#39;s take a look at an example below.</p><div class="image"><img alt="Network scheme image" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/9330f1d0-c86a-4640-a875-50555e127a89/Computer_A.png"/></div><p class="paragraph" style="text-align:justify;">Computer A tries to send data to the printer to print for example a document. To do so, computer A must first be in the same network as the printer. They should be connected to each other somehow in order to share data. To do so, you need a switch to connect them through a wire. The connection could also be established wirelessly by using an access point (basically, a switch without cables), this type of network is also called <b>Wireless Fidelity</b>, or <b>Wi-Fi</b> for short.And secondly, it should transmit the data in a way that is understandable for both devices (the sender, in this case: computer A, and the receiver: the printer). The structure in which data gets sent is called a <b>protocol</b>.</p><h2 class="heading" style="text-align:left;"><b>Protocols:</b></h2><p class="paragraph" style="text-align:justify;">You can think of a protocol as a language. They help both devices understand the data that is being sent. One protocol that we are going to use a lot and talk more about in-depth is the <b>Hyper Text Transfer Protocol</b>, also commonly known as <b>HTTP</b>. This is a protocol that is used to surf the web. Don&#39;t worry for now as we will cover this protocol in a separate part.<b>HTTP</b> is one of the common protocols that we will use, but there are several others (I, unfortunately, won&#39;t cover these as they are beyond the scope of this guide). <b>SMTP</b> (<b>Simple Mail Transfer Protocol</b>) is used for sending electronic mails (or emails in short), <b>Ethernet</b> is used to transfer data in wired networks, etc.</p><div class="image"><img alt="HTTP protocol explained" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e32a7e33-b4aa-460e-9797-c82aed7a8fa8/Computer_A__1_.png"/></div><p class="paragraph" style="text-align:justify;">To achieve tasks such as surfing the web & sending emails with attachments, we will need to make use of <b>several protocols</b>. The OSI Model allows us to reference each protocol and understand what is actually going on when we for example request a resource online. Let me explain what the OSI Model is, and shortly go over the layers and explain them briefly. Please, bear in mind that nowadays, not every protocol fits in the OSI Model, it is just a reference that we can use to make our lives a bit easier :)! Also, there are other models as well (such as the TCP/IP model) but are again outside the scope of this guide.</p><h2 class="heading" style="text-align:left;"><b>The OSI Model:</b></h2><p class="paragraph" style="text-align:justify;">The OSI Model helps us to understand our network by breaking it down into separate layers. It basically consists of 7 layers: <b>Physical</b>, <b>Data Link</b>, <b>Network</b>, <b>Transport</b>, <b>Session</b>, <b>Presentation </b>and <b>Application</b>. The <b>Application</b> layer (where the File Transfer Protocol and web services are located) forms the top of the model, meanwhile, the <b>Physical</b> layer is located at the bottom of the OSI Model.There are a few rather funny mnemonics that can help us memorize the 7 layers, you can choose which one to remember:</p><ul><li><p class="paragraph" style="text-align:left;"><b>A</b>_<b>P</b>enguin <b>S</b>aid <b>T</b>hat <b>N</b>obody <b>D</b>rinks <b>P</b>epsi</p></li><li><p class="paragraph" style="text-align:left;"><b>P</b>lease <b>D</b>o <b>N</b>ot <b>T</b>hrow <b>S</b>ausage <b>P</b>izza <b>A</b>way</p></li><li><p class="paragraph" style="text-align:left;"><b>P</b>lease <b>D</b>o <b>N</b>ot <b>T</b>ell <b>S</b>ales<b>p</b>eople <b>A</b>nything</p></li></ul><p class="paragraph" style="text-align:justify;">Let&#39;s take a closer look at the different layers and see what role each one has (from top to bottom).- <b>Layer 7: Application</b>The application layer is where protocols form applications are. Think of <b>HTTP</b>, <b>HTTPS</b>, <b>FTP</b>, <b>SMTP</b>, <b>SSH</b>, <b>Telnet</b>, ...- <b>Layer 6: Presentation</b>This layer is responsible for making sure that the data that is received is presented in a format that the device can fully understand.- <b>Layer 5: Session</b>Layer 5 manages the connections or sessions between the two devices.- <b>Layer 4: Transport</b>The Transport layer or layer 4 breaks the data into segments (small chunks of data, if it&#39;s large enough). This is also where the lower-level protocols such as <b>TCP</b> and <b>UDP</b> live.- <b>Layer 3: Network</b>We now have everything to send data but there&#39;s no way to know where to. This is where Layer 3 or the Network layer comes into play. The Network layer will make sure to route the data to the correct destination by adding the correct address. From now on, we call our data chunk a <b>&quot;packet&quot;</b>.The Network layer is also where the <b>Internet Protocol</b> (or <b>IPv4 </b>and <b>IPv6</b>) lives.- <b>Layer 2: Data Link</b>This layer is responsible to transfer data from one device to another device.- <b>Layer 1: Physical</b>Layer 1 or the Physical layer provides the physical connection with the device (like enabling sound, sending electrical signals, or electromagnetic waves for wireless networks, etc).This was a short introduction to the OSI Model if you want to get more in-depth, you can take a look at the following resources:</p><ul><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://osi-model.com/?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-2" target="_blank" rel="noopener noreferrer nofollow">OSI-Model - OSI-model.com</a></p></li><li><p class="paragraph" style="text-align:left;"><a class="link" href="https://www.tutorialspoint.com/The-Transport-Layer-of-OSI-Model?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-2" target="_blank" rel="noopener noreferrer nofollow">The Transport Layer of OSI Model - TutorialSpoint</a></p></li></ul><p class="paragraph" style="text-align:left;">Now that we broke down how data gets transferred between 2 machines, let&#39;s move on to the next chapter where I cover the IP.</p><h2 class="heading" style="text-align:left;"><b>The Internet Protocol:</b></h2><p class="paragraph" style="text-align:justify;">The Internet Protocol (or IP for short) forms the fundamental protocols and allows the internet to work. IP address act as a physical address. They allow devices to address each other across a network. They are unique, and there are 2 types of IPs: <b>IPv4</b> and <b>IPv6</b>. The most common IP you&#39;ll see is <b>IPv4</b>. IPv4 is older but is more commonly used. Whereas <b>IPv6</b> is much newer and only used in certain cases. They do look a lot different from each other:</p><div class="image"><img alt="IPv4 and IPv6 example" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/d5178ecc-ff5e-4acf-b952-62dc840cab5e/Computer_A__2_.png"/></div><p class="paragraph" style="text-align:justify;">Let&#39;s break down an IPv4 as we are most of the time only going to work with it. Each IP address consists of <b>4 digits</b> separated by a <b>dot</b>. And each of the numbers is called an octet as it has an 8-bit value. And as 8-bit values start at 0 and end at 255, this means that an IP address also starts at <b>0.0.0.0</b> and ends at <b>255.255.255.255</b>. This is called an <b>IP space</b> or a <b>range</b>.No worries if you haven&#39;t fully gotten this, you may want to look up how binary works to fully understand how and why an IP address starts with 0 and ends with 255.</p><div class="image"><img alt="IPv4" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/bf7019f5-9338-4dec-8584-a52adb217240/Computer_A__3_.png"/></div><h2 class="heading" style="text-align:left;"><b>Subnet mask:</b></h2><p class="paragraph" style="text-align:justify;">We can further break an IP address down into 2 parts. Each IP address has actually 2 addresses. When the first organizations in the world started making use of IPs, the first 2 numbers formed the network address and the last 2 numbers represented the host address. However, this has changed over time as more and more devices started connecting to the internet. Nowadays, you can only tell what the host and network address are by looking at the subnet mask (I won&#39;t go into detail here but all <b>0 bits</b> form the <b>host address</b> meanwhile all the <b>1 bits</b> represent the <b>network address</b>).</p><h2 class="heading" style="text-align:left;"><b>CIDR:</b></h2><p class="paragraph" style="text-align:justify;">If you have looked at some subnet masks, you may have realized that they aren&#39;t easy to write down. This is where <b>CIDR notations</b> help us. <b>CIDR</b> stands for <b>Classless Inter-Domain Routing </b>and is used to note down IP blocks. Take the following CIDR notation: <b>255.255.255.255/31</b>. It looks like an IP address followed by a forward slash with a digit. The digit is used for identifying the hosts in that particular range. <b>I recommend you read more about this subject as you will often come across these in bug bounty program scopes.</b></p><h2 class="heading" style="text-align:left;"><b>Networking terminologies:</b></h2><p class="paragraph" style="text-align:justify;"><b>TCP</b>: <b>TCP</b> stands for <b>Transmission Control Protocol</b> and it basically ensures that data chunks, now called &quot;packets&quot; get sent to their destination reliably. It does so by opening a three-way handshake connection prior to sending the data packets and by also checking for errors. Since the data is divided into smaller packets, only 1 single packet has to be resent if it did contain an error (instead of terminating the whole connection and resending everything again). After the data has been transferred to the other device, it will terminate the connection using a similar four-way handshake.As we covered earlier, TCP is located in the Network layer of the OSI Model.<b>UDP</b>: <b>UDP</b> stands for <b>User Datagram Protocol</b> and is quite <b>similar</b> to <b>TCP</b>. The only big difference between the two is that UDP does <b>not</b> <b>verify the receiving end </b>and<b> does not establish any kind of connection with it</b>. Meaning, every data packet that gets sent (even if it contains errors), will not be checked for errors and resent. This makes UDP extremely unreliable compared to TCP, however, it is still used in certain conditions where delays cannot be part of a process as UDP is much faster than TCP.UDP is also located in the Network layer of the OSI Model.If you are going to rent a <b>VPS</b> or a Virtual Private Server (basically a computer located somewhere in the cloud), then you&#39;re going to hear about SSH a lot.<b>SSH</b>: <b>SSH</b> or <b>Secure SHell</b> helps you to establish an encrypted connection with another host (in this case, your VPS) and communicate with it securely (probably execute commands and perform some tasks that may or may not break some websites).SSH and many other similar protocols are located in the Application layer of the OSI Model.</p><p class="paragraph" style="text-align:left;"><b>And this is where I will wrap this up for this part.</b></p><h2 class="heading" style="text-align:center;"><b>Thank you for making it this far!</b></h2><p class="paragraph" style="text-align:justify;">In the next part of <b>Networking basics</b>, I will go over what ports are, and explain DNS (and look at the process behind requesting a domain online) before moving on to HTTP. If you&#39;ve made it this far! Congratulations! You are one of the few who have done this + you make much more chance to complete this guide and become a bug bounty hunter!I hope you&#39;ve enjoyed this, if you have any feedback, please do not hesitate to reach out! You can<b> reply to this email </b>or <b>get in touch via Twitter DM</b>!Have a nice day and see you in the next post!</p><p class="paragraph" style="text-align:left;">You can follow me on Twitter to receive upcoming updates on this newsletter:</p><div class="button" style="text-align:center;"><a target="_blank" rel="noopener nofollow noreferrer" class="button__link" style="" href="https://twitter.com/intent/follow?screen_name=0xblackbird&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-2"><span class="button__text" style=""> Follow me on Twitter </span></a></div><hr class="content_break"><h2 class="heading" style="text-align:center;"><b>Whenever you&#39;re ready, I can help you:</b></h2><p class="paragraph" style="text-align:left;">Get <b>$200 in Digital Ocean credits</b> to set up your Virtual Private Server:</p><div class="embed"><a class="embed__url" href="https://m.do.co/c/7b360ceed203?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-2" target="_blank"><img class="embed__image embed__image--left" src="https://www.digitalocean.com/_next/static/media/social-share-default.e8530e9e.jpeg"/><div class="embed__content"><p class="embed__title"> DigitalOcean | The Cloud for Builders </p><p class="embed__description"> Simple, scalable cloud computing solutions built for startups and small-to-midsize businesses. </p><p class="embed__link"> https://m.do.co/c/7b360ceed203 </p></div></a></div></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=79b0e760-ac67-4700-ab8d-f46ddaa1dfba&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

      <item>
  <title>From zero to hero in bug bounty [Pt. 1]</title>
  <description>A complete guide to becoming a bug bounty hunter in 2022!</description>
      <enclosure url="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/e7653a2c-7ef4-48bb-8eef-af2bf68952a3/Frame_1.png" length="44007" type="image/png"/>
  <link>https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt1</link>
  <guid isPermaLink="true">https://weekly-bugbounty-content.beehiiv.com/p/zero-to-hero-bug-bounty-guide-2022-pt1</guid>
  <pubDate>Tue, 01 Nov 2022 12:37:00 +0000</pubDate>
  <atom:published>2022-11-01T12:37:00Z</atom:published>
    <dc:creator>0xblackbird bugbounty</dc:creator>
    <category><![CDATA[From Zero To Hero. A Complete Guide To Becoming A Bug Bounty Hunter In 2022]]></category>
  <content:encoded><![CDATA[
    <div class='beehiiv'><style>
  .bh__table, .bh__table_header, .bh__table_cell { border: 1px solid #C0C0C0; }
  .bh__table_cell { padding: 5px; background-color: #FFFFFF; }
  .bh__table_cell p { color: #2D2D2D; font-family: 'Helvetica',Arial,sans-serif !important; overflow-wrap: break-word; }
  .bh__table_header { padding: 5px; background-color:#F1F1F1; }
  .bh__table_header p { color: #2A2A2A; font-family:'Trebuchet MS','Lucida Grande',Tahoma,sans-serif !important; overflow-wrap: break-word; }
</style><div class='beehiiv__body'><div class="image"><img alt="From zero to hero. A complete guide to becoming a bug bounty hunter in 2022" class="image__image" style="" src="https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,format=auto,onerror=redirect,quality=80/uploads/asset/file/5c3a4991-57fc-4db9-809c-1dc46ec4b22f/Frame_1__2_.png"/></div><h2 class="heading" style="text-align:left;"><b>Introduction:</b></h2><p class="paragraph" style="text-align:left;">Hi there! So you want to learn to find security vulnerabilities in web applications and report them lawfully in exchange for awesome (often monetary) rewards/bounties? If so, you&#39;ve found the right place!Welcome to my <b>zero-to-hero bug bounty guide</b>! At the end of this series, you&#39;ll be able to understand how the web works, learn to work with the most used tools such as your browser and proxy interceptor and learn how to find and fully test common (OWASP Top 10) security vulnerabilities! This is a weekly newsletter, I will send out each part every week (hopefully at the same time and day)!Below is a small summary of what this series will cover:</p><h2 class="heading" style="text-align:left;"><b>Table of contents:</b></h2><ol start="1"><li><p class="paragraph" style="text-align:left;">A quick <b>introduction to bug bounty</b>, basic <b>requirements</b> and <b>what to expect</b> more (Part 1)</p></li><li><p class="paragraph" style="text-align:left;">How the web works (the <b>HTTP protocol</b>, common <b>request/response</b> <b>headers</b>, etc)</p></li><li><p class="paragraph" style="text-align:left;">Networking basics (explain basic <b>networking concepts</b> that you will be dealing with a lot, like what is an IP)</p></li><li><p class="paragraph" style="text-align:left;">Introduce you to common <b>web app pentesting tools</b> such as your web browser&#39;s console and a proxy interceptor</p></li><li><p class="paragraph" style="text-align:left;">Go through <b>OWASP&#39;s top 10 vulnerabilities</b>. These are common vulnerabilities that are found in websites. I&#39;m also going to tell you <b>where</b> and <b>how to find </b>them (based on my real findings, you <b>really</b> do not want to miss out on this)</p></li><li><p class="paragraph" style="text-align:left;">Once we got the basics on web app security vulnerabilities, I will teach you <b>how to find suitable programs</b> to start working on them (and get your first bounties in ;).</p></li><li><p class="paragraph" style="text-align:left;">After that, we will go ahead and start <b>automating</b> a lot of <b>repetitive work</b> (again, you do not want to miss out on this as well, I&#39;ll be revealing some work that I do for <a class="link" href="https://twitter.com/novasecio?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">@novasecio</a>).</p></li><li><p class="paragraph" style="text-align:left;">I will cover some <b>advanced bypasses</b> as well (another thing that you don&#39;t want to miss out on)</p></li></ol><p class="paragraph" style="text-align:left;"><b>I might add more to this table depending on your feedback ;)!</b>And if you are excited as I am, <b>Go ahead and </b><b><a class="link" href="https://twitter.com/share?url=https://weekly-bugbounty-content.beehiiv.com/subscribe&text=I%20am%20so%20excited%20to%20share%20with%20you%20that%20I&#39;m%20learning%20bug%20bounty%20thanks%20to%20Weekly%20Bug%20Bounty%20by%20%400xblackbird!%0A%0ACome%20join%20me%20along!" target="_blank" rel="noopener noreferrer nofollow">Tweet</a></b><b> about it!</b> Before we move on to the requirements and who I am. Let me first help you understand the <b>concept of &quot;Bug Bounty&quot;</b> and also let me clear up some <b>misconceptions</b> first to avoid any kind of disappointment.</p><h2 class="heading" style="text-align:left;"><b>What is Bug Bounty?</b></h2><p class="paragraph" style="text-align:left;">Bug bounty or bug bounty hunting is a type of activity where an ethical hacker or web application penetration tester is looking for impactful security vulnerabilities inside a pre-defined scope and under an agreement with the company. If the &quot;bug bounty hunter&quot; succeeds in finding a security vulnerability, he/she can report it to the company in exchange for a (monetary) reward, also commonly referred to as a &quot;bounty&quot;.Anything outside of the pre-defined scope is usually mentioned as &quot;out-of-scope&quot; or &quot;OOS&quot; for short. These vulnerabilities are often not rewarded as you did not adhere to the program rules.It can also occur that 2 independent bug bounty hunters report the exact same vulnerability. Usually, the first submission gets accepted, and any other submission following it will be rejected as a &quot;duplicate&quot; and is also in most cases not eligible for a (monetary) reward.You will usually report security vulnerabilities through bug bounty platforms as they provide extra coverage and guidelines that both parties, you and the company, should adhere to.</p><h2 class="heading" style="text-align:left;"><b>Bug bounty Misconceptions:</b></h2><ul><li><p class="paragraph" style="text-align:left;">First of all, bug bounty is not a get-rich-quick game. It <b>requires you to work hard, stay consistent but most importantly, keep learning new things! </b><i>(Also, just to save you some time on further research, there are no (legal) get-rich-quick jobs anywhere.)</i></p></li><li><p class="paragraph" style="text-align:left;">Bug bounty is not about finding a vulnerability, <b>it&#39;s about finding impact. You only get paid if you find something that can impact other users or cause direct harm to the company. If you are looking to get paid for every worked hour, web application penetration testing might be a good fit for you. </b><i>Also, bear in mind that companies still have the last say in what and how much they reward you.</i></p></li></ul><p class="paragraph" style="text-align:left;">To not completely demotivate you or push you away from bug bounties, I&#39;ve included some upsides as well!</p><h2 class="heading" style="text-align:left;"><b>Bug bounty Upsides:</b></h2><ul><li><p class="paragraph" style="text-align:left;">One of the big upsides is of course the rewards, you could go a few weeks long without finding a single vulnerability until that one moment when you find a critical security issue and earn your entire monthly (or even yearly salary) in just a few hours/days of actual work (this is of course backed by your years of experience and knowledge).</p></li><li><p class="paragraph" style="text-align:left;">Second upside? If you take bug bounty seriously and stay consistent every day, you can easily gain a lot of knowledge and experience to <b>apply for a job as a web application penetration tester!</b> I&#39;ve done it and there are a lot like me that got there too! With or without certification!</p></li></ul><p class="paragraph" style="text-align:left;">Now that I covered what bug bounty is all about, let me quickly introduce myself.</p><h2 class="heading" style="text-align:left;"><b>WHOAMI:</b></h2><p class="paragraph" style="text-align:left;">I am <a class="link" href="https://twitter.com/0xblackbird?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">@0xblackbird</a>, an 18-year-old bug bounty hunter with 3 years of experience in web application penetration testing and a deep background in computer programming!I wrote my first line of code when I was 11 (almost 12) years old and was into game development shortly after that, I made a couple of switches (game dev, 3D animating, ...) until I discovered web application penetration testing! I liked the fact that you can get paid (serious cash) for breaking websites and I stuck with it!At the moment, I&#39;m a full-time bug bounty hunter, I do some pentesting work on the side as well, and I&#39;m also building <a class="link" href="https://twitter.com/novasecio?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">@novasecio</a>, a Pentesting as a Service-based platform (I can&#39;t reveal more, it&#39;s private only at the moment but you&#39;re gonna love it)!I usually hunt on <a class="link" href="https://app.intigriti.com/profile/be1807v?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Intigriti</a> (I rank in the top 200 at the moment), but last few months, I&#39;ve been hunting on a few platforms as my favourite programs are not all on the same platform. I will link the most popular bug bounty platforms in the next posts when I teach you which program to look for.Let&#39;s not waste any more time and let&#39;s move on to the requirements!</p><h2 class="heading" style="text-align:left;"><b>Requirements:</b></h2><p class="paragraph" style="text-align:left;">You are most likely going to need a machine that you&#39;re quite familiar with. Windows, Mac or any Linux distro will do it. Just be comfortable with it.I know some people are hacking from their phones but it&#39;s extremely unreliable, as first of all, it&#39;s a very small screen, and secondly, you&#39;re going to waste a lot of your time on small simple tasks. I recommend you get yourself a PC or desktop (it&#39;s an investment in yourself, you can fully control your return on your investment by staying consistent).The following requirement is <i>optional</i> but I hardly recommend at least holding a grip on basic web development as you&#39;ll be dealing with a lot of client-side stuff. It&#39;s only going to help you understand things better and <b>help you find more bugs</b> (more on this later).</p><p class="paragraph" style="text-align:left;"><b>Here are a few Youtube videos on front-end web development:</b>- <a class="link" href="https://www.youtube.com/watch?v=pQN-pnXPaVg&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">2 Hours course on HTML for beginners</a>- <a class="link" href="https://www.youtube.com/watch?v=PkZNo7MFNFg&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Full Javascript course, learn it in 3.5h</a>- <a class="link" href="https://www.youtube.com/watch?v=1Rs2ND1ryYc&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Full CSS course in 6h</a>You are also probably going to start to automate your stuff later. Having the ability to program will help a lot in automating repetitive tasks! Any language is okay as long as you are comfortable with it, and it does the job.<b>Python3</b> is the easiest to learn (syntax is easy to understand) and gets recommended a lot as a first programming language. However, you can also learn <b>Ruby.</b> If you want speed <b>Rust</b>, <b>C/C++</b> or <b>Golang</b> are the way to go.If you&#39;re working on a Linux distro, bash is a must-have. <a class="link" href="https://www.youtube.com/watch?v=e7BufAVwDiM&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Here&#39;s a 3h course on bash</a>.<b>Some Youtube videos to get you started:</b>- <a class="link" href="https://www.youtube.com/watch?v=_uQrJ0TkZlc&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Learn Python3 (6h course)</a> or go for <a class="link" href="https://www.youtube.com/watch?v=rfscVS0vtbw&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Python3 (4.5h course)</a>- <a class="link" href="https://www.youtube.com/watch?v=t_ispmWmdjY&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Ruby 4h course</a>- <a class="link" href="https://www.youtube.com/watch?v=MsocPEZBd-M&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Rust 1.5h course</a>- <a class="link" href="https://www.youtube.com/watch?v=8jLOx1hD3_o&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Learn C++ (31h course)</a> 😂- <a class="link" href="https://www.youtube.com/watch?v=YS4e4q9oBaU&utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">Learn Golang (6.65h course)</a><b>Again, this is optional but highly recommended. You can also skip this part until later.</b></p><h2 class="heading" style="text-align:left;"><b>One final note</b></h2><p class="paragraph" style="text-align:left;">I do not intend to make these parts long, I want to keep my newsletter posts short and easy to follow! Any feedback is highly appreciated! You can jump into my DM&#39;s or reply to this email if you&#39;re reading this from your mailbox!If you do not have Twitter (yet), I would highly recommend you create an account as Twitter is where the biggest infosec community is.You can <b>follow me</b> & <b>direct message</b> me anytime: <a class="link" href="https://twitter.com/0xblackbird?utm_source=weekly-bugbounty-content.beehiiv.com&utm_medium=newsletter&utm_campaign=from-zero-to-hero-in-bug-bounty-pt-1" target="_blank" rel="noopener noreferrer nofollow">@0xblackbird</a></p><p class="paragraph" style="text-align:left;">A last task of today:<b>I recommend you to go through my following list on Twitter and follow every account that I follow that is related to infosec (skip the aviation stuff) to get your Twitter feed filled with bug bounty content.</b>That&#39;s the best way to keep up with the latest news on bug bounty, you get writeups, payloads, and news about latest CVEs (more on this later).This is where I end part 1 of this zero-to-hero bug bounty course. See you in the next part where <b>I will start explaining the concept of HTTP</b> and <b>how the web works</b>!</p></div><div class='beehiiv__footer'><br class='beehiiv__footer__break'><hr class='beehiiv__footer__line'><a target="_blank" class="beehiiv__footer_link" style="text-align: center;" href="https://www.beehiiv.com/?utm_campaign=08e07077-ea84-460e-be08-8e25e86defa6&utm_medium=post_rss&utm_source=weekly_bug_bounty_content">Powered by beehiiv</a></div></div>
  ]]></content:encoded>
</item>

  </channel>
</rss>
