In this post, we are talking about a new malware that most likely affects Linux systems. Researchers from FortiGuard Labs from Fortinet, a well know enterprise security firm, have been monitoring a fast-growing IoT malware family known as “RapperBot.” since mid-June 2022. The malware is said to be capable of brute forcing SSH servers to capture their credentials. Since remote attackers use this malware to gain control of vulnerable Linux systems, it is highly critical to know more about RapperBot malware and take all the precautions o protect your Linux systems from RapperBot malware.
Before we see how to protect your Linux systems from RapperBot Malware, let’s see some key extracts from the report with its working and, finally, some of the protection methods.
Table of Contents
Key Extracts from the Report:
- FortiGuard Labs has been tracking RapperBot since mid-June 2022.
- The malware affects non-windows, most likely Linux systems.
- The malware targets ARM, MIPS, SPARC, and x86 architectures
- Attackers could gain control of the vulnerable systems.
- Source code of RapperBot malware is imported from Mirai
- Unlike Mirai, RapperBot targets only SSH servers.
- In total, 3500 servers from the globe were expected to be compromised.
- IPs from the US, Taiwan, and South Korea cumulatively scored more than half of the score.
About RapperBot Malware:
RapperBot belongs to IoT malware families whose source code is expected to be imported from the Mirai botnet. The thing that keeps RapperBot different from its source Mirai is that RapperBot targets SSH credentials on vulnerable Linux servers instead of Telnet service. Attackers use this malware to compromise the victim and take control of the victim system with root privileges.
Researchers say the recent new samples clearly show that the malware keeps evolving with additional code to maintain persistence and work covered under the radar. Additionally, the malware has developed capabilities of importing new credentials from the new C2 servers instead of using hardcoded credentials in its earlier variants to brute force the victim. In the brute force attack, if the malware finds a successful match of username and password, it writes back the successful login credentials to the C2 server and stores them in its global database.
This allows the threat actors to continually add new SSH credentials without having to update infected devices with new samples. This port number ranges from 4343 to 4345 in the latest samples.– FortiGuard Labs
in the latest samples, the malware has started adding the root user and SSH keys that further allows malware authors to take complete control of the device and keep their presence even after the reboot or removal of the malware. Please read the complete technical details about the RapperBot malware here.
Tips to Protect Your Linux Systems from Rapp
There are a number of ways to protect your SSH credentials from brute force attacks. The most common and effective way is to use a strong password. A strong password should be at least eight characters long and should include a mix of letters, numbers, and symbols. It should also be changed regularly.
Another way to protect your SSH credentials from brute force attacks is to use two-factor authentication. Two-factor authentication requires users to provide both a password and a code generated by an authenticator app or device in order to log in. This makes it much more difficult for attackers to gain access to your account, even if they have your password.
You can also protect your SSH credentials by limiting the number of failed login attempts. After a certain number of failed login attempts, the account will be locked and the user will need to contact an administrator in order to regain access.
Finally, you can use a tool like fail2ban to automatically ban IP addresses that are associated with brute force attacks. This will prevent the attacker from even attempting to log in, as their IP address will be blocked.
By following these steps, you can protect your SSH credentials from brute force attacks and keep your account safe.
How to Protect Your Linux Systems From RapperBot Malware?
Since the primary attack vector of RapperBot is to brute forcing SSH credentials, it is recommended to set complex and unique passwords. Setting up key authentication instead of password authentication is a good option to protect your Linux from RapperBot Malware. Please take a look at the “How To Setup SSH Keys On The Raspberry Pi?” post to see the step-by-step procedure to set up key-based authentication instead of password-based authentication.
How to Configure Key Authentication Instead of Password on Linux?
There are a few steps that you need to take in order to configure key authentication instead of password authentication on your Linux server. Firstly, you need to generate a public/private key pair on your local machine. Next, you will need to copy the public key to your server. Finally, you will need to edit the sshd_config file to disable password authentication and enable key authentication.
In order to generate a public/private key pair, you can use the ssh-keygen command. This will generate a 2048-bit RSA key pair by default. You can change the type of key that is generated by using the -t option. For example, to generate an Ed25519 key pair, you would use the following command:
ssh-keygen -t ed25519
Once you have generated your key pair, you will need to copy the public key to your server. The easiest way to do this is using the ssh-copy-id command. This will copy your public key to the ~/.ssh/authorized_keys file on your server.
Once your public key has been copied to your server, you will need to edit the sshd_config file to disable password authentication and enable key authentication. To do this, you will need to change the following lines in the file:
PasswordAuthentication no PubkeyAuthentication yes
After making these changes, you will need to restart the SSH service in order for them to take effect.
Once you have completed these steps, you will be able to connect to your server using key authentication instead of password authentication. This is more secure than password authentication because it means that even if someone were to obtain your password, they would not be able to log in to your server unless they also had your private key.
IOCs of RapperBot Malware:
Please take these Indicators of compromise captured by FortiGuard Labs.
Threat Actor SSH Public Key
AAAAB3NzaC1yc2EAAAADAQABAAACAQC/yU0iqklqw6etPlUon4mZzxslFWq8G8sRyluQMD3i8tpQWT2cX/mwGgSRCz7HMLyxt87olYIPemTIRBiyqk8SLD3ijQpfZwQ9vsHc47hdTBfj89FeHJ GGm1KpWg8lrXeMW+5jIXTFmEFhbJ18wc25Dcds4QCM0DvZGr/Pg4+kqJ0gLyqYmB2fdNzBcU05QhhWW6tSuYcXcyAz8Cp73JmN6TcPuVqHeFYDg05KweYqTqThFFHbdxdqqrWy6fNt8q/cgI30 NBa5W2LyZ4b1v6324IEJuxImARIxTc96Igaf30LUza8kbZyc3bewY6IsFUN1PjQJcJi0ubVLyWyyJ554Tv8BBfPdY4jqCr4PzaJ2Rc1JFJYUSVVT4yX2p7L6iRpW212eZmqLMSoR5a2a/tO2s1 giIlb+0EHtFWc2QH7yz/ZBjnun7opIoslLVvYJ9cxMoLeLr5Ig+zny+IEA3x090xtcL62X0jea6btVnYo7UN2BARziisZze6oVuOTCBijuyvOM6ROZ6s/wl4CQAOSLDeFIP5L1paP9V1XLaYLD BAodNaUPFfTxggH3tZrnnU8Dge5/1JNa08F3WNUPM1S1x8L2HMatwc82x35jXyBSp3AMbdxMPhvyYI8v2J1PqJH8OqGTVjdWe40mD2osRgLo1EOfP/SFBTD5VEo95K2ZLQ==
Threat Actor Root User
- /etc /passwd suhelper:x:0:0::/:
- /etc /shadow suhelper:$1$1OJBlhUV$E9DMK0xdoZb8W8wVOibPQ/:19185:0:99999:7:::
We hope this post would help you know how to protect your Linux systems from RapperBot Malware. Please share this post and help to secure the digital world. Visit our social media page on Facebook, LinkedIn, Twitter, Telegram, Tumblr, Medium & Instagram, and subscribe to receive updates like this.