Cyber Crime

Cryptojacking campaign targets insecure deployments of Redis servers

Researchers from Cado Security discovered a cryptojacking campaign targeting misconfigured Redis database servers.

Cado Labs researchers recently discovered a new cryptojacking campaign targeting insecure deployments of Redis database servers. Threat actors behind this campaign used the free and open source command line file transfer service transfer.sh.

The attackers likely used the legitimate transfer.sh service is an attempt to evade detections.

“Many of the cloud-focused malware campaigns analysed by Cado Labs rely on shell scripts, especially cryptojacking campaigns. Since these campaigns often retrieve payloads using common Linux data transfer utilities, transfer.sh seems like an ideal solution and potential replacement for services like Pastebin.” reads the analysis published by Cado Labs.

The attack chain starts by exploiting insecure installs of Redis servers, the attackers write a cron job to the data store and force Redis to save the database file to one of the cron directories. When the cron scheduler reads files in the directory, the database file is parted as a cron job, leading to arbitrary command execution. 

In the attack detailed by the experts, the cron job runs a cURL command to retrieve a payload at transfer[.]sh (https://transfer[.]sh/QQcudu/tmp[.]fDGJW8BfMC). This file is saved as .cmd and executed with bash. 

“Executing the script by invoking bash directly ensures that the commands contained within the script won’t be written to the history file, acting as an anti-forensics measure.” continues the analsys.

The initial script is used to conduct preparatory actions to mine cryptocurrency, such as checking the hardware, disabling SELinux and ensuring DNS requests can be resolved by public resolvers. The scripts also remove existing cron jobs and the cron spool. The payload also uses the linux sync command to force the kernel to write data currently held in memory buffers to disk with the intent of freeing up RAM as much as possible to execute the miner XMRig. 

Then the script clears log files, configures iptables, kills competing miners and installs additional packages, before retrieving the binaries for pnscan and XMRig.

The malicious code uses the pnscan mass network scanning utility to search for vulnerable Redis servers and propagate a copy of the script to them.

“Although it is clear that the objective of this campaign is to hijack system resources for mining cryptocurrency, infection by this malware could have unintended effects,” concludes the report that includes indicators of compromise (IoCs). “Reckless configuration of Linux memory management systems could quite easily result in corruption of data or the loss of system availability.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, miner)

Pierluigi Paganini

Pierluigi Paganini is member of the ENISA (European Union Agency for Network and Information Security) Threat Landscape Stakeholder Group and Cyber G7 Group, he is also a Security Evangelist, Security Analyst and Freelance Writer. Editor-in-Chief at "Cyber Defense Magazine", Pierluigi is a cyber security expert with over 20 years experience in the field, he is Certified Ethical Hacker at EC Council in London. The passion for writing and a strong belief that security is founded on sharing and awareness led Pierluigi to find the security blog "Security Affairs" recently named a Top National Security Resource for US. Pierluigi is a member of the "The Hacker News" team and he is a writer for some major publications in the field such as Cyber War Zone, ICTTF, Infosec Island, Infosec Institute, The Hacker News Magazine and for many other Security magazines. Author of the Books "The Deep Dark Web" and “Digital Virtual Currency and Bitcoin”.

Recent Posts

Nation-state actors exploited two zero-days in ASA and FTD firewalls to breach government networks

Nation-state actor UAT4356 has been exploiting two zero-days in ASA and FTD firewalls since November…

9 hours ago

Hackers hijacked the eScan Antivirus update mechanism in malware campaign

A malware campaign has been exploiting the updating mechanism of the eScan antivirus to distribute…

16 hours ago

US offers a $10 million reward for information on four Iranian nationals

The Treasury Department's Office of Foreign Assets Control (OFAC) sanctioned four Iranian nationals for their…

22 hours ago

The street lights in Leicester City cannot be turned off due to a cyber attack

A cyber attack on Leicester City Council resulted in certain street lights remaining illuminated all…

23 hours ago

North Korea-linked APT groups target South Korean defense contractors

The National Police Agency in South Korea warns that North Korea-linked threat actors are targeting…

1 day ago

U.S. Gov imposed Visa restrictions on 13 individuals linked to commercial spyware activity

The U.S. Department of State imposed visa restrictions on 13 individuals allegedly linked to the…

2 days ago

This website uses cookies.