The malware, termed Migo by the creators, attempts to infiltrate Redis servers to mine cryptocurrency on the Linux host.
The campaign employed many Redis system-weakening commands to potentially disable data store security features that could hinder their initial attempts at access.
Additionally, the campaign uses these commands to carry out a cryptojacking attack on Redis.
Redis, “Remote Dictionary Server,” is an open-source, NoSQL key/value store that runs entirely in memory and is mostly utilized as a quick-response database or application cache.
Redis offers unmatched speed, dependability, and performance since it keeps data in memory rather than on a disk or solid-state drive (SSD).
System Weakening Techniques
When a peculiar set of commands directed at a Redis honeypot was noticed, Cado researchers were initially made aware of the Migo campaign.
Try ANY.RUN Yourself with a 14-day Free Trial
More than 300,000 analysts use ANY.RUN is a malware analysis sandbox worldwide. Join the community to conduct in-depth investigations into the top threats and collect detailed reports on their behavior..
Using the Redis command line interface’s (CLI) config set feature, attackers disabled the following configuration options.
- set protected-mode
- replica-read-only
- aof-rewrite-incremental-fsync
- rdb-save-incremental-fsync
The Redis server has an operational mode called “protected mode” that is intended to mitigate the risk of users unintentionally exposing the server to external networks.
It’s possible that this option was turned off during the initial access phase to enable the attackers to send more commands to the Redis server via the Internet.
The replica-read-only feature instructs Redis replicas (perfect copies of a master Redis instance) to refuse any written commands.
The Migo attackers are probably disabling this feature to make it easier to exploit the Redis server in the future.
Meanwhile, append-only file rewrites may experience increased IO demand if aof-rewrite-incremental-fsync is disabled.
During RDB snapshot saves, performance may suffer if rdb-save-incremental-fsync is disabled.
“After disabling these configuration parameters, the attacker uses the set command to set the values of two Redis keys”.
One key is assigned a string value corresponding to a malicious attacker-controlled SSH key, and the other to a Cron job that retrieves the malicious primary payload from Transfer.sh via Pastebin”, Cado researchers shared with GBhackers on Security.
Compiled from Go code for the x86_64 architecture, the Migo primary payload (/tmp/.migo) is provided as a statically linked and stripped UPX-packed ELF.
Migo retrieves the XMRig installer in tar.gz format directly from Github’s CDN.
The malware then queries several system parameters, such as the number of logged-in users (via the w binary) and user resource restrictions, after the miner has been installed and an XMRig configuration set has been specified.
Cryptojacking malware typically behaves in these ways.
Researchers say that the main payload of Migo is a compiled binary created with Go instead of a string of shell scripts, as was the case in earlier campaigns, showing that the individuals behind Migo are still refining their methods and making the analysis process more difficult.
You can block malware, including Trojans, ransomware, spyware, rootkits, worms, and zero-day exploits, with Perimeter81 malware protection. All are extremely harmful, can wreak havoc, and damage your network.