by Aliakbar Zahravi
We recently found notable malware activity affecting devices running Linux, a platform that has battled numerous issues just this year. Further analysis of retrieved malware samples revealed that these actions were connected to a botnet called Momentum (named for the image found in its communication channel). We found new details on the tools and techniques the botnet is currently using to compromise devices and perform distributed denial-of-service (DDoS) attacks.
Momentum targets the Linux platform on various CPU architectures such as ARM, MIPS, Intel, Motorola 68020, and more. The main purpose of this malware is to open a backdoor and accept commands to conduct various types of DoS attacks against a given target. The backdoors being distributed by the Momentum botnet are Mirai, Kaiten, and Bashlite variants; the specific sample we analyzed was pushing a Mirai backdoor. Moreover, Momentum spreads via exploiting multiple vulnerabilities on various routers and web services to download and execute shell scripts on the target devices.
How does Momentum work?
After infecting a device, Momentum attempts to achieve persistence by modifying the “rc” files; then it joins the command and control (C&C) server and connects to an internet relay chat (IRC) channel called #HellRoom to register itself and accept commands. The IRC protocol is the main method of communication with the command and control (C&C) servers. The botnet operators can then control infected systems by sending messages to the IRC channel.
Figure 1. After an infected device joins the attackers IRC command and control channel
Figure 2. Command and control communication path (downloader/distributer server, IRC server)
The distribution server (as seen above) hosts the malware executables. The other server is a C&C server for the botnet. The C&C servers were live as recently as November 18 2019.
Once the communication lines are established, Momentum can use various commands to attack using the compromised devices. In particular, Momentum can deploy 36 different methods for DoS, as listed below.
|ADV-TCP||TCP flooding – Improved SSYN Attack|
|BLACKNURSE||An ICMP packet flooder|
|DNS||DNS amplification flooder|
|ECE attacking (Not in use)||Type of SYN flood|
|FIN attacking (Not in use)||FIN flood|
|FRAGACK||ACK Fragmentation Flood|
|FRAG-TCP||Spoofed TCP Fragmentation Flooder|
|HOLD (Not in use)||TCP connect flooder(frag)|
|JUNK||TCP flooder (frag)|
|LDAP||LDAP amplification flooder|
|MEMCACHE||MEMCACHE amplification flooder|
|NSACK||Type of ACK flood|
|NSSYN||Type of SYN flooder|
|OVH||Type of UDP flooding (DOMINATE)|
|PHATWONK||Multiple attacks in one e.g. xmas, all flags set at once, usyn (urg syn), and any TCP flag combination.|
|RTCP||A Random TCP Flooder Fragmented packet header|
|SACK||Type of TCP flood|
|SEW Attack||Type of SYN flood|
|SSYN2||Type of SYN flood|
|TCPNULL||TCP-Nulled flooding – Flood with TCP packets with no flag set|
|UDP-BYPASS||A udp flooder (vulnMix)|
|VOLT-UDP||Spoofed UDP Flooder, Can Bypass most firewall|
|VSE||Valve Source Engine Amplification|
|XMAS||TCP Xmas flood|
Table 1. Various DoS methods that Momentum is capable of
The malware uses known reflection and amplifications methods that have a variety of targets: MEMCACHE, LDAP, DNS and Valve Source Engine. In these types of attack, the malware typically spoofs source IP addresses (the victims) to various services run on publicly accessible servers, provoking a flood of responses to overwhelm the victim’s address.
Apart from DoS attacks, we found that Momentum is also capable of other actions: opening a proxy on a port on a specified IP, changing the nick of the client, disabling or enabling packeting from the client, and more.
In the section below we will run through the specific attack capabilities of Momentum:
Momentum’s denial-of-service attacks
LDAP DDoS reflection
In a LDAP DDoS reflection, the malware spoofed the source IP address of a target system to publicly accessible LDAP servers which causes it to send a larger response to the target.
In a Memcache attack, a remote attacker constructs and sends a malicious UDP request using a spoofed source IP address of a target system to a vulnerable UDP memcached server. The memcached server then sends a significantly large response to the target. Momentum uses an HTTP GET request to download a reflection file—the malware uses the same request for the same purpose in other amplified DoS attacks as well.
Based on initial data from Shodan, there are over 42,000 vulnerable memcached servers that can be affected by this type of attack.
The Momentum botnet uses the following HTTP GET request to download reflection file:
GET / HTTP/1.1
User-Agent: Mozilla/4.75 [en] (X11; U; Linux 2.2.16-3 i686)
In a UDP-BYPASS attack, Momentum floods the target host by constructing and unloading a legitimate UDP payload on a specific port. Upon execution of this attack the malware chooses a random port and a corresponding payload, then sends it against the targeted host. The malware uses multi-threading for this attack; each thread takes a port followed by its payload.
The following is list of some ports followed by their payload:
|500||x00x11x22x33x44x55x66x77x00x00x00x00x00x00x00x00x01x10x02x00x00x00x00x00x00x00x00xC0x00x00x00xA4x00x00x00x01x00x00x00x01x00x00x00x98x01x01x00x04x03x00x00x24x01x01x00x00x80x01x00x05x80x02x00x02x80x03x00x01x80x04x00x02x80x0Bx00x01x00x0Cx00x04x00x00x00x01x03x00x00x24x02x01x00x00x80x01x00x05x80x02x00x01x80x03x00x01x80x04x00x02x80x0Bx00x01x00x0Cx00x04x00x00x00x01x03x00x00x24x03x01x00x00x80x01x00x01x80x02x00x02x80x03x00x01x80x04x00x02x80x0Bx00x01x00x0Cx00x04x00x00x00x01||Internet Key Exchange version 1, phase 1 Main Mode|
|1434||x02||MS-SQL ping attempt|
|5353||x00x00x00x00x00x01x00x00x00x00x00x00x09_servicesx07_dns-sdx04_udpx05localx00x00x0Cx00x01||DNS Service Discovery|
|8767||xf4xbex03x00x00x00x00x00x00x00x00x00x01x00x00x002xxbax85tTeamSpeakx00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00nWindows XPx00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x02x00x00x00 x00<x00x00x01x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x08nicknamex00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00||TeamSpeak 2 UDP login request|
|9987||x05xcax7fx16x9cx11xf9x89x00x00x00x00x02x9dx74x8bx45xaax7bxefxb9x9exfexadx08x19xbaxcfx41xe0x16xa2x32x6cxf3xcfxf4x8ex3cx44x83xc8x8dx51x45x6fx90x95x23x3ex00x97x2bx1cx71xb2x4exc0x61xf1xd7x6fxc5x7exf6x48x52xbfx82x6axa2x3bx65xaax18x7ax17x38xc3x81x27xc3x47xfcxa7x35xbaxfcx0fx9dx9dx72x24x9dxfcx02x17x6dx6bxb1x2dx72xc6xe3x17x1cx95xd9x69x99x57xcexddxdfx05xdcx03x94x56x04x3ax14xe5xadx9ax2bx14x30x3ax23xa3x25xadxe8xe6x39x8ax85x2axc6xdfxe5x5dx2dxa0x2fx5dx9cxd7x2bx24xfbxb0x9cxc2xbax89xb4x1bx17xa2xb6||TeamSpeak 3 UDP login request|
|1604||x1ex00x01x30x02xfdxa8xe3x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00x00||Citrix MetaFrame application browser service|
|623||x06x00xffx07x00x00x00x00x00x00x00x00x00x09x20x18xc8x81x00x38x8ex04xb5||Intelligent Platform Management Interface (IPMI) – RMCP Get Channel Auth Capabilities|
|626||SNQUERY: 127.0.0.1:AAAAAA:xsvr||Serialnumberd – Mac OS X Server|
|520||x01x01x00x00x00x00x00x00x00x00x00x00x00x00x00x00||RIP – Routing Information Protocol version 1|
|177||x00x01x00x02x00x01x00||xdmcp – X Display Manager Control Protocol|
Table 2. Ports and their payloads
Most of the scripts seen above are used for service discovery. If they are sent to the target device over a long period of time, denial-of-service may be achieved because they crash a service as a side effect of testing.
Phatwonk attacks perform multiple DoS methods at once: XMAS, all flags at once, usyn (urg syn), and any TCP flag combination.
Momentum’s other capabilities
Fruitful attacks are also dependent on other capabilities than outright offense. Usually malware attempt to evade detection, maintain open avenues of communication, and more for a sustained successful campaign.
Momentum has other capabilities that help it spread and compromise devices:
- Fast flux. The Momentum botnet uses the fast flux technique in order to make its command and control network more resilient. A fast flux network means having multiple IP addresses associated with a domain name and then constantly changing them in quick succession—this is used by attackers to mislead or evade security investigators.
- Backdoor. The attacker can send a command (“BASH”, “SHD” or SH commands) to the IRC channel and malware clients will receive and execute it on an infected system. The result will be sent back to the same IRC channel where the attacker executed it.
- Propagate. Momentum propagates by trying to exploit the vulnerabilities listed in the table below. The particular C&C server that we have been investigating has 1,232 victims shown. For other Momentum variants and C&C servers there may be more.
(appears to be incomplete exploit, similar to this)
Several vendors: Crestron AM, Barco wePresent WiPG, Extron ShareLink, Teq AV IT, SHARP PN-L703WA, Optoma WPS-Pro, Blackbox HD WPS, InFocus LiteShow Remote Command Injection
(Similar to CVE 2019-3929 and this)
|Realtek SDK UPnP SOAP Command Execution
|JAWS Webserver unauthenticated shell command execution|
|Vacron NVR RCE|
|UPnP SOAP Command Execution
(similar to this)
Table 3. Vulnerabilities and exploits used in propagation
Security recommendations and solutions
Smart and connected devices are prone compromise because of limited security settings and protection options. The devices themselves are often manufactured with operation in mind, not security. Users should take proactive steps in securing their devices, particularly routers. As mentioned above, the Momentum botnet targets Linux devices which are known to be susceptible to attacks involving botnets, ransomware and cryptocurrency miners. However, there are different ways to protect such devices from attacks.
Trend Micro Smart Home Network provides an embedded network security solution that protects all devices connected to a home network against cyberattacks. Based on Trend Micro’s rich threat research experience and industry-leading deep packet inspection (DPI) technology, Trend Micro Smart Home Network offers intelligent quality of service (iQoS), parental controls, network security, and more.
Trend Micro Deep Discovery provides detection, in-depth analysis, and proactive response to attacks using exploits and similar threats through specialized engines, custom sandboxing, and seamless correlation across the entire attack life cycle, allowing it to detect these kinds of attacks even without engine or pattern updates. These solutions are powered by XGen security, which provides a cross-generational blend of threat defense techniques against a full range of threats for data centers, cloud environments, networks, and endpoints. Smart, optimized, and connected, XGen powers Trend Micro’s suite of security solutions: Hybrid Cloud Security, User Protection, and Network Defense.
Indicator of Compromise
The post DDoS Attacks and IoT Exploits: New Activity from Momentum Botnet appeared first on .