Many companies set up subdomains for use with external services, but then forget to disable them when they stop using those services, creating a loophole for attackers to exploit.
Because many service providers don’t properly validate the ownership of subdomains pointed at their servers, attackers can set up new accounts and abuse subdomains forgotten by companies by claiming them as their own.
Removing or updating DNS entries for subdomains that are no longer actively used sounds like something that should be common procedure, but according to researchers from Detectify, a Stockholm-based provider of website security scanning services, this type of oversight is actually quite widespread among companies.
“We’ve identified at least 17 Service Providers which do not handle the subdomain ownership verification properly—allowing this vulnerability to be exploited, Heroku, Github, Bitbucket, Squarespace, Shopify, Desk, Teamwork, Unbounce, Helpjuice, HelpScout, Pingdom, Tictail, Campaign Monitor, CargoCollective, StatusPage.io and Tumblr,” the Detectify researchers said in a blog post earlier this week.
“We’ve also identified at least 200 organizations which are currently affected,” the researchers said. “In many cases, we are talking NASDAQ-listed, top 100 Alexa rank domains that basically allowed us to set up a Hello World on their domains.”
The risk to website owners depends on what can be done on a third-party service once a domain is pointed to it. If the service allows users to set up Web pages or Web redirects, attackers could exploit the situation to launch credible phishing attacks by creating rogue copies of the main website.
In an attack scenario described by Detectify, a company might set up a subdomain for use with an external support ticketing service, but later close its account and forget to delete the subdomain. Attackers could then create a new account with the same service and claim the company’s subdomain, which already has the needed DNS settings, as their own, allowing them to set up a fake website on it.
Some of the subdomains exposed to this form of hijacking that were found by Detectify belonged to various types of organizations including government agencies, health services providers, insurance companies and banks.
The security firm created an online tool that can help organizations check if they have subdomains vulnerable to this attack. The tool requires users to first prove they have control over the domains they intend to scan by using several methods.
Some service providers use similar checks. For example, to use Google Apps with a custom domain name the domain administrator needs to upload a specific HTML file to the Web server hosting the domain, to add a TXT or CNAME record in their domain’s DNS settings or to add a specific meta tag to their website’s homepage. All these methods are forms of domain ownership verification.