Cuba Ransomware
Cuba is a C++ based ransomware tool targeting Windows systems. It is used in double extortion attacks against a wide range of industries in Europe and America, with the extracted information posted to a hidden leak site.
Summary
Cuba is a C++ based ransomware tool targeting Windows systems. It is used in double extortion attacks against a wide range of industries in Europe and America, with the extracted information posted to a hidden leak site.
Affected platforms
The following platforms are known to be affected:
Threat details
Introduction
First observed in January 2020, Cuba ransomware is written in C++ and is used as the final-stage payload in double extortion campaigns. Operators use Cuba in conjunction with a leak site which publishes data extracted from compromised systems prior to encryption. Cuba has affected organisations in North and South America, and Europe across various sectors, including pharmaceutical, manufacturing, and logistics. Recently, it has been delivered by the Hancitor downloader in spam email campaigns.
Delivery
In its most recent attacks, Cuba has been deployed through spam campaigns. Emails sent in these campaigns contain a link purporting to sign a document from a popular document signing service. When users interact with this link, a macro-laden Word document containing a Hancitor payload is instead downloaded and opened. This document will extract and execute Hancitor if the user enables the macros.
Hancitor will then download several additional tools via a command and control (C2) server to facilitate lateral movement and data extraction. Cuba payloads are then delivered and installed on compromised systems using PowerShell or PsExec.
In earlier campaigns, it was unclear how Cuba was delivered, although there are unconfirmed reports suggesting it may have been distributed in spear-phishing attacks.
Activities
Once executed, Cuba uses a hardcoded list to identify and terminate various SQL and Microsoft Exchange services and processes. It then enumerates all directories and files on the host system, comparing each to a hardcoded whitelist of files to be exempt from encryption. Should a file not match those on the whitelist, Cuba begins its encryption routine. It uses a hybrid ChaCha20 and RSA encryption method; ChaCha20 with 12-bytes length IV is used to encrypt data, whilst the keys are encrypted with RSA-4096. It appends the file extension .cuba to each encrypted file and drops a ransom note in each directory where files have been encrypted.
Cuba campaigns commonly use double extortion; a technique which facilitates the theft of data before encrypting it. Cuba operators use a Tor data leak site where a compromised organisation’s data is publicly exposed if the ransom is not paid.
Remediation advice
If a device on your network becomes infected with ransomware it will begin encrypting files, which may also include remote files on network locations. The only guaranteed way to recover from a ransomware infection is to restore all affected files from their most recent backup. To limit the impact of a ransomware infection, NHS Digital advises that:
- Critical data is frequently saved in multiple backup locations.
- At least one backup is kept offline at any time (separated from live systems).
- Backups and incident recovery plans are tested to ensure that data can be restored when needed.
- User account permissions for modifying data are regularly reviewed and restricted to the minimum necessary.
- Infected systems are disconnected from the network and powered down as soon as practicable.
- Any user account credentials that may have been compromised should be reset on a clean device
- Where infected systems cannot be quarantined with confidence, then an affected organisation should disconnect from national networks to limit propagation.
Additionally, to prevent and detect an infection, NHS Digital advises that:
- Secure configurations are applied to all devices.
- Security updates are applied at the earliest opportunity.
- Tamper protection settings in security products are enabled where available.
- Obsolete platforms are segregated from the rest of the network.
- IT usage policies are reinforced by regular training to ensure all users know not to open unsolicited links or attachments.
- Multi-factor authentication (MFA) and lockout policies are used where practicable, especially for administrative accounts.
- Administrative accounts are only used for necessary purposes.
- Remote administration services use strongly encrypted protocols and only accept connections from authorised users or locations.
- Systems are continuously monitored, and unusual activity is investigated, so that a compromise of the network can be detected as early as possible.
Please note that NCSC maintains guidance for securely configuring a wide range of end user device (EUD) platforms. For further details refer to their end user device security guidance pages.
Indicators of compromise
Last edited: 11 May 2021 4:27 pm