Domain hijacking prevention: the attack that skips app security
Domain hijacking lets attackers redirect your website and email without touching your code. Learn how it happens and which simple controls can prevent it.
Axrok Team7 min read
You can patch every library and pass a full application penetration test, and still lose control of your website. Domain hijacking does not attack your application at all. It attacks the account, registrar or DNS settings that decide where your domain name points.
In January 2019, CISA warned of a global DNS infrastructure hijacking campaign in which attackers used compromised credentials to change where organizations' domain names resolved (CISA AA19-024A). It also issued Emergency Directive 19-01 after multiple US federal executive branch agency domains were affected (CISA ED 19-01). The pattern has continued. On May 12, 2025, Curve Finance said attackers gained access to the systems of its registrar, iwantmyname, and changed the DNS delegation of its curve.fi domain, sending users to a malicious site that mimicked the Curve homepage (Curve Finance).
The technique is not limited to government or crypto. This guide explains how domain hijacking works, why it slips past normal security testing, and what a practical domain hijacking prevention plan looks like.
What domain hijacking actually is
Your domain name sits on a chain of trust. A registry runs the top-level domain (such as .com), a registrar sells and manages your registration, and a DNS provider answers the question "where does this name live?" Whoever controls your registrar account or DNS records controls where your website, email and many login flows go.
The UK National Cyber Security Centre (NCSC) defines DNS hijacking as the unauthorised alteration of DNS entries in a zone file on an authoritative DNS server, or the modification of domain configurations in relation to a domain registrar, by an attacker (NCSC advisory). The same advisory says the most common DNS hijacking takes place at the registrar level, by gaining unauthorised access to a registrant's account.
How attackers get in
NCSC lists the familiar account takeover techniques used against registrar accounts:
- Phishing
- Credential stuffing
- Social engineering
The attacker does not always need your password. In the Curve case, the company said there were no signs of unauthorized access or compromised login credentials, and that the exact method of compromise was still under investigation.
What attackers do once they are in
CISA's January 2019 write-up of the campaign describes a simple sequence (CISA AA19-024A):
- Obtain credentials for an account that can change DNS records.
- Change A, MX or NS records so traffic goes to attacker infrastructure.
- Obtain valid TLS certificates for the domain, because they now control its DNS.
That third step matters for decision makers. As CISA explains in Emergency Directive 19-01, because the certificate is valid for the domain, end users receive no error warnings. NCSC adds that attackers can transparently proxy traffic to the real service while capturing credentials and sensitive data.
Why your app pentest may not catch it
A typical web application penetration test focuses on the application: authentication, access control, input handling, APIs. If you want a refresher on what that covers, see our guide on penetration testing vs vulnerability scanning.
Domain hijacking sits outside that boundary. The weak point is often an account at a third party (your registrar), an old DNS record nobody owns, or a personal email address that still controls the domain. None of those live in your codebase. Unless your scope explicitly includes your external attack surface and DNS, nobody is asked to look.
Subdomain takeover: the quieter cousin
The OWASP Web Security Testing Guide includes a dedicated test for subdomain takeover (WSTG-CONF-10). It describes the condition: a DNS record points to a non-existent or inactive external service, and the provider does not verify ownership properly (OWASP WSTG).
OWASP gives two everyday examples:
- A team moves its code off GitHub but leaves the DNS record pointing there, and someone else claims that subdomain with their own GitHub Pages account.
- A CNAME points to a second domain that the company lets expire, and anyone who registers it controls the subdomain.
According to OWASP, a successful takeover can be used to serve malicious content, run phishing, or steal session cookies and credentials. An NS record takeover has the highest impact, because it can mean control of the whole DNS zone.
A domain hijacking prevention checklist
The good news: most of the defences are administrative. Here is a checklist drawn from CISA and NCSC guidance.
1. Put the domain under company control
NCSC advises that if your domain was set up with a personal email account, you should move it to an account your organisation controls (NCSC). Its DNS hijacking advisory also recommends role accounts (for example hostmaster@) for domain contacts rather than an individual's mailbox, and keeping all four contact records (registrant, technical, administrative and billing) up to date.
2. Protect the registrar and DNS accounts like admin accounts
CISA recommends multi-factor authentication on registrar accounts and on any system that can modify DNS records, plus updating passwords for every account that can change DNS. Regularly audit who has access to the registrar control panel, as NCSC suggests.
3. Use registrar lock and consider registry lock
NCSC explains the difference. A registrar lock prevents a transfer without first removing the lock. A registry lock adds a stronger layer, where changes cannot be made until additional authentication takes place, usually including a call to the owner. Registry operators such as Verisign offer a Registry Lock service for .com, .net and several other names it operates, which protects against unauthorized and unintended updates, deletions and transfers. Availability depends on your top-level domain and registrar, and NCSC notes it sometimes involves a fee, so check with your registrar.
4. Monitor for changes
NCSC recommends that operators of critical domains consider monitoring for domain transfers, WHOIS data changes and nameserver changes. CISA also recommends auditing public DNS records to confirm they resolve where you expect, and searching for certificates issued for your domains so you can revoke any that were requested fraudulently.
5. Clean up dangling DNS
Enumerate every subdomain, current and old, and remove records that point to services you no longer use. This is exactly the test objective OWASP sets out: enumerate all possible domains and identify forgotten or misconfigured ones.
6. Have a recovery plan before you need it
The Curve incident shows how much can depend on the registrar's response. Curve said its registrar was slow to respond and that it escalated the issue upstream (Curve Finance). Know your registrar's emergency contact path, who internally can prove ownership, and how you will warn users through channels that do not depend on the hijacked domain.
Where security testing fits
A well-scoped external assessment can check the parts of this problem that are testable from the outside: subdomain enumeration, dangling records, takeover candidates and how your DNS resolves. A configuration review can then check the administrative controls, such as MFA, locks and contact records, with your team.
What a test you commission cannot do is target your registrar's support staff or systems. The registrar is a third party, and testing it would need the registrar's own permission, not yours. A test can still cover your side of the problem, such as the lock status shown in public registration records and, if you agree it in advance, phishing or pretexting aimed at the people in your company who hold registrar access. What it cannot show is how your registrar would handle a convincing impersonation request. That is why the administrative controls above matter as much as the technical checks. Our penetration testing services page describes how we scope external work.
Key takeaways
- Domain hijacking redirects your site and email without touching your application code.
- NCSC says the most common DNS hijacking happens at the registrar level, through account takeover.
- Attackers who control your DNS can obtain valid TLS certificates, so users may see no warning.
- Subdomain takeover through dangling DNS records is a related, testable risk listed in the OWASP WSTG.
- Core defences: company-owned registrar accounts, MFA, registrar or registry lock, change monitoring and DNS clean-up.
- Include your external attack surface and DNS in your testing scope, not just the application.
FAQ
What is the difference between domain hijacking and DNS hijacking?
The terms overlap. NCSC uses DNS hijacking to cover both changes to DNS records and changes to domain configuration at the registrar. Domain hijacking usually refers to losing control of the registration itself, which NCSC notes can include attackers changing ownership details to make recovery harder.
Does HTTPS protect us from domain hijacking?
Not on its own. CISA explains that an attacker who controls your DNS can obtain valid certificates for your domain, so the browser shows no error. Certificate monitoring helps you spot this.
Can a penetration test check for subdomain takeover?
Yes. OWASP includes subdomain takeover as a standard web security test (WSTG-CONF-10), but it is only checked if your scope includes DNS and external assets.
Sources
- Curve Finance, "Curve Domain Incident" (May 19, 2025): https://news.curve.finance/curve-domain-incident/
- CISA, AA19-024A DNS Infrastructure Hijacking Campaign: https://www.cisa.gov/news-events/cybersecurity-advisories/aa19-024a
- CISA, Emergency Directive 19-01 Mitigate DNS Infrastructure Tampering (closed): https://www.cisa.gov/news-events/directives/ed-19-01-mitigate-dns-infrastructure-tampering-closed
- NCSC, Advisory: Ongoing DNS hijacking and advice on how to mitigate (July 2019): https://www.ncsc.gov.uk/sites/default/files/documents/Advisory-DNS-hijacking.pdf
- NCSC, Protecting your public domain name: https://www.ncsc.gov.uk/collection/using-online-services-safely/protecting-your-public-domain-name
- OWASP Web Security Testing Guide v4.2, WSTG-CONF-10 Test for Subdomain Takeover: https://owasp.org/www-project-web-security-testing-guide/v42/4-Web_Application_Security_Testing/02-Configuration_and_Deployment_Management_Testing/10-Test_for_Subdomain_Takeover
- Verisign, Registry Lock Service: https://www.verisign.com/resources/registrar-resources/
If you would like a second pair of eyes, we offer a free Exposure Snapshot of your external attack surface, including the domains and subdomains we can see from the outside. There is no obligation. Reach out through our contact page or email zayan@axrok.com.