Trump Website Hacked: Subdomain Takeover Defaces Fundraising Site

Feb 22, 2017 By Paul Curran

The 2016 American elections were overshadowed with cybersecurity concerns, accusations and in some cases, actual attacks. After an election season full of the current U.S. president accusing his opponent of “treasonously” weak cybersecurity, one of his own domains, associated with his fundraising efforts has been hacked and defaced by way of a subdomain takeover.



On February 20th, hackers acting under the pseudonym “Pro_Mast3r” defaced one of Donald Trump’s official websites which is used for fundraising. Checkmarx’s Security Research Team wrote a detailed brief which explains the vulnerability that the malicious party used, an example via proof of concept as well as tools which can be used to prevent such attacks in the future.


What is a Subdomain Takeover?

A subdomain takeover is a vulnerability that results from DNS misconfiguration. It is the ability to point to external domains that expose DNS servers to this attack. A subdomain is vulnerable to such attacks if its DNS answer is an alias to an external domain that can be taken over by an attacker.



A possible attack vector is a subdomain (ex: that points to with the help of a CNAME DNS register. Github is a free repository and its contents are available at URLs in the form of “”. In this scenario, it doesn’t matter if the company has an account in Github or not.


An attacker can, for instance, launch a phishing campaign to spread malware using Github as a repository and a link to “” This link will appear legit to the victims.



Another possible scenario is the configuration of a subdomain like “” that points to “”. Heroku is a cloud platform that allows the hosting of web applications at URLs in the form of



If the “companyblog” Heroku subdomain is available for claiming, an attacker can register this Heroku subdomain and associate it with a web page that will provide several attacks, such as steal credentials, defacement or spread malware. Keep in mind that this malicious web page would be available at the “legit” URL




Finally, if a subdomain ( points to an unregistered (expired) domain it is exposed to even more attacks. By claiming the expired domain, an attacker can configure and provide several services, including email, that will be accessible through the subdomain This happens because the requests to the MX record of this subdomain will be replied by the CNAME register.






The existence of aliases to unregistered domains usually results from old projects that were discontinued and their DNS register remained configured, or from misspelling the external domains like “”. A well-known case of this was discovered by Szymon Gruszecki, an independent security researcher, in 2014. He found that the subdomain had a CNAME record pointing to This domain had expired and he was able to register it for himself. 


To read about a different example of this, with the subdomain, click here.


How to Prevent Subdomain Takeovers via DNS Misconfiguration


To mitigate this vulnerability, organizations must review their DNS configuration and assure that all the aliases and delegations of subdomains to external domains (CNAME, DNAME, NS registers) do not expose these subdomains to takeovers.


Tools on the market

Here are some useful tools to perform enumeration of subdomains:

  • Subbrute
  • Nmap
  • Recon-Ng
  • DNSRecon
  • Fierce
  • Gobuster
  • DNSenum
  • AltDNS
  • Sublist3r
  • Knock
  • HostileSubBruteforcer


HostileSubBruteforcer has the singularity of highlighting the subdomains, from the tested

domain, that point to AWS, Github, Heroku, Shopify, Tumblr, WP Engine and Squarespace

non-existing subdomains.


jumping 1



Click here to read “8 Chrome Extensions Every Security Pro Needs”  

The following two tabs change content below.

Paul Curran

Content Specialist at Checkmarx
With a background in mobile applications, Paul brings a passion for creativity reporting on application security trends, news and security issues facing developers, organizations and end users to Checkmarx's content.

Latest posts by Paul Curran (see all)

Stay Connected

Sign up today & never miss an update from the Checkmarx blog

Get a Checkmarx Free Demo Now

Interested in trying CxSAST on your own code? You can now use Checkmarx's solution to scan uncompiled / unbuilt source code in 18 coding and scripting languages and identify the vulnerable lines of code. CxSAST will even find the best-fix locations for you and suggest the best remediation techniques. Sign up for your FREE trial now.

Checkmarx is now offering you the opportunity to see how CxSAST identifies application-layer vulnerabilities in real-time. Our in-house security experts will run the scan and demonstrate how the solution's queries can be tweaked as per your specific needs and requirements. Fill in your details and we'll schedule a FREE live demo with you.