PancakeBunny-finance / PolygonBUNNY

3 stars 5 forks source link

Security Report: Domain Takeover of https://www.polybunny.finance/ Pointing to Netlify #1

Open aparcekarl opened 2 years ago

aparcekarl commented 2 years ago

Hi Bunny Security Team,

I just want to reach out to you. I'm trying to submit this report weather your interested on it.

Thanks for taking a look.

Recently, i just found some of your Domain (*polybunny.finance) pointing to vulnerable Third Party site "Netlify"

This is your Domain used last July 2021 and left being misconfigured in Netlify http://polybunny.finance/ http://www.polybunny.finance/

POC

I've temporarily taken over the subdomain and added it to my Netlify account and added a simple text for PoC

POC2

Everytime you navigate to the subdomain, you will be pointed to the website that I now already owned.

This vulnerability can reflect to an email leak from your company, due to the situation that the attacker can receive email transactions from the company and clients.

Please refer to this report for further information; https://hackerone.com/reports/388622 https://hackerone.com/reports/325336

Impact

I was able to hijack the domain www.polybunny.finance because an outdated DNS entry pointed to Netlify. I created a resource in that web hosting and was able to host my own content accessible via your domain. HTML files located on this domain are able to use JavaScript to access globally-scoped non-HTTPOnly cookies. For example, a cookie used to authenticate against topsecret.polybunny.finance is scoped to *polybunny.finance, so a page on my hijacked domain can steal it.

This vulnerability is rated as severe due to the increased impact that can be escalated to a high severity threat and boils down to the registration of a domain by somebody else (with bad intentions) in order to gain control over one or more (sub)domains. This presents an interesting attack vector, which can even lead to several high severity risks, like this authentication bypass explained in a bug bounty report https://hackerone.com/reports/172137 by @ArneSwinnen.

The attacker can use this method to steal cookies by hosting malicious javascript/spread malware/steal money by setting up the sale/setup fake dapp application to steal private keys/ steal login details of users/spear-phishing/authentication bypass and other bad stuff. Risk Breakdown

Risk: Severe Difficulty to Exploit: Easy Complexity: Easy Weakness Categories: Deployment Misconfiguration/Stored XSS/Authentication Bypass (CWE: 16) CVSS2 Score: 9.3 (AV:N/AC:M/Au:S/C:C/I:C/A:N) Reference: https://0xpatrik.com/subdomain-takeover/

Remediations

  1. Check your DNS-configuration for subdomains pointing to services, not in use
  2. Set up your external service so it fully listens to your wildcard DNS.
  3. Our advice is to keep your DNS entries constantly vetted and restricted.
  4. Preventing subdomain takeovers is a matter of order of operations in lifecycle management for virtual hosts and DNS. Depending on the size of the organization, this may require communication and coordination across multiple departments, which can only increase the likelihood for a vulnerable misconfiguration.
  5. Create an inventory of all of your organization’s domains and their hosting providers, and update it as things change, to ensure that nothing is left dangling.

Thank you

drunkentofu commented 2 years ago

Hi, I'm not part of the Bunny team however I'd like to point out the correct domain for Pancake Bunny Polybunny is https://polygon.pancakebunny.finance instead of the one you mentioned. I've seen the domain http://polybunny.finance/ used by a separate Polybunny project that I believe is not related to this one at all and was released months earlier and now seems to have died. I found their GitBook though https://polybunnyfinance.gitbook.io/polybunny/ and GitHub https://github.com/PolyMaticBunny in case you want to get in touch with them.