Friday, May 17, 2024

Cuttlefish 0-click Malware Hijacks Routers & Captures Data

Cuttlefish is a new malware platform that has been identified to be active since at least July 2023.

This malware platform specifically targets networking equipment like enterprise-grade small office/home office routers.

The latest campaign is discovered to be ongoing from October 2023 till April 2024. 

Additionally, 99% of the malware’s targets were found to be victims within Turkey, where more than 600 unique IP addresses, mainly belonging to two telecom firms, Were uncovered.

Rest of the victims out of this Turkey region were clients of the Global Satellite phone providers and US-based data center.

The code of the malware overlaps with HiatusRAT, which was targeting victims who are Interested in the People’s Republic of China.

Document

Integrate ANY.RUN in Your Company for Effective Malware Analysis

Are you from SOC, Threat Research, or DFIR departments? If so, you can join an online community of 400,000 independent security researchers:

  • Real-time Detection
  • Interactive Malware Analysis
  • Easy to Learn by New Security Team members
  • Get detailed reports with maximum data
  • Set Up Virtual Machine in Linux & all Windows OS Versions
  • Interact with Malware Safely

If you want to test all these features now with completely free access to the sandbox:

However, this malware does not have the same victimology and also has additional functionalities like DNS and HTTP Hijacking for connections to Private IP space.

Technical Analysis

Cuttlefish malware is primarily designed to steal authentication details from web requests.

When the router sends these requests, the threat actor can bypass anomalous sign-in-based analytics via stolen authentication credentials.

To extract the data found in the web requests, the threat actor creates a proxy or VPN tunnel from the compromised networking equipment and uses the stolen credentials to access specific resources. 

The initial access vector of this malware campaign is still unclear. However, when exploited, the threat actor deploys a bash script on the compromised host to send the details to the C2 server. 

Malware Hijacking parameters (Source: Black Lotus Labs)

This bash script also downloads and executes Cuttlefish malware that performs a multi-step process for installing a packet filter to inspect all outbound connections alongside details of the use of specific ports, protocols, and destination IP addresses.

All of the rules and configurations are specified in the configuration file sent to the C2 server.

The malware is provided with instructions to hijack traffic to particular private IP addresses and sniff the traffic to public IP addresses to steal credentials.

As a matter of fact, compromising networking equipment provides multiple options to route the manipulation, hijack connections, employ sniffing over the traffic for stealing authentication, and gain access to the cloud ecosystem with the stolen credentials.

Malware Analysis

To explain it better, there are multiple files and functionalities present in the malware such as 

  • Bash script (Files)
  • Primary Payload, Cuttlefish (Files)
  • Retrieval of RuleSets
  • Credential Harvesting
  • Logger and Data Transmission
  • Hijack Functionality
  • VPN Functionality
  • Private Proxy Functionality
Malware campaign (Source: Black Lotus Labs)

The bash script enumerates the device and gathers information such as directory listing, contents of the /etc and /etc/config, running processes, active connections and drive mounts.

All of this data is compressed as a TAR file with the name “co.tmp.tar.gz” which is then uploaded to the C2 server.

After this exfiltration, the TAR file is deleted from the system, and the bash script downloads the trojan from the payload server and stores it in the /tmp directory with the name “.timezone.” The prefix “.” allows the threat actor to escape the “ls” command.

The primary payload, Cuttlefish, is then executed, which only binds to port 61235 to ensure that only one instance is running.

However, it will display an error message in case another process is using the port. 

After this, it will check for the .timezone file that was dropped in the last step and try to execute it with a bash command “/tmp/.timezone -a -b 5000 -z -d”.

The “.timezone” file is replaced with “.putin” in the latest version and multiple commands has been added to the malware.

If the file exists, the malware will overwrite the uuid with the contents of the file.

The RuleSet retrieval functionality sets up the secure connection to the C2 server for downloading and updating the ruleset.

The output of the payload is saved to “/tmp/config.js” which is then parsed to update “http_rule_hearttime”, “dns log status”, “script” and “http_rule_version.”

Once all the configuration is in place, the malware creates two threads in which one is for keeping the track heartbeat time and the other is for monitoring traffic moving across selected interfaces.

Furthermore, the credential harvesting functionality retrieves credentials from web requests and the VPN functionality uses an open-source project named “n2n”. However, the Hijack functionality uses the http_hijack_heartime and other commands. 

The proxy functionality was based on another open-source project “socks_proxy”. Furthermore, a complete report has been published by Black Lotus Researchers which provides detailed information about the functionalities, files and source code of the malware.

Indicators of Compromise

Payload Server and corresponding file hashes: 

Is Your Network Under Attack? - Read CISO’s Guide to Avoiding the Next Breach - Download Free Guide

Website

Latest articles

Norway Recommends Replacing SSLVPN/WebVPN to Stop Cyber Attacks

A very important message from the Norwegian National Cyber Security Centre (NCSC) says that...

New Linux Backdoor Attacking Linux Users Via Installation Packages

Linux is widely used in numerous servers, cloud infrastructure, and Internet of Things devices,...

ViperSoftX Malware Uses Deep Learning Model To Execute Commands

ViperSoftX malware, known for stealing cryptocurrency information, now leverages Tesseract, an open-source OCR engine,...

Santander Data Breach: Hackers Accessed Company Database

Santander has confirmed that there was a major data breach that affected its workers...

U.S. Govt Announces Rewards up to $5 Million for North Korean IT Workers

The U.S. government has offered a prize of up to $5 million for information...

Russian APT Hackers Attacking Critical Infrastructure

Russia leverages a mix of state-backed Advanced Persistent Threat (APT) groups and financially motivated...

Millions Of IoT Devices Vulnerable To Attacks Leads To Full Takeover

Researchers discovered four significant vulnerabilities in the ThroughTek Kalay Platform, which powers 100 million...
Eswar
Eswar
Eswar is a Cyber security content editor with a passion for creating captivating and informative content. With years of experience under his belt in Cyber Security, he is covering Cyber Security News, technology and other news.

Free Webinar

Live API Attack Simulation

94% of organizations experience security problems in production APIs, and one in five suffers a data breach. As a result, cyber-attacks on APIs increased from 35% in 2022 to 46% in 2023, and this trend continues to rise.
Key takeaways include:

  • An exploit of OWASP API Top 10 vulnerability
  • A brute force ATO (Account Takeover) attack on API
  • A DDoS attack on an API
  • Positive security model automation to prevent API attacks

Related Articles