SaitoTech / saito-lite

A cross-platform javascript saito implementation
https://saito.io
58 stars 20 forks source link

Security Report: Subdomain Takeover of https://merch.saito.io/ Pointing to Netlify #272

Closed aparcekarl closed 2 years ago

aparcekarl commented 2 years ago

Hi Saito 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 subdomain (saito.io) pointing to vulnerable Third Party site "Netlify" This issue is about your subdomain being misconfigured in Netlify

Please take a look

https://merch.saito.io/ POC

I temporarily takeover the subdomain and hosted a sample website for POC. Please take a look

POC1

Everytime you navigate to the subdomain, you will be pointed to the website that I now already owned. Image 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 merch.saito.io because an outdated DNS entry pointed to Snapshot. 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 app.saito.io is scoped to *saito.io 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. Risk Breakdown

Risk: Critical 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

arpee commented 2 years ago

This is resolved.

No subdomain takeover, simply an old redirect for a test.

Thanks for the notification.

aparcekarl commented 2 years ago

Hi, Do you want more proof of concept for Subdomain Takeover? This is not a redirect.

aparcekarl commented 2 years ago

@arpee Hi please take a look I create a new poc showing a full control of the subdomain.

0A979305-1479-4F92-848A-DB4936BF30BE