Attack21 Oct 2016

Mirai Botnet Takes Down Dyn DNS

Cameras and routers still on factory passwords became a botnet that knocked a major DNS provider, and many big sites, offline.

Severity
Front-page news
Difficulty
beginner
Companies
Dyn, Twitter, Amazon, Airbnb, BBC
Tech
DNS, DDoS, IoT devices, Telnet, Botnets
Root cause
insecure defaults, dependency cascade

The story

Quick (1 min)

On 21 October 2016, many popular websites, including Amazon, Airbnb and the BBC, became unreachable for large numbers of users in Europe and North America.

The sites themselves were fine. The attack hit Dyn, a company that runs DNS for them: the service that turns a name like example.com into the address computers need. If DNS can't answer, browsers can't find the site.

The attack traffic came from tens of millions of addresses, mostly ordinary internet-connected gadgets (cameras, home routers, even baby monitors) infected by malware called Mirai. Mirai broke in simply by trying a list of factory default passwords that owners had never changed.

The lesson: insecure devices become weapons, and relying on a single DNS provider creates a single point of failure.

Keep reading to the end to earn XP.Read. XP earned.

Engineer (2 min)

Mirai. Malware that turns Linux-based IoT devices into bots. Infected devices scan pseudo-random IPv4 addresses with TCP SYN probes on telnet ports 23 and 2323, then brute-force logins using a table of more than 60 common factory default usernames and passwords. Infected devices keep working normally, apart from some sluggishness and extra bandwidth use. A reboot clears the infection, but unless the password is changed the device is "reinfected within minutes" (Wikipedia).

Source code released. Mirai's source was posted publicly on Hack Forums weeks before the Dyn attack, which made attribution harder and let others build variants.

The attack. Three consecutive DDoS waves against Dyn's DNS infrastructure on 21 October, made up of huge volumes of DNS lookup requests from tens of millions of IP addresses. Dyn said, citing Flashpoint and Akamai, that the botnet consisted of IoT devices infected with Mirai.

Why big sites went down. Sites that used Dyn as their only authoritative DNS provider couldn't be resolved, so their names stopped working even though their servers were healthy. That's a dependency cascade through shared infrastructure.

Why IoT botnets are hard to stop:

  • Huge numbers of distinct source IPs defeat per-IP filtering.
  • Owners often don't notice infection.
  • Default credentials are shipped at scale, and many devices are never updated.

Interview takeaway: use multiple DNS providers for critical domains, design DDoS defence for massively distributed sources, and push for secure-by-default devices with no shared default passwords.

Keep reading to the end to earn XP.Read. XP earned.

Deep dive (2 min)

Timeline (Wikipedia)

  • August 2016: the Mirai botnet is first found by MalwareMustDie.
  • 20 September 2016: Mirai is used against Brian Krebs's website.
  • Weeks before 21 October: Mirai source code is published on Hack Forums.
  • 21 October 2016: three consecutive DDoS attacks against Dyn. Major platforms are unavailable to many users across Europe and North America.
  • 25 October 2016: President Obama says investigators still don't know who did it.
  • 26 October 2016: Flashpoint says the attack was most likely done by "script kiddies."
  • 13 December 2017: the US Justice Department announces guilty pleas from three men in cases relating to the Mirai and clickfraud botnets.
  • 9 December 2020: one of the perpetrators of the Dyn attack pleads guilty; the name is withheld because of their age.

