Analyzing a malicious Raspberry Pi Bash script
Script Known
On the VirusTotal website, a malware analysis service, 25 of 57 scanners detect the script as malware [10]. The "First Seen in the Wild" date cited there is June 13, 2017; the first upload to VirusTotal is dated June 14, 2017. The Linux.MulDrop.14 script is detected by 16 of 56 virus scanners [11]. However, this version of the LinuxMulDrop.14 [3] was uploaded to VirusTotal for the first time by me.
A random test to determine whether these login attempts actually came from Raspberry Pis shows by means of the SSH banner that it is without question the Raspbian operating system.
Conclusions: Lessons Learned
The firewalls in an enterprise or organization should only allow incoming connections to resources that are explicitly approved or centrally managed. Moreover, SSH servers must always be especially secured, because the SSH port is subject to many brute force attacks on passwords.
Additionally, it is very useful to deploy hacker tools – especially ZMap – to search for open ports in your own IP address range. A Raspberry Pi is suitable as a scanner for this purpose. Special vulnerability scanners (e.g., OpenVAS/Greenbone [12]) can also search specifically for services with default passwords. Administrators always should change default passwords, because they cannot rule out early on that the system will not be accessible on the Internet at some point.
The sudo
configuration common today, and which is especially open on the Raspberry Pi, is not suitable for computers that are reachable from the Internet. An adapted (i.e., hardened) configuration must be imported before production release.
As the example proves, active Linux malware does exist – here in an incarnation for Raspbian – and can cause trouble and extra work for admins. Linux is by no means resistant to malicious software. This malware is still active and still produces log entries day after day.
Infos
- Rasp Pi misused for mining: https://erawanarifnugroho.com/2017/08/25/raspberry-pi-exploited-cryptocurrency-mining.html
- Linux.MulDrop.14: https://vms.drweb.com/virus/?i=15389228
- Funtimes-ninja: https://github.com/funtimes-ninja/malware/blob/master/01b728eb3aa7560ec3e36eae9077cc31b057c0b65cf44f3b252393f274ea758c
- Hashcat: https://hashcat.net/hashcat
- Hashcat benchmarks: https://gist.github.com/epixoip/a83d38f412b4737e99bbef804a270c40
- ZMap: https://zmap.io
- SSHPass: https://sourceforge.net/projects/sshpass
- PF_RING: https://www.ntop.org/products/packet-capture/pf_ring
- Undernet: https://en.wikipedia.org/wiki/Undernet
- QgEliheu signature: https://www.virustotal.com/#/file/6d1fe6ab3cd04ca5d1ab790339ee2b6577553bc042af3b7587ece0c195267c9b/detection
- Linux.MulDrop.14 signature: https://www.virustotal.com/#/file/c931e216f6c106257b5bdd1a24a23219083f37155f70b5c22e5e893ac6c1ab4a/detection
- OpenVAS: http://www.openvas.org/index.html
« Previous 1 2 3
Buy this article as PDF
(incl. VAT)