<?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 Daniel &quot;V&quot; Morais on Medium]]></title>
        <description><![CDATA[Stories by Daniel &quot;V&quot; Morais on Medium]]></description>
        <link>https://medium.com/@daniel_V?source=rss-a024c6d2718d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*BcAZkeQHUN1HycWul-TuJQ.png</url>
            <title>Stories by Daniel &amp;quot;V&amp;quot; Morais on Medium</title>
            <link>https://medium.com/@daniel_V?source=rss-a024c6d2718d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 15:22:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@daniel_V/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[Some critical vulnerabilities found with passive analysis on bug bounty programs explained]]></title>
            <link>https://infosecwriteups.com/some-critical-vulnerabilities-found-with-passive-analysis-on-bug-bounty-programs-explained-1da8b01c11ad?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1da8b01c11ad</guid>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[osint]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Mon, 07 Mar 2022 08:04:18 GMT</pubDate>
            <atom:updated>2022-03-07T08:04:18.223Z</atom:updated>
            <content:encoded><![CDATA[<p>This post describes three vulnerabilities found by me on bug bounty programs along with an overview about how it was found and the performed steps. The main goal of this post is to show how to find critical/high vulnerabilities without touching the company’s assets or tampering with the requests. I hope you like it and find something useful!</p><h4>Reports:</h4><ol><li>The exposed endpoint containing the invitation URL of enterprise accounts allows attackers to join the company as an employee.</li><li>Able to claim the ownership of Calendly third party service from [redacted] due to an unused calendar being mapped on the Contact page, which leads to managing scheduled client’s calls with the support team.</li><li>Source code leaked and sensitive information disclosure on public [redacted] company IP with an uncommon opened port found via Shodan analysis.</li></ol><h3><strong>Descriptions:</strong></h3><h4>1. Exposed endpoint containing the invitation URL of enterprise accounts allows to join to the company as an employee.</h4><p>During the OSINT analysis, one of the first steps that I take is to retrieve the target endpoints and URLs crawled by third parties, this can be done with open-source tools such as <a href="https://github.com/lc/gau">gau</a> and the command below:</p><p>printf target.com | gau</p><p>After that, I start to MANUALY analyze the endpoints and URLs from the output, paying particular attention to some sensitive keywords:</p><blockquote>invoice, discount, promo-code, redirect, reset_password, reset-password, password, TrackOrder, token, invite</blockquote><p>And for this one, the invite keyword suddenly took my attention on the target’s endpoints:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKx-XOHXDuruaYiyPKIOKg.png" /><figcaption>output results from gau tool</figcaption></figure><p>I just clicked on the suspicious URL and it took me to a <strong>SIGN-UP page</strong>, and after creating a new account with a personal email (<strong>@gmail.com</strong>) then I just were redirected to the company’s page inside the target application, containing <strong>all the invited employees and sensitive information as well</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*KXRT0XpBzqfII7p6AGLrQw.png" /><figcaption>sign-up page that lead me to access company’s team</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*kxiluYeA-GXr_esXC7tQQA.png" /><figcaption>PII information from employees</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/835/1*Hknvff8dA_jx1G8ELwnWCA.png" /><figcaption>Sensitive data from company</figcaption></figure><p><strong>Impact:</strong></p><p>Any user could sign-up as an employee on the target app service using the URLs being mapped on different crawlers, which would disclosure PII and sensitive information about the company for the attackers.</p><p><strong>Steps were taken to find this vulnerability:</strong></p><ol><li>Searched for all company assets available under scope using open-source tools (subfinder, amass…)</li><li>Used gau tool to retrieve a list of URLs and endpoints from the discovered domains</li><li>Grepped the results containing sensitive keywords, which in this case it was ‘invite’ grep -r &quot;invite&quot;</li><li>Manually accessed the URLs to see their content, and followed the page instructions, which lead me to Sign-up as an employee for many different companies registered under the affected target app.</li></ol><h4><strong>2. </strong>Able to claim the ownership of Calendly third party service from [redacted] due to an unused calendar being mapped on the Contact page, which leads to managing the scheduled client’s calls with the support team.</h4><p>Upon accessing the target for the first time, I generally like to analyze the whole structure of the application before attacking it. After just like 5 minutes of interacting with the different pages, I clicked on a calendar icon on the bottom left side of a <strong>Contact</strong> <strong>page</strong> and it ended opening up a blank page with an error from <a href="https://calendly.com/">Calendly’s </a>service:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/986/1*RMjort577onG3WTrxsLXLQ.png" /></figure><p>By inspecting the page, I was able to see a <strong>GET </strong>request to target-v2/call which comes to be <strong>the registered calendar name from the third-party service</strong> Calendly. I immediately signed up a new account there, created a new calendar, and then it asked me for a unique name that would be attached to the URL, so I automatically thought about takeovers attacks.</p><p>I provided target-v2 as the name of the Calendar, proceeded with the creation and boom!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1011/1*40t7vu4MuI4WaaELJ8jLWw.png" /><figcaption>Calendly service takeover on target’s contact page</figcaption></figure><p>My newly created calendar were displaying at the contact page from the target’s domain, so if anyone scheduled a call with the support team, they would be actually scheduling with me (attacker).</p><p><strong>Impact:</strong></p><p>Any user could takeover the third party service calendar being used to schedule support calls to the target company, this allowed attackers to easily perform phishing attacks and manage all the scheduled calls with target’s clients.</p><p><strong>Steps taken to find this vulnerability:</strong></p><ol><li>First I manually analyzed the application functionalities and pages as a normal user</li><li>Then I found on the Contact page, a third party integrated app as a scheduling calendar (Calendly service)</li><li>Finally I thought about a possible takeover of calendars from this platform. For this, I signed up a new account, studied the creation of calendars, and then I registered the name used by the target app as my new calendar.</li><li>Instantly my calendar got linked to the Contact page from the target app, and then scheduled calls with the target support team were now totally managed by me (attacker).</li></ol><p><strong>3. Source code leak and sensitive information disclosure on public [redacted] IP with an uncommon opened port found via Shodan analysis.</strong></p><p>This last one was found during a manual Shodan analysis of the target app. I started with the below Dork just to grab more info about the target:</p><p>ssl:target.com</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgNKbh2qJC5DfTsTE_Q4ow.png" /></figure><p>and manually looked for uncommon opened ports by accessing the “View Report” option. Suddenly there was one host with the port “9869” opened, which I instantly tried to access and it lead me to a password protected page in order to access the content from the page:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*eA525qABNc0OzF-yGnQY9g.png" /></figure><p>Then I did a bruteforce attack to find directories and endpoints using <a href="https://github.com/ffuf/ffuf">ffuf</a> tool, which gave me good results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*klsmMR8Z9Mzx80irJY8kFw.png" /></figure><p>After getting a response for the share endpoint, I access it and from there it was possible to access the source code from company’s project in a directory listing:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*NIt7accgjtneHpH1_vNWyQ.png" /></figure><p><strong>Impact</strong>:</p><p>Any user on the web could find this service exposing sensitive company files such as projects data and source code.</p><p><strong>Steps taken to find this vulnerability:</strong></p><ol><li>Started with a simple Shodan dork to filter all domains matching the company SSL certificate name</li><li>Manually searched for uncommon open ports</li><li>Accessed them and there was one host which lead me to a password protected page (highly suspicious)</li><li>Started a brute force attack using ffuf tool to discover possible hidden endpoints/directories to bypass the password page and found one</li><li>Accessed the endpoint share and the sensitive files were there.</li></ol><p><strong>Takeaways:</strong></p><p>Always perform a passive analysis over the target app using as much tools/research/dorks as possible, and there are a lot of them actually on the github, bb tips and so. One thing I learned was that as bigger the company is, the more OSINT results you`ll get, and of course, the more chances you’ll have to find a critical vulnerability such as the ones here on this article.</p><p>Daniel_v</p><p>Vendetta team</p><p><a href="https://twitter.com/d4niel_v">Twitter</a> | <a href="https://bugcrowd.com/daniel_v">BugCrowd Profile</a> | <a href="https://hackerone.com/daniel_v">H1 Profile</a> | <a href="https://www.linkedin.com/in/daniel-morais-968463120/">Linkedin</a></p><p>The Infosec Writeups team just completed our first Virtual Cybersecurity Conference and Networking event. We had 16 amazing speakers who conducted super valuable and inspiring sessions. To check the list of speakers and topics, and to get lifelong access to recorded versions of all 16 talks, <a href="https://iwcon.live./">click here.</a></p><p><a href="https://iwcon.live/">IWCon2022 - Infosec WriteUps Virtual Conference</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1da8b01c11ad" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/some-critical-vulnerabilities-found-with-passive-analysis-on-bug-bounty-programs-explained-1da8b01c11ad">Some critical vulnerabilities found with passive analysis on bug bounty programs explained</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Business logic flaw in invitation system allows to Takeover any account at private company]]></title>
            <link>https://infosecwriteups.com/business-logic-flaw-in-invitation-system-allows-to-takeover-any-account-at-private-company-daaf898966b0?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/daaf898966b0</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[writeup]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Mon, 15 Jun 2020 21:12:45 GMT</pubDate>
            <atom:updated>2020-06-15T21:12:45.502Z</atom:updated>
            <content:encoded><![CDATA[<h3>Business logic flaw in the invitation system allows to Takeover any account at a private company</h3><p>Hello Friends,</p><p>In this post, I’ll explain how I could exploit a business logic flaws under the invitation system from a private company to take over any account in their services without user’s consent.</p><h3><strong>First things first:</strong></h3><p>I have a team named “Vendetta” and there was a new target that launched a public bug bounty program that we found trough google dork, so we decided to take the first “critical” look</p><p>Normally I start to use the application as a normal user while I capture and read ALL requests using a traffic interceptor tool (e.g. Burp Suite).</p><p>The application allowed us to invite new users to the organization account under “Users” section</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*W3mgcw2QpFRe195_0G658A.png" /></figure><p>The invited user will then receive an email in their mail box with a token as below</p><p><a href="https://app.redacted.com/reset-multi-user-password/INVITE-TOKEN-HERE">https://app.redacted.com/reset-multi-user-password/INVITE-TOKEN-HERE</a></p><p>If you are a Bug hunter then the above endpoint should get your attention as it drew mine, especially in reset-multi-user-password</p><p>As I explained, the function was created to add a user to the company’s account, why are they calling this “reset password” endpoint?</p><p>With this question in mind, I decided to go deeper, when accepting the invitation , the application sent a POST request to the endpoint/activate-invited-user along with the invited email in the request body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*3y78TUVhxnRMEHLBqqE6nQ.png" /></figure><p>The problem lies here, where the <strong>invited user </strong>has control over the <strong>email and password </strong>in the request body, I thought:</p><p>“The invited user receives the invite token by thereset-multi-user-password endpoint, the user <strong>controls </strong>the <strong>invited</strong> <strong>email and new password, </strong>what If I change the invited email to owner@victim.com and forward the request along with a new password?”</p><p>Finally, I captured the “accept invite” request and change the email to “owner@victim.com” along with a new password as follows</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t0PdbPaS_7qBOJoa0ZBHHw.png" /></figure><p>And the server accepted my request, next I logged in as “owner@victim.com” with the new password to confirm the takeover.</p><p>Finally, I sent an email describing the vulnerability and the impact with below<strong> Proof of Concept </strong>to the security team:</p><ol><li>Login to your account at <a href="https://app.redacted.com/">https://app.redacted.com</a></li><li>Now invite any email that you also control under “Users” section</li><li>Click in the invite link and you’ll see a page where it will ask for you to create a new password for the account, intercept the request</li><li>Just change the email to any other user account at your application and forward the request</li><li>You have now set a new password for the “victim” email using an invitation token</li></ol><p>The security team quickly triaged and resolved this vulnerability.</p><h3><strong>Takeaways:</strong></h3><p>Always observe all the endpoint names, if you see something different than the usual, try to go deeper, you may find some interesting behaviours with them.</p><p>Thanks for your time :)</p><p>Daniel_v</p><p>Vendetta White hat Team</p><p><a href="https://twitter.com/d4niel_v">Twitter</a> | <a href="https://bugcrowd.com/daniel_v">BugCrowd Profile</a> | <a href="https://hackerone.com/daniel_v">H1 Profile</a> | <a href="https://www.linkedin.com/in/daniel-morais-968463120/">Linkedin</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=daaf898966b0" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/business-logic-flaw-in-invitation-system-allows-to-takeover-any-account-at-private-company-daaf898966b0">Business logic flaw in invitation system allows to Takeover any account at private company</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Banner Grabbing to DoS and Memory Corruption]]></title>
            <link>https://infosecwriteups.com/banner-grabbing-to-dos-and-memory-corruption-2442b1c25bbb?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/2442b1c25bbb</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Tue, 16 Apr 2019 17:16:25 GMT</pubDate>
            <atom:updated>2019-04-16T17:25:27.136Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello friends,</p><p>Sorry for my absence, I’ve been working hard these days but here I am, making my contribution to our community. Today’s topic is about a flaw that I encountered in a company I ran the Pentest privately, where I found an IIS server among its various * .subdomains.com. This specific one had two CVE’s.</p><p>What I found interesting to share was that at the beginning of my bug bounty journey, I used to report low ‘hanging fruits’ without even trying to exploit them, e.g, banner grabbing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*zUl-gmJpwSLBsJSXhqSwng.png" /></figure><p>As you can see in the image above, often the banner grabbing itself will be considered low impact and your report will most likely be closed as informative. As time goes by, you get more knowledge, your methodology changes, and you start to improve the way you look at your target, having said that, let’s start:</p><p><strong>Banner grabbing and bug bounty</strong></p><p>Banner grabbing is a process to collect details regarding any remote PC on a network and the services running on its open ports. An attacker can make use of banner grabbing in order to discover network hosts and running services with their versions on their open ports and moreover operating systems so that he can exploit it.</p><p>To make a significant impact on that, check the list of active hosts with the banner displayed, write them down, and start looking for the vulns of the versions. Something simple, but little practiced by beginners, who usually report the low impact vuln without wanting to deepen it enough to become critical.</p><p><strong>From banner grabbing to DoS and memory corruption</strong></p><p>I will show you the step by step that I made to transform a banner grabbing in DoS and memory corruption, using only the exploits spread on the internet. The company (which did not allow to be identified then let’s call redacted) had several subdomains, and many of them with their banner exposed, including on ports like ssh, ftp, but my focus will be on port 80 (http), where they did use of a internal ticket system.</p><p><strong>Discovery:</strong></p><p>I used the following nmap command to check for banners that could help me in the next approach of the target</p><blockquote><strong>nmap</strong> <strong>-Pn</strong> <strong>-p</strong> <strong>80, 443</strong> <strong>-sV</strong> — <strong>script=banner</strong> <strong>-iL all_subdomains.txt</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*15GFVDO9UJjTeQ4PwlHcQw.png" /></figure><p>For users who do not want to use nmap, this check could be done by CURL:</p><blockquote><strong>curl</strong> <strong>-s</strong> <strong>-I</strong> <strong>192.168.0.100 |</strong> <strong>grep</strong> <strong>-e</strong> <strong>“Server: “</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*XdSURy0JUePQS4rl035Otg.png" /></figure><p>The redacted company allowed DoS in its scope, since I was working locally for it, it was easy to get in touch with the infrastructure team to report on some critical flaw in that regard. Keeping in mind the IIS servers, in a quick search I found exploits to perform DoS on microsoft servers (MS15–034) to not be extensive, you can read more about the vuln <a href="https://www.sikich.com/insight/ms15-034-critical-windows-vulnerability-need-know-now/">here</a>.</p><p><strong>Detecting the vulnerability:</strong></p><p>The vulnerability can be triggered by specifying the Range header in an HTTP request. A vulnerable install will respond with an HTTP 416 Requested Range Not Satisfiable error.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/974/1*QAhEhvlJ-e9BrHwFOiu0NQ.png" /></figure><p>Am I really getting this error? Great!</p><p>Following the tutorial of the link above, I had just to specify the valid file and the byte range of 100 and as a result it lead me to a blue screen, it means … DoS!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mPulDORNxdK7CA8rO6D9VQ.png" /></figure><p><strong>Remember</strong>, when dealing with DoS in a bounty bug, check if this type of vuln is allowed, if it’s not and still you find it relevant, communicate the team properly, what I did above was accompanied by the responsible team from the company.</p><p>Sometimes the same version may have more than one critical vulnerability, which was the case with this IIS server, had previously read that it was possible to run memory dump, let’s see how the result was:</p><p><strong>Wait, Memory dump?</strong></p><p>Anything that lets you corrupt the memory on a server has the potential of a remote code execution. At least, it lets you crash processes or the operating system. We have a metasploit module for this IIS vuln (always check there using search options)</p><p><strong>Setting metasploit module</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*E4SgQ1mQjR7lrlgXieMWTQ.png" /></figure><p>Response:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*FeDY30Oxt2TWMpEuW2c0RA.png" /></figure><p>The screen is beautiful but … no “critical” data at the time I performed the dump, regardless of that, the vulnerability was successfully confirmed, which was enough :)</p><p>Metasploit memory dump module for IIS link <a href="https://www.rapid7.com/db/modules/auxiliary/scanner/http/ms15_034_http_sys_memory_dump">here</a>.</p><p><strong>Takeaways:</strong></p><p>As you have been able to observe, I have tried to focus more on the beginner community, showing how to look in a different way for those low impact vulns that are very common to find. I hope I have contributed in a way, just as I learn from all of you. Happy Hacking!</p><p>Hope you liked it, now I have a <a href="https://twitter.com/danielv47251669"><strong>twitter</strong> </a>so we can share knowledge there also.</p><p>Find me <a href="https://www.linkedin.com/in/daniel-morais-968463120/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2442b1c25bbb" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/banner-grabbing-to-dos-and-memory-corruption-2442b1c25bbb">Banner Grabbing to DoS and Memory Corruption</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bypassing rate limit abusing misconfiguration rules]]></title>
            <link>https://infosecwriteups.com/bypassing-rate-limit-abusing-misconfiguration-rules-dcd38e4e1028?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcd38e4e1028</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Fri, 15 Feb 2019 22:12:40 GMT</pubDate>
            <atom:updated>2019-02-16T03:26:47.252Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/578/1*DaNDzk82rBjYsjv4skvJBQ.png" /></figure><p>Hello Friends,</p><p>This time I’ll share with you how I was able to bypass rate limit implemented on all forms in a private program so let’s get started :)</p><p><strong>A little bit about Rate Limit:</strong></p><blockquote>A rate limiting algorithm is used to check if the user session (or IP-address) has to be limited based on the information in the session cache.</blockquote><blockquote>In case a client made too many requests within a given timeframe, HTTP-Servers can respond with status code429: Too Many Requests.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Dhyap5dZigYH_AKg5sRjdA.png" /></figure><p><strong>Discovery Phase:</strong></p><p>In the discovery process I noticed that all application functions were protected by rate limit, so I started thinking about how to ignore this algorithm implemented by the company, because once ignored, I could perform brute force attacks on multiple application functions, such as:</p><ul><li>Create multiple users through brute force</li><li>Bruteforce attacks on Sign In page</li><li>2FA bypass (unfortunately the application did not implement 2FA methods)</li></ul><p><strong>First attempt:</strong></p><p>Trigger rate limit algorithm purposefully and then change my IP. When performing such test, I was able to send 4 more requests, after that, I was blocked again.</p><p>Did you notice anything?</p><p>With this test, I got a sense that rate limit rule was being implemented by IP. I was able to identify that every 4 Requests the IP was blocked. We can now assume that the application is constantly checking how many requests we make through our remote IP.</p><p>Interesting…</p><p>I immediately thought of a second possibility: A common error in implementing a rate-limit rule is that sometimes the rule is created to block brute force attacks from remote Ips with the exception of IP <strong>127.0.0.1 </strong>(localhost)</p><p><strong>Second attempt:</strong></p><p>Add to HTTP Request Header <strong>X-Remote-IP: 127.0.0.1</strong></p><p>And … Rate Limit Bypass successfully completed!</p><p><strong>Attack Scenarios:</strong></p><p>This opened up several possibilities such as: Perform brute force on login page (which was protected with rate limit)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nx5EErfcQGLBuJmjKlt9GQ.png" /></figure><p>Perform password change spam:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1AbiGrqYjwF_QB58NZx4Rw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ir-YWdGm20C084tIP9xZMg.png" /></figure><p>If the application had two-factor authentication, we could also perform this attack on users password, but unfortunately there was no such mechanism enabled :(</p><p><strong>Tips:</strong></p><p>There’s a Burp Suite extension that automatically inserts the bypass headers into all your HTTP requests, you can find it <a href="https://portswigger.net/bappstore/ae2611da3bbc4687953a1f4ba6a4e04c">here</a></p><p>It’s a way for you to perform burp intruder attacks without having to manually insert headers in every request you make. The attack would look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*39rUvn6FTbsLBQwJpfpdpw.png" /></figure><p>Finally, I would like to thank the whole bug bounty community, it’s always a great pleasure to learn with all of you :)</p><p>Hope you liked it!</p><p>Find me <a href="https://www.linkedin.com/in/daniel-morais-968463120/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcd38e4e1028" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/bypassing-rate-limit-abusing-misconfiguration-rules-dcd38e4e1028">Bypassing rate limit abusing misconfiguration rules</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When Cookie Hijacking + HTML Injection become dangerous]]></title>
            <link>https://infosecwriteups.com/when-cookie-hijacking-html-injection-become-dangerous-3c649f7f6c88?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/3c649f7f6c88</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Mon, 07 Jan 2019 21:23:26 GMT</pubDate>
            <atom:updated>2019-01-07T21:23:26.112Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello Friends,</p><p>This time, I’ll show how I got an html injection, and how I turned it into a dangerous vulnerability with the cookie hijacking vulnerability.</p><p><strong>HTML Injection and Cookie Hijacking:</strong></p><blockquote>HTML injection is a type of injection issue that occurs when a user is able to control an input point and is able to inject arbitrary HTML code into a vulnerable web page. This vulnerability can have many consequences, like disclosure of a user’s session cookies that could be used to impersonate the victim, or, more generally, it can allow the attacker to modify the page content seen by the victims.</blockquote><blockquote>The Session Hijacking attack consists of the exploitation of the web session control mechanism, which is normally managed for a session token.</blockquote><p><strong>Discovery Phase:</strong></p><p>This time I had to perform manual tests on each input on the customer information screen. I noticed that the inputs were not being validated as expected, but how to exploit this type of vuln, since it’s necessary to log into the account to “activate” the HTML code?</p><p><strong>First attempt:</strong> Try to exploit the CSRF login vulnerability, where the attacker sends a customized code to the victim to log into the attacker’s own account. Something like this:</p><pre>&lt;html&gt;<br>  &lt;! - CSRF Login PoC -&gt;<br>  &lt;body&gt;<br>  &lt;script&gt; history.pushState (&#39;&#39;, &#39;&#39;, &#39;/&#39;) &lt;/ script&gt;<br>    &lt;form action = &quot;https://private-company.com/account/signin&quot; method = &quot;POST&quot;&gt;<br>      &lt;input type = &quot;hidden&quot; name = &quot;customerlogin&quot; value = &quot;attacker-email@gmail.com&quot; /&gt;<br>      &lt;input type = &quot;hidden&quot; name = &quot;customerpassword&quot; value = &quot;attacker-password&quot; /&gt;<br>      &lt;input type = &quot;submit&quot; value = &quot;Submit request&quot; /&gt;<br>    &lt;/ form&gt;<br>  &lt;/ body&gt;<br>&lt;/ html&gt;</pre><p>The code above wasn’t successful because the company already handled the logins of its clients through tokens.</p><p><strong>Second attempt:</strong></p><p>Cookie Hijacking! the attack was successful because the token that managed users session didn’t expire after the logout function. The cookies continued in the browser until it was cleaned manually. I’ll show it below:</p><ol><li>I logged in with a test account and then I clicked “logout”. Note in the screenshot below that cookies were still stored in the browser after the logout:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*6Glrj5890a3ZUst7BaOPRQ.png" /></figure><p>2. Note the expiration of the cookie that manages client sessions is one year.</p><p>3. I copied the cookies with a tool (<a href="https://chrome.google.com/webstore/detail/editthiscookie/fngmhnnpilhplaeedifhccceomclgfbg?hl=pt-BR">edit this cookie</a>), accessed the browser Mozilla Firefox, added the cookie manually with the values that were in the previous screenshot and… <strong>done! </strong>I was redirected to the victim’s profile.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*LDCadxq7Gq0UZxEYMt0ygw.png" /></figure><p>Great results! Time to practice Html Injection and combine the vulns for more effective demonstration.</p><p>As previously explained, the parameter “customer_name” was vulnerable to html injection. To confirm the existence of the failure, I intercepted the request with burp suite and inserted an H1 tag in the name:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YXnWIqUOt_itVP3F9FQMTQ.png" /></figure><p>After the payload, i sent a password recovery mail to my own account:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cwu0LpXuBYYCvwJihS1j0g.png" /></figure><p>Vulnerability successfully confirmed!</p><p><strong>Possibilities:</strong></p><p>As the name parameter was vulnerable to HTML Injection, it became possible to customize an html code to look like a form, which would be visible only to the user, right? Perhaps…</p><p>Let’s remember that there’s also a cookie hijacking vuln, where it allows the attacker to capture the cookies stored in the browser and log into the victim’s account. IF the application is accessed in public environments such as LAN houses, then there are several ways to exploit the vulnerability.</p><ol><li><em>Victim logs into his account at a LAN house. After performing an operation on the company’s application, victim leaves the account throught logout function.</em></li><li><em>Attacker accesses the same public computer as the victim, captures the cookies and login into the victim’s account.</em></li><li><em>Attacker customizes a new HTML code and inserts in the vulnerable field.</em></li><li><em>Victim upon re-accessing the account (on another device) begins to see the “new page” that the attacker has customized.</em></li></ol><p>Of course, this would require interaction of the victim itself, however, the famous phishing attacks would be much more effective.</p><p>That’s it, hackers! Hope you liked it.</p><p>Find me at <a href="https://www.linkedin.com/in/daniel-morais-968463120/">Linkedin</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3c649f7f6c88" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/when-cookie-hijacking-html-injection-become-dangerous-3c649f7f6c88">When Cookie Hijacking + HTML Injection become dangerous</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[taking over google calendar of a company]]></title>
            <link>https://infosecwriteups.com/taking-over-google-calendar-of-a-company-1c49071f6a9?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c49071f6a9</guid>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[hacking]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Tue, 04 Dec 2018 08:01:01 GMT</pubDate>
            <atom:updated>2018-12-05T08:56:27.486Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Taking over Google calendar of a company</strong></h3><p>Hello Guys!</p><p>This time i will show an unusual takeover that I found in a company with 30.000 customers.</p><p><strong>Summary:</strong></p><p>The flaw allows you to take the services of google Gsuite like a common takeover, making it impossible for the company to create a new Gsuite account with the domain itself.</p><p><strong>Explaining Takeover vulnerability:</strong></p><blockquote>A sub-domain takeover is considered a high severity threat and boils down to the registration of a domain by somebody else (with bad intentions) By doing this, the hacker can take full control of the sub-domains. Sub-domain Takeover can be done by using external services such as Desk, Squarespace, Shopify, Github, Tumblr, and Heroku.</blockquote><p>You can read more about it <a href="https://blog.securitybreached.org/2017/10/11/what-is-subdomain-takeover-vulnerability/">here</a>.</p><p><strong>Discovery phase:</strong></p><p>Listing all domains is the most time-consuming part of the discovery phase (i’m using my own methodology) so the first tool that i use is ‘Aquatone’ with two functions at the same time, Discovery &amp; Takeover.</p><pre>aquatone-discover — domain company.com.br &amp;&amp; aquatone-takeover — domain company.com.br</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/945/1*ux2QkXxTOeKDag7sRneyBg.png" /></figure><p>Find more about Aquatone <a href="https://github.com/michenriksen/aquatone">here</a>.</p><p>The results showed me that one of the subdomains ‘calendar.company.com.br’ had a CNAME pointed to ‘ghs.googlehosted.com’ and when i tried to access i get this error:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OtQMlnkriHbVlIDuhAqf1A.png" /></figure><p>To confirm the CNAME association i used mxtoolbox:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hwMs878bNNrpILAfapUIHQ.png" /></figure><p>Until then i was discouraged with the false positive alert by the tool, as i already had found the same flaw, i knew that it was not possible to perform a takeover in google services. Anyway, i decided to test:</p><p>I created a new Gsuite account and specified my company domain as <strong>‘calendar.company.com.br’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Af45ro5bu2oJimchq_N-Ow.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A9-deLV03YutXADjhZXGdw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V5BN4uNRZQFcvEwVr8scEw.png" /></figure><p>Next, next, next… and… <strong>Done!</strong></p><p>I received an email saying that the account was successfully registered:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/735/1*1T8d0lR5bn1oqsFTS9YB8A.png" /></figure><p>I believe that if you followed up until here, you realized the importance of running the tests to the <strong>end</strong>, even if it was not possible to schedule new events or send emails with company’s gsuite, it was enough to block new registrations on the platform.</p><p>Hope you liked it. Happy hacking :)</p><p>Find me at <a href="https://www.linkedin.com/in/daniel-morais-968463120/">Linkedin</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c49071f6a9" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/taking-over-google-calendar-of-a-company-1c49071f6a9">taking over google calendar of a company</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Security Misconfiguration to Gaining Access of SMTP server]]></title>
            <link>https://infosecwriteups.com/from-security-misconfiguration-to-gaining-access-of-smtp-server-ed833e757e6e?source=rss-a024c6d2718d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed833e757e6e</guid>
            <category><![CDATA[pentester]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[hacker]]></category>
            <category><![CDATA[pentesting]]></category>
            <category><![CDATA[bug-bounty]]></category>
            <dc:creator><![CDATA[Daniel "V" Morais]]></dc:creator>
            <pubDate>Sun, 18 Nov 2018 16:41:09 GMT</pubDate>
            <atom:updated>2018-11-18T16:41:09.935Z</atom:updated>
            <content:encoded><![CDATA[<p>From <a href="https://www.owasp.org/index.php/Top_10-2017_A6-Security_Misconfiguration"><strong>Security Misconfiguration</strong></a> to Gaining Access of SMTP server</p><p>Hello Guys!</p><p>In this article i want to show you how simple a security misconfiguration can compromise a company, even if that flaw is in their testing environment.</p><h4>Summary:</h4><p>I can send emails through any mail software (such as glock easymail) using SMTP settings provided by Amazon Simple email Service. With this, i can use any name such as ‘support@company.com.br’ or ‘admin@company.com.br’.</p><h4>What is ‘Security Misconfiguration’ ?</h4><p>Let’s get right to the point. Based on OWASP:</p><blockquote>Security misconfiguration is the most commonly seen issue. This is commonly a result of insecure default configurations, incomplete or ad hoc configurations, open cloud storage, misconfigured HTTP headers, and verbose error messages containing sensitive information. Not only must all operating systems, frameworks, libraries, and applications be securely configured, but they must be patched/upgraded in a timely fashion.</blockquote><h4>How did i Discover:</h4><p>I started with the recognition and mapping all domains of the company, as it was a large company, there were 84 domains to be analyzed, so i started to map each domain separately, accessing them and navigating manually to try to understand how the application works.</p><p>After visiting all of them, i noticed one subdomain was with the same application as the main website. Then i noticed that the subdomain were a test base, probably the company used to send new updates before they actually go to the main website.</p><h4>Here is the problem:</h4><p>Sometimes the developers leave enabled in the test base several features that, in production, would never be exposed for obvious reasons. Based on this principle, i decided to run a <em>‘</em><strong><em>Dirb</em></strong><em> https://company.com.br/’</em> to check if there were any open directory.</p><h4>Bingo!</h4><p>The phpinfo function was active on that subdomain. Basically, phpinfo is a useful PHP function for returning compiled information about the PHP environment on your server. This sould never be active, at least not publicly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gNwNTBqo2m6y13IQKmN90A.png" /><figcaption>phpinfo() function</figcaption></figure><p>Then i started to check the content that was exposed. As you can see in the image above, i had all the information needed to exploit several applications like postgres, mysql, smtp and many others. I decided to test their SMTP server settings.</p><p>So i downloaded the first software that i found on google and configured it according to the information from php function itself.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LNcvaSPcwmIPqhL5kuZ-hQ.png" /><figcaption>Setting up the smtp server</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/854/1*BtatS84ySExXFf-m8Xyz1g.png" /><figcaption>Setting up SMTP Server</figcaption></figure><p>I sent a test to myself saying “your password needs to be changed”, note, the most interesting thing is: It’s highlighted ‘sent by Amazon SeS’:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YKQucpuiQrrCbqbWu4Fd3g.png" /><figcaption>Email received</figcaption></figure><p>never think that a low level fault can not produce good results. Always check all domains, including with the same tools as you used in the main domain, each domain represents a wide range of flaws.</p><p>That’s it, friends. Hope you liked it!</p><p>find me at<a href="https://www.linkedin.com/in/daniel-morais-968463120/"> linkedin </a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed833e757e6e" width="1" height="1" alt=""><hr><p><a href="https://infosecwriteups.com/from-security-misconfiguration-to-gaining-access-of-smtp-server-ed833e757e6e">From Security Misconfiguration to Gaining Access of SMTP server</a> was originally published in <a href="https://infosecwriteups.com/">InfoSec Write-ups</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>