Trigona Ransomware

Original Issue Date:- May 25, 2023
Virus Type:-Ransomware
Severity:- Medium

It is reported that new ransomware, called “Trigona”, is spreading across the globe. The ransomware is targeting poorly secured/misconfigured Microsoft SQL (MS-SQL) servers that are exposed to external networks and have weak credentials which paves the way for the attackers to get access through brute-force or dictionary attacks.

Infection Mechanism

As observed, after abusing MSSQL servers, the malicious actors first inject the CLR SqlShell malware and CLR SqlShell malware functions by gathering system information, modifying the account configuration and exploiting a vulnerability in the Windows Secondary Logon Service (MS16-032) for privileges escalation. This enables the malware to operate as a service and launch the associated ransomware. Then it performs malicious activities after getting the commands from the threat actors.

The attackers launch the Trigona ransomware as svchost.exe with the help of dropper malware as the svcservice.exe service.


Fig.1 Trigona ransomware installation [Source: AhnLab]

For making the recovery difficult even after the reboot, the ransomware binary batch file (svchost.bat) is configured to automatically launch on each system restart via a Windows autorun key. Then it deletes volume shadow copies and disables all the recovery features, making the recovery tough without the decryption key. Trigona renamed the encrypted files by the “._locked” extension.


Fig.2 Encrypted files [Source: AhnLab]

The threat actors utilize AES algorithm for encryption. Further, additional parameters are embedded in each locked file.


Fig.3 Ransom note [Source: AhnLab]

Threat actors create the ransom note named "how_to_decrypt.hta" in each folder with information about the attack and other details for further communication or negotiation through TOR website/browser.


Indicator of Compromise:

MD 5 Hash:

  • 1cece45e368656d322b68467ad1b8c02 – Trigona Dropper (svcservice.exe)
  • 530967fb3b7d9427552e4ac181a37b9a – Trigona Ransomware (svchost.exe)
  • 1e71a0bb69803a2ca902397e08269302 – Batch Runner (svchost.bat)
  • 46b639d59fea86c21e5c4b05b3e29617 – CLR SqlShell
  • 5db23a2c723cbceabec8d5e545302dc4 – nt.exe

Files:

  • Ransomware/Win.Generic.C5384838 (2023.02.20.00)
  • Trojan/BAT.Runner.SC187699 (2023.04.08.00)
  • Trojan/Win.Generic.C5148943 (2022.05.30.00)
  • Trojan.Win.SqlShell.C5310259 (2022.11.21.03)
  • Unwanted.Win.Agent.C5406884 (2023.04.08.00)

Behaviour Detection:

  • Ransom/MDP.Command.M2255
  • Ransom/MDP.Event.M1946


Best Practices and Recommendations:

  • Maintain offline backups of data, and regularly maintain backup and restoration. This practice will ensure the organization will not be severely interrupted, have irretrievable data.
  • Ensure all backup data is encrypted, immutable (i.e., cannot be altered or deleted) and covers the entire organization’s data infrastructure.
  • Implement all accounts with strong & unique passwords (e.g., service account, admin accounts, and domain admin accounts).
  • Implement multi-factor authentication for all services to the extent possible, particularly for webmail, virtual private networks, and accounts that access critical systems.
  • Remove unnecessary access to administrative shares.
  • Use a host-based firewall to only allow connections to administrative shares via server message block (SMB) from a limited set of administrator machines.
  • Enable protected files in the Windows Operating System to prevent unauthorized changes to critical files.
  • Disable remote Desktop Connections, employ least-privileged accounts. Limit users who can log in using Remote Desktop, set an account lockout policy. Ensure proper RDP logging and configuration.
  • Check regularly for the integrity of the information stored in the databases.
  • Ensure integrity of the codes /scripts being used in database, authentication and sensitive system.
  • Establish Domain-based Message Authentication, Reporting, and Conformance (DMARC), Domain Keys Identified Mail (DKIM) and Sender Policy Framework (SPF) for your domain, which is an email validation system designed to prevent spam by detecting email spoofing by which most of the ransomware samples successfully reaches the corporate email boxes.
  • Keep the operating system, third party applications (MS office, browsers, browser Plugins) up-to-date with the latest patches.
  • Application white listing/Strict implementation of Software Restriction Policies (SRP) to block binaries running from %APPDATA% and %TEMP% paths. Ransomware sample drops and executes generally from these locations.
  • Maintain updated Antivirus software on all systems.
  • Don't open attachments in unsolicited e-mails, even if they come from people in your contact list, and never click on a URL contained in an unsolicited e-mail, even if the link seems benign. In cases of genuine URLs close out the e-mail and go to the organization's website directly through browser.
  • Follow safe practices when browsing the web. Ensure the web browsers are secured enough with appropriate content controls.
  • Network segmentation and segregation into security zones - help protect sensitive information and critical services. Separate administrative network from business processes with physical controls and Virtual Local Area Networks.
  • Restrict access using firewalls and allow only to selected remote endpoints, VPN may also be used with dedicated pool for RDP access.
  • Use strong authentication protocol, such as Network Level Authentication (NLA) in Windows.
  • Disable ActiveX content in Microsoft Office applications such as Word, Excel, etc.
  • Additional Security measures that may be considered are:
    • Use RDP Gateways for better management.
    • Change the listening port for Remote Desktop.
    • Tunnel Remote Desktop connections through IPSec or SSH.
    • Two-factor authentication may also be considered for highly critical systems.
  • If not required consider disabling PowerShell / windows script hosting.
  • Restrict users' abilities (permissions) to install and run unwanted software applications.
  • Enable personal firewalls on workstations.
  • Implement strict External Device (USB drive) usage policy.
  • Employ data-at-rest and data-in-transit encryption.
  • Consider installing Enhanced Mitigation Experience Toolkit, or similar host-level anti-exploitation tools.
  • Block the attachments of file types, exe|pif|tmp|url|vb|vbe|scr|reg|cer|pst|cmd|com|bat|dll|dat|hlp|hta|js|wsf
  • Carry out vulnerability Assessment and Penetration Testing (VAPT) and information security audit of critical networks/systems, especially database servers from CERT-IN empanelled auditors. Repeat audits at regular intervals.
  • Individuals or organizations are not encouraged to pay the ransom, as this does not guarantee files will be released. Report such instances of fraud to CERT-In and Law Enforcement agencies.


References: