Earth Lusca expands its arsenal with SprySOCKS Linux malware

Pierluigi Paganini September 19, 2023

China-linked threat actor Earth Lusca used a new Linux malware dubbed SprySOCKS in a recent cyber espionage campaign.

Researchers from Trend Micro, while monitoring the activity of the China-linked threat actor Earth Lusca, discovered an encrypted file hosted on a server under the control of the group. Additional analysis led to the discovery of a previously unknown Linux backdoor tracked as SprySOCKS. The malicious code is based on the open-source Windows backdoor Trochilus. The experts noticed that the threat actors have rewritten many functions of the malware to run on Linux systems. The name SprySOCKS comes from the swift behaviors of Trochilus and the new Socket Secure (SOCKS) implementation of the backdoor.

The researchers detected two SprySOCKS samples with different version numbers, a circumstance that suggests that the backdoor is still under development. According to Trend Micro, the implementation of the interactive shell is likely based on the Linux variant of the Derusbi malware.

“Meanwhile, the structure of SprySOCKS’s command-and-control (C&C) protocol is similar to one used by the RedLeaves backdoor, a remote access trojan (RAT) reported to be infecting Windows machines. It consists of two components, the loader and the encrypted main payload. The loader is responsible for reading, decrypting, and running the main payload.” reads the analysis published by Trend Micro.

The Earth Lusca group remained active during the first half of 2023, it primarily targeted organizations in Southeast Asia, Central Asia, and the Balkans. The group focuses on government departments that are involved in foreign affairs, technology, and telecommunications.

The group is targeting public-facing servers attempting to exploit server-based N-day vulnerabilities, including:

:

VulnerabilityDescription
CVE-2022-40684An authentication bypass vulnerability in Fortinet FortiOS, FortiProxy and FortiSwitchManager
CVE-2022-39952An unauthenticated remote code execution (RCE) vulnerability in Fortinet FortiNAC
CVE-2021-22205An unauthenticated RCE vulnerability in GitLab CE/EE
CVE-2019-18935An unauthenticated remote code execution vulnerability in Progress Telerik UI for ASP.NET AJAX
CVE-2019-9670 / CVE-2019-9621A bundle of two vulnerabilities for unauthenticated RCE in Zimbra Collaboration Suite
ProxyShell (CVE-2021-34473CVE-2021-34523v, CVE-2021-31207)A set of three chained vulnerabilities that perform unauthenticated RCE in Microsoft Exchange
The list of vulnerabilities exploited by Earth Lusca

Once the group has exploited the above vulnerabilities to gain access to the victim’s networks, it deploys a web shell and installs post-exploitation framework Cobalt Strike for lateral movement. The experts reported that the group exfiltrates documents from target systems and attempts to steal email account credentials. The threat actors were also observed deploying advanced backdoors like ShadowPad and the Linux version of Winnti backdoor.

The threat actors deployed the SprySOCKS loader, a variant of the publicly available Linux ELF injector “mandibule”.

“The name of the loader’s process is set to “kworker/0:22” by the prctl command. Normally, kworker is a placeholder process for kernel worker threads. In this scenario, however, the “kworker”name has nothing to do with kernel worker threads. Instead, the loader abuses this name just to avoid suspicion when the user lists all running tasks via commands such as ps or top.” continues the report.

The SprySOCKS backdoor was statically compiled with HP-Socket project, which is a high-performance network framework of Chinese origin. The backdoor uses AES-ECB encryption for C2 communications.

The malware supports multiple commands, including collecting system information, starting an interactive shell, listing network connections, creating SOCKS proxy, uploading and downloading files, and other basic file operations (listing, deleting, renaming, and creating a directory).

“we discussed the new backdoor SprySOCKS used by Earth Lusca, which expands the group’s Linux arsenal. Recently, the threat actor has been highly aggressive in targeting the public-facing servers of its victims by exploiting known vulnerabilities.” concludes the report that also includes Indicators of Compromise (IOCs).”

“It is important that organizations proactively manage their attack surface, minimizing the potential entry points into their system and reducing the likelihood of a successful breach.”

Follow me on Twitter: @securityaffairs and Facebook and Mastodon

Pierluigi Paganini

(SecurityAffairs – hacking, backdoor)



you might also like

leave a comment