Domain hijacking
| Class | Availability and abuse |
|---|---|
| Also known as | Domain registration hijacking |
| MITRE ATT&CK | T1584.001 Compromise Infrastructure: Domains |
| Typical severity | Critical |
| Affects | Any registered domain: the registrar account, the DNS host account and the email address used to recover them |
Whoever controls the registration of a domain decides which nameservers answer for it, and through them where its website and its mail go. Domain hijacking is a change to that registration made without the permission of the holder.1 The attacker works through the account at the registrar or at the DNS host, entered with stolen credentials or a password reset.12 A domain whose holder lets it lapse can be taken with no break-in at all, by registering it once the registry releases it.3 Claiming one subdomain through a forgotten record is Subdomain takeover.
Routes to the registration
Anyone who signs in to the registrar account can repoint the domain or start a transfer. Known routes in include the forgotten-password flow on the owner's email, persuading registrar staff, gaps in the renewal process, and a compromised cloud account that manages DNS, such as AWS Route 53.1 A 2005 review blamed successful hijacks on weak registration and administration processes, transfers that ignored the transfer policy, and poor security habits.4
Moving a domain to another registrar needs an authorization code (Auth-Code or EPP code) that the current registrar creates to identify the holder.5 The same review asked registries to stop registrars that issued one code for all their domains, which removed that check.4
What the attacker controls
With the registration in hand, the attacker edits the DNS records: NS records name the nameservers, A records give the web server's address, MX records say where mail is delivered. Traffic can pass through the attacker's machine to the real service, so the site keeps working while requests are read. Control of the records also yields a valid TLS certificate for the name, so visitors see no browser warning while their HTTPS traffic is decrypted.2
Repointed MX records send mail for every address at the domain to the attacker, password-reset messages from other services included.26 Other outcomes include outages, Phishing pages on the real name, eavesdropping and Website defacement.4 In domain shadowing, the attacker keeps every existing record and adds subdomains for its own servers; nothing breaks, so they can go unnoticed for a long time.1
Expiry
For generic top-level domains, ICANN's Expired Registration Recovery Policy sets the timeline. Reminders go out about a month and about a week before expiry, to the registrant email address. After expiry the registrar may offer an auto-renew grace period of 1 to 45 days, during which, depending on its terms, the name can be sold or auctioned to someone else. A deleted domain enters a 30-day Redemption Grace Period in which only the former holder can restore it, and before deletion the registrar cuts the domain's DNS for up to eight days, stopping the website and mail as a last warning.7 Five days after the redemption period ends, the registry purges the name and anyone can register it.3
The new holder receives all mail sent to the old addresses. In 2022 an analysis of the npm registry found 3,210 packages with at least one maintainer whose email domain was for sale. A forgotten-password request mailed a temporary password to that address, enough to sign in and publish a malicious version of each package. A maintainer account with two-factor sign-in could not be taken this way.6
Squarespace domains, July 2024
Squarespace bought about 10 million domain registrations from Google Domains in June 2023, and a year later many migrated customers had still not set up their new accounts.8 On 9 July 2024 it detected customer accounts being used to change domain settings and nameservers. The targets were cryptocurrency businesses, and the attacks ran until 11 July.9 At least a dozen organisations were hit, among them Compound Finance, Celer Network, Pendle Finance and Unstoppable Domains, and some of the domains sent visitors to phishing pages built to steal their cryptocurrency.8
The cause is disputed. Researchers at Metamask concluded that migrated accounts nobody had set up yet could be claimed by signing up with the email address listed on the domain, since new password accounts needed no email verification.8 Squarespace's postmortem put the hijacks down to a weakness in its OAuth sign-in, fixed on 12 July, stated that every compromised account used third-party OAuth, and denied that the migration changed multi-factor settings.9
Locks
Each domain carries status codes defined in EPP, the protocol registrars use to send changes to the registry. Client codes are set by the registrar, server codes by the registry, and server codes take precedence. Asking the registrar to set the three client locks helps prevent transfers, deletions and updates nobody authorised.3
| Code | Set by | Effect |
|---|---|---|
clientTransferProhibited | Registrar | The registry rejects transfers to another registrar |
clientUpdateProhibited | Registrar | The registry rejects updates to the registration |
clientDeleteProhibited | Registrar | The registry rejects deletion |
serverTransferProhibited, serverUpdateProhibited, serverDeleteProhibited | Registry | The same blocks, set through a Registry Lock service where the registry offers one |
Lifting a server code takes longer, since the registrar must ask the registry to act.3 Transfer rules add a second delay: after a change to the registrant's name, organisation or email address, the domain cannot move to another registrar for 60 days, although some registrars offer an opt-out.5
Account protection
The registrar has to give the holder a way to remove a lock, so anyone signed in to the account can lift it.5 After a DNS tampering campaign hit several US executive branch agency domains, a January 2019 emergency directive gave agencies ten business days to set new passwords and turn on multi-factor authentication for every account that could change DNS records, registrar accounts included.2 It advised against codes sent by SMS, preferred security keys, and told agencies whose registrar offered no MFA to move the domain elsewhere.2 The mailbox that receives the registrar's resets needs the same protection, and the registrant email has to stay current, since expiry reminders go nowhere else.7
Watching for changes
A hijack is visible from outside as a change. A Whois lookup shows anyone a domain's status codes, including a missing lock.3 The 2019 directive asked agencies to check that NS and MX records still resolve to the intended place, and to watch Certificate Transparency logs for certificates nobody had requested.2 Changes to the registrant contact, or to where the domain resolves, are the signals to alert on.1
In SecFlash
SecFlash reports a domain registration that is close to expiry as SF-EML-201 on the Email and domain page.
See also
- Subdomain takeover
- Look-alike domains
- DNS records
- DNSSEC
- Diagnosing website downtime
- Email authentication (SPF, DKIM and DMARC)
- Category: Availability and abuse
References
- a b c d e "Compromise Infrastructure: Domains, T1584.001". MITRE ATT&CK.
- a b c d e f Cybersecurity and Infrastructure Security Agency (22 January 2019). "ED 19-01: Mitigate DNS Infrastructure Tampering". cisa.gov (archived).
- a b c d e ICANN. "EPP Status Codes: What Do They Mean, and Why Should I Know?". icann.org.
- a b c ICANN Security and Stability Advisory Committee (12 July 2005). "SAC007: Executive Summary for Domain Name Hijacking: Incidents, Threats, Risks, and Remedial Actions". icann.org.
- a b c ICANN. "FAQs for Registrants: Transferring Your Domain Name". icann.org.
- a b JFrog (May 2022). "Npm Package Hijacking Through Domain Takeover: How Bad is this New Attack?". JFrog Blog.
- a b "5 Things every Domain Name Registrant should know about ICANN's Expired Registration Recovery Policy (ERRP)". icann.org. ICANN.
- a b c Krebs, Brian (15 July 2024, updated 23 July). "Researchers: Weak Security Defaults Enabled Squarespace Domains Hijacks". KrebsOnSecurity.
- a b Squarespace (18 July 2024). "Domain Hijacking" (incident report and postmortem). Squarespace Status.