The Mirai botnet: default passwords at internet scale
Mirai is malware that turns internet-connected devices such as cameras, video recorders and home routers into a botnet. In 2016 it grew quickly by trying a short list of factory default passwords on devices exposed to the internet, and its operators used it for some of the largest DDoS attacks seen up to then. Its variants are still active, because the weakness it used is still common.
Quick facts
- What it infects
- Embedded and IoT devices: cameras, video recorders, routers
- How it spread
- By logging in with factory default credentials over remote management services
- Peak size
- About 600,000 infections, per a seven-month study (USENIX Security 2017)
- Largest attack attributed
- 623 Gbps in 2016, as cited by Google
- Official warning
- CISA alert TA16-288A, October 2016
What botnets are in general is on botnets.
How Mirai spread
- Infected devices scanned the internet for others with remote login services open.
- They tried a short list of default credentials, the user names and passwords devices ship with.
- A successful login was reported to a loader, which installed the malware on the new device.
- The new bot joined the scanning. Growth fed itself.
The malware lived in memory, so a reboot removed it, and the same default password let it back in within minutes.
What Mirai looked for
According to the USENIX study, Mirai scanned random addresses on TCP ports 23 and 2323, both used for Telnet, the plain-text remote login protocol many cheap devices left switched on. When a device answered, the bot tried to log in with a short built-in list of factory credentials.
That design explains both its speed and its limits. It needed no flaw in the device software, only an open login and an unchanged password, and devices that had either closed were simply skipped. Later variants added exploits for specific device models, which let them reach devices whose owners had changed the password.
Mirai's attacks
A Mirai attack is a DDoS attack in which infected devices send the traffic, on commands from the botnet's operators.
In late 2016 Mirai was used against high-profile targets, including a DNS provider whose outage made many well-known sites unreachable for parts of a day. The USENIX study records how the botnet emerged, which devices it took over, and a history of its victims.
The botnet could send several kinds of flood, at the network and at the application layer. Its size, not new techniques, made the floods large: hundreds of thousands of small devices, each with a modest connection. Seen from the target, a Mirai attack looks like a crowd of many sources each sending little, not one loud source, so blocking a single address does not stop it.
Mirai variants
Its source code was published in 2016, and variants multiplied. The USENIX study describes how variants evolved and competed for vulnerable hosts, adding new credentials and exploits for specific devices.
Many later IoT botnets reuse its design: scan, log in or exploit, load, repeat. When a news report names a new IoT botnet, the mechanism is often still Mirai's.
What Mirai changed
Before Mirai, large floods were expected to come from compromised computers and servers. Mirai showed that devices nobody thinks of as computers, with modest connections each, could produce floods larger than most networks could absorb. How its floods compare with the records that followed is on largest DDoS attacks.
It also moved attention to device makers. Shipping every unit with the same default password, and with remote login switched on, was revealed as a security decision with consequences for everyone else on the internet.
Protecting devices from Mirai
- Change default passwords on every device, including those installed by contractors.
- Turn off remote login services such as telnet that the device does not need.
- Keep management interfaces off the internet; reach them through a VPN or an address allowlist, as on IP blocking.
- Update firmware, and replace devices that no longer receive updates.
For sites on the receiving end, the defences are those for any botnet flood; see DDoS protection.
Signs a device may be infected
Infected devices rarely show anything on screen. The signs are in the network: a camera or recorder sending large amounts of traffic it has no reason to send, connections from the device to many random addresses on Telnet ports, and a home or office connection that slows down for no visible reason.
Because the original malware lived in memory, a restart cleared it; but the device was usually infected again within minutes if the password stayed the same. The order that works is: disconnect the device, restart it, change the password or update the firmware, and only then connect it again.
Questions
What is the Mirai botnet?
Mirai is malware that infects IoT devices such as cameras and routers using default passwords and joins them into a botnet used for DDoS attacks. It first appeared in 2016.
What is a Mirai attack?
A DDoS attack sent by devices infected with Mirai, primarily embedded and IoT devices, on commands from the botnet's operators. The USENIX study says Mirai overwhelmed several high-profile targets in late 2016 with massive DDoS attacks.
How did Mirai infect devices?
Infected devices scanned the internet for others with remote login open and tried a short list of factory default user names and passwords; successful logins were used to install the malware.
Is Mirai still active?
Its variants are. The original code circulated widely, and later IoT botnets reuse its design.
How do I protect my devices from Mirai?
Change default passwords, turn off unneeded remote login services, keep management interfaces off the internet, and update or replace device firmware.