This post was written in collaboration with Level 3 Threat Research Labs and was originally published to Beyond Bandwidth on August 25, 2016.
The rush to connect everything to the internet is leaving millions of everyday products vulnerable and ripe for abuse. We’ve seen internet connectivity added to appliances, athletic clothing, pill bottles and even forks. Security, if it’s considered at all, is often an afterthought for Internet of Things (IoT) devices. Everyone is more susceptible to attack because of this, whether they own one of these devices or not.
Level 3 Threat Research Labs has been working with Flashpoint to track a family of malware that targets these devices for the purpose of creating Distributed Denial of Service (DDoS) botnets. The impacts of these botnets can affect anyone on the internet, not just the IoT device owners.
The malware behind these DDoS botnets goes by many names, including Lizkebab, BASHLITE, Torlus and gafgyt. In this post, we’ll highlight the devices commonly co-opted into these botnets, the command-and-control servers (C2s) used to control them, the types of attacks employed, and describe the victims of these attacks.
The source code for this malware was leaked in early 2015 and has been spun off into more than a dozen variants. Written in C, it was designed to be easily cross-compiled for multiple architectures running the Linux operating system. This makes it a good option for running on IoT devices and other embedded systems which often use different processor architectures to minimize cost and power requirements. The malware implements a standard client/server architecture modeled loosely on an IRC chatroom.
Each botnet spreads to new hosts by scanning for vulnerable devices in order to install the malware. Two primary models for scanning exist. The first instructs bots to port scan for telnet servers and attempts to brute force the username and password to gain access to the device. The other model, which is becoming increasingly common, uses external scanners to find and harvest new bots, in some cases scanning from the C2 servers themselves. The latter model adds a wide variety of infection methods, including brute forcing login credentials on SSH servers and exploiting known security weaknesses in other services.
We have seen a variety of implementations from different actors taking advantage of access to the leaked source code. We expect the infection vectors, scanning methods and overall sophistication to continue to evolve.
Groups like Lizard Squad and Poodle Corp are increasingly targeting IoT devices to build botnets to conduct DDoS attacks. They use these botnets either for their own purposes or to rent to individuals as booter or stresser services (i.e. DDoS-as-a-Service). Security camera DVRs, used to collect video from security cameras, are among the devices currently favored by these bot herders. These devices often come configured with telnet and web interfaces enabled, allowing users to configure the devices and view their security footage over the internet. Unfortunately, many are left configured with default credentials, making them low-hanging fruit for bot herders. Most of these devices run some flavor of embedded Linux. When combined with the bandwidth required to stream video, they provide a potent class of DDoS bots.
After the attacker has gained access to the device, their tools do not bother to identify the architecture of the device they have compromised. Instead, they immediately execute both the “busybox wget” and “wget” commands to retrieve their DDoS bot payloads. Then they attempt to run multiple versions of the malware compiled for different architectures (as many as 12), until one executes.
Of the bots we’ve observed participating in attacks, peaking at more than 1 million devices, a large percentage are located in Taiwan, Brazil and Colombia. A large majority of these bots were using white-labeled DVRs generically described as “H.264 DVRs” and DVRs manufactured by the company Dahua Technology. We have contacted Dahua Technology to make them aware of this issue. Our investigation shows more than one million of these two types of devices are accessible on the internet, providing a large pool of potential bots.
Figure 1 – Global Distribution of gafgyt Bots (Source: Level 3 Threat Research Labs)
Of the identifiable devices participating in these botnets, almost 96 percent were IoT devices (of which 95 percent were cameras and DVRs), roughly 4 percent were home routers and less than 1 percent were compromised Linux servers. This represents a drastic shift in the composition of botnets compared to the compromised server- and home router-based DDoS botnets we’ve seen in the past.
Level 3 Threat Research Labs in collaboration with Flashpoint has been tracking more than 200 C2s for this malware family. These C2 IPs are hard-coded in to the malware, most often specifying only a single IP address. This is in contrast with more sophisticated malware, which utilizes a variety of techniques to provide higher resiliency, and leaves this botnet no immediate defense against takedowns. This does not appear to be a concern for these bot herders, as it is easy to create a new C2 and re-compromise their bots. When bot herders want to migrate bots to a new C2, a new version of the malware is required. Despite this overall lack of sophistication, many of these botnets are capable of producing powerful attacks. Level 3 Threat Research Labs has seen attacks as large as hundreds of gigabits per second launched from these botnets.
The size of these botnets and the number of attacks they conduct varies substantially. In the month of July, we see the median C2 communicating with only 74 bots, with the largest observed C2 communicating with nearly 120,000 bots. These estimates are on the conservative side, based on an incomplete view of the infrastructure, and we expect the number of bots to actually be higher.
The number of attacks per C2 also varies. The figure below shows the top six C2s by number of unique victims, with some C2s exceeding 100 attacks a day. This graph demonstrates that C2 activity phases in and out. While the median active time for a C2 is around 13 days, it is often not contiguous. We see C2s go days, sometimes weeks, without activity before becoming active again.
Figure 2 – Top 6 C2s by Unique Victim Volume (Source: Level 3 Threat Research Labs)
DDoS victims of these botnets are mostly residential users, which is consistent with booter service clientele. We also see many popular gaming platforms and sites being attacked, which is typical of the public claims made by multiple well-known DDoS groups.
Figure 3 – Volume of Attacks by Type (Source: Level 3 Threat Research Labs)
The majority of the attacks launched are simple UDP and TCP floods. High bandwidth attacks more often used UDP floods, while high packets-per-second attacks used TCP floods. UDP attacks are more common, and we’ve seen TCP attacks decrease in popularity over the last month. While this malware supports spoofing of source addresses, we rarely see it employed. Some variants also support HTTP attacks, which make full connections to the victim webservers.
In fact, reflected attacks are noticeably absent from this family of malware. As a result, we’ve noticed some threat actor groups use multiple families of malware to supplement their arsenal.
Figure 4 – Duration of Attacks by Type (Source: Level 3 Threat Research Labs)
Most attacks are short-lived, with the median duration just over 2 minutes, and 75 percent of attacks shorter than 5 minutes.
The security of IoT devices poses a significant threat. Vendors of these devices must work to improve their security to combat this growing threat. However, as a consumer of these devices, you do have options to improve your security. If you have one of these devices, standard security best practices advice applies. However, many IoT devices don’t allow you to configure what services are exposed, and some use hardcoded credentials that can’t be changed, leaving some owners with few options. This makes researching the capabilities of these devices before purchase just as important as their operation after they are plugged in.
The use of IoT devices in botnets is not new, but as they become more common, we expect these types of botnets to increase in number and power. While compromised hosts and home routers continue to be targeted, bot herders will follow the path of least resistance. Before spending more energy on traditional bot hosts, they’ll take advantage of the abundance of insecure IoT devices. Until IoT device manufacturers start attending to security and device owners stop connecting them insecurely to the internet, we can expect this trend to continue.