New shc Linux Malware used to deploy CoinMiner

Pierluigi Paganini January 04, 2023

Researchers discovered a new Linux malware developed with the shell script compiler (shc) that was used to deliver a cryptocurrency miner.

The ASEC analysis team recently discovered that a Linux malware developed with shell script compiler (shc) that threat actors used to install a CoinMiner. The experts believe attackers initially compromised targeted devices through a dictionary attack on poorly protected Linux SSH servers, then they installed multiple malware on the target system, including the Shc downloader, XMRig CoinMiner, and a Perl-based DDoS IRC Bot.

The Shell Script Compiler is used to convert Bash shell scripts into an ELF (Executable and Linkable Format).

“The following is a decoded Bash shell script of Shc malware reported by a client company that suffered an infiltration attack. It downloads and runs files from external sources, and based on the fact that XMRig CoinMiner is downloaded and installed from the currently available address, it is assumed to be a CoinMiner downloader..” reads the report published by ASEC.

The shc downloader subsequently proceeds to fetch the XMRig miner software to mine cryptocurrency, with the IRC bot capable of establishing connections with a remote server to fetch commands for mounting distributed denial-of-service (DDoS) attacks.

Shc Linux Malware

The Shc downloader malware downloads a compressed file from an external source to “/usr/local/games/” and executes the “run” file. The compressed file contains the XMRig CoinMiner malware along with a config.json with the mining pool URL and the “run” script.

“As the config.json file containing the configuration data exists in the same path, the configuration does not need to be transmitted when XMRig is executed. However, examining the “run” script shown below reveals that it transmits slightly different configuration data to config.json before executing XMRig.” continues the report.

The researchers also found a similar Shc Downloader Malware uploaded on VirusTotal. All the samples analyzed by the researchers were uploaded to VirusTotal from Korea, a circumstance that suggests that the attacks focus on South Korea.

“Typical attacks that target Linux SSH servers include brute force attacks and dictionary attacks on systems where account credentials are poorly managed. Because of this, administrators should use passwords that are difficult to guess for their accounts and change them periodically to protect the Linux server from brute force attacks and dictionary attacks, and update to the latest patch to prevent vulnerability attacks.” concludes the report. “Administrators should also use security programs such as firewalls for servers accessible from outside to restrict access by attackers. Finally, V3 should be updated to the latest version so that malware infection can be prevented.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

[adrotate banner=”9″][adrotate banner=”12″]

Pierluigi Paganini

(Security Affairhacking, shc Linux malware)

[adrotate banner=”5″]

[adrotate banner=”13″]



you might also like

leave a comment