North Korea-linked actors deploy a new Linux variant of FASTCash malware to target financial systems, researcher HaxRob revealed.
The cybersecurity researcher HaxRob analyzed a new variant of the FASTCash “payment switch” malware which targets Linux systems. The variant discovered by the researcher was previously unknown and targets Ubuntu 22.04 LTS distributions.
In November 2018, Symantec first discovered the FastCash Trojan, which was used by the North Korea-linked APT group Lazarus in a series of attacks against ATMs.
The experts reported that the ATP group has been using this malware at least since 2016 to siphon millions of dollars from ATMs of small and midsize banks in Asia and Africa.
“The term ‘FASTCash’ is used to refer to the DPRK attributed malware that is installed on payment switches within compromised networks that handle card transactions for the means of facilitating the unauthorized withdrawal of cash from ATMs.” reads the analysis published by HaxRob.
Previous variants of the FASTCash malware targeted IBM AIX (FASTCash for UNIX) and Microsoft Windows (FASTCash for Windows).
In October 2018, the US-CERT released a joint technical alert from the DHS, the FBI, and the Treasury warning about the ATM cash-out scheme, dubbed “FASTCash,” being used by the prolific North Korean APT hacking group known as Hidden Cobra (aka Lazarus Group and Guardians of Peace).
The previously undetected Linux variant was first submitted to VirusTotal in June 2023, however it was likely developed on a VMware VM for Ubuntu 20.04 post-April 2022. The malicious code intercepts declined magnetic swipe transactions and authorizes them with random amounts in Turkish Lira for specific cardholder accounts.
The malicious code shows multiple similarities to previous Windows and AIX variants.
The FASTCash Linux variant is implemented as a shared library which is injected into payment switch servers via the ‘ptrace’ system call, intercepting ISO8583 transaction messages. The malware specifically intercepts “decline” responses for insufficient funds, then modify them to “approve,” enabling unauthorized transactions at ATMs and PoS terminals. The range for the random funds amount generated per fraudulent transaction and included in the modified message is the between 12,000 and 30,000 Turkish Lira.
“The Linux variant has slightly reduced functionality compared to its Windows predecessor, although it still retains key functionality: intercepting declined (magnetic swipe) transactions messages for a predefined list of card holder account numbers and then authorizing the transaction with a random amount of funds in the currency of Turkish Lira.” continues the analysis.
Once transaction messages are modified to show approval codes and amounts, banks authorize the transaction, allowing money mules to withdraw cash from ATMs on behalf of the threat actors.
“Discovery of the Linux variant further emphasizes the need for adequate detection capabilities which are often lacking in Linux server environments. The process injection technique employed to intercept the transaction messages should be flagged by any commercial EDR or opensource Linux agent with the appropriate configuration to detect usage of the ptrace system call.” concludes the report that also includes Indicators of Compromise (IoCs). As they say, prevention is better then the cure, and the recommendation are best summarized by CISA:
- Implement chip and PIN requirements for debit cards.
- Require and verify message authentication codes on issuer financial request response messages.
- Perform authorization response cryptogram validation for chip and PIN transactions.
Follow me on Twitter: @securityaffairs and Facebook and Mastodon
(SecurityAffairs – hacking, Malware)