Affected services (examples from Wikipedia's list)

Airbnb, Amazon.com, Ancestry.com, The A.V. Club and the BBC, among many others.

Unconfirmed claims

Hacktivist groups including Anonymous and New World Hackers claimed responsibility, but "scant evidence was provided."

Mirai's afterlife

Because the source code was public, many variants followed (Satori, Okiru, Masuta, Wicked and others), adding exploits for specific router and camera vulnerabilities rather than relying only on default passwords. A Mirai-based botnet called "Aisuru" was later linked to record-breaking DDoS attacks.

Why it mattered

It showed that cheap consumer devices with default credentials could be combined into a weapon big enough to disrupt core internet infrastructure, and it pushed both device security (no universal default passwords) and DNS redundancy into mainstream discussion.

Keep reading to the end to earn XP.Read. XP earned.

Failure replay

Step by step, what broke and what it hit next.

  1. 2016
    IoT devicesdegraded

    Millions of cameras, routers and DVRs are online with telnet open and factory default passwords.

    Affects: Mirai botnet

  2. Aug–Oct 2016
    Mirai botnetcompromised

    Mirai scans telnet ports 23 and 2323 and logs in with over 60 default credentials. Infected devices join the botnet.

    Affects: IoT devices

  3. Oct 21, 2016
    Mirai botnetcompromised

    The botnet floods Dyn with DNS lookup requests from tens of millions of IP addresses, in three waves.

    Affects: Dyn DNS

  4. Oct 21
    Dyn DNSdown

    Dyn's authoritative DNS can't answer legitimate queries.

    Affects: Major websites

  5. Oct 21
    Major websitesdown

    Sites that rely on Dyn, like Amazon, Airbnb and the BBC, can't be found even though their servers are fine.

    Affects: Users

  6. Oct 21
    Usersdown

    Large numbers of people in Europe and North America can't reach popular services.

  7. After
    Dyn DNSrecovering

    Attacks are mitigated. Companies add secondary DNS providers, and the industry pushes against default passwords.

Impact

Who was affected
Users across Europe and North America of sites relying on Dyn DNS, including Airbnb, Amazon.com, Ancestry.com and the BBC.
How long
Three attack waves on 21 October 2016.
Cost
not disclosed

Lessons

  • Factory default passwords at scale create botnets; devices must ship with unique credentials.
  • A single DNS provider is a single point of failure; use more than one for critical domains.
  • DDoS from millions of distinct IPs defeats simple per-IP blocking.
  • Publishing attack tooling (Mirai's source) leads to long-lived variants.

Quiz

  1. Why did Amazon, Airbnb and others go down even though their servers were fine?

    Check answer

    Their DNS provider Dyn was overwhelmed, so their domain names couldn't be resolved. Without DNS answers, browsers couldn't find the sites' addresses.

  2. How did Mirai infect devices?

    Check answer

    By logging in over telnet using common factory default usernames and passwords. Mirai used a table of more than 60 default credentials.

  3. What happens if an infected Mirai device is rebooted but its password isn't changed?

    Check answer

    It's typically reinfected within minutes. Mirai lives in memory, so a reboot clears it, but default credentials let it back in quickly.

  4. What made attributing the attack harder?

    Check answer

    Mirai's source code had been released publicly weeks earlier. Krebs noted the public source code made it harder to identify who ran this particular attack.

Interview prep

Try answering out loud before you open the model answer.

  1. system design

    How would you make your company's domains resilient to an attack like the one on Dyn in 2016?

    Show model answer

    Use at least two independent authoritative DNS providers serving the same zone, so resolvers can fall back if one is overwhelmed. Keep records synchronised automatically. Use reasonable TTLs: long enough that caches ride out short outages, short enough to change quickly when needed. Choose providers with anycast and large DDoS capacity, monitor resolution from many vantage points, and have a runbook for switching or adding providers during an attack.

    A strong answer hits:

    • Multiple independent DNS providers
    • Automated zone synchronisation
    • TTL trade-offs
    • Anycast, monitoring, runbooks
  2. security

    How did Mirai build such a large botnet, and what would stop it?

    Show model answer

    Mirai scanned random IPv4 addresses for telnet on ports 23 and 2323 and tried a list of more than 60 factory default username/password pairs. Many IoT devices shipped with those defaults and owners never changed them. Fixes: manufacturers ship unique per-device credentials, disable telnet, provide automatic updates, and block remote admin from the internet by default. Users and ISPs can change passwords, segment IoT devices, and detect scanning traffic from customer networks.

    A strong answer hits:

    • Telnet scanning and default credential brute force
    • Unique credentials and no telnet by default
    • Automatic updates
    • Network-level detection and segmentation
  3. debugging

    Your website is down for many users, but your servers show normal health and low traffic. What do you check?

    Show model answer

    The problem may be before traffic reaches you. Check DNS resolution from several locations and resolvers (dig against your authoritative servers and public resolvers). Check your DNS and CDN providers' status, certificate validity, and BGP routes to your IPs. In the Dyn case, servers were healthy but names didn't resolve because the DNS provider was under attack. Mitigate by moving traffic to a secondary DNS provider.

    A strong answer hits:

    • Check DNS resolution externally
    • Check provider status, certificates, BGP
    • Healthy servers but failed resolution points to DNS
    • Secondary provider failover

Go deeper