Symantec uncovers tool used by Lazarus to carry out ATM attacks

By Symantec Attack Investigations Team

On Oct. 2, 2018, an alert was issued by US-CERT, the Department of Homeland Security, the Department of the Treasury, and the FBI. According to this new alert, Hidden Cobra (the US government’s code name for Lazarus) has been conducting “FASTCash” attacks stealing money from Automated Teller Machines (ATMs) from banks in Asia and Africa since at least 2016.

Lazarus is a very active attack group involved in both cybercrime and espionage. The group was initially known for its espionage operations and a number of high-profile disruptive attacks, including the 2014 attack on Sony Pictures. More recently, Lazarus has also become involved in financially motivated attacks, including an $81-million dollar theft from the Bangladesh Central Bank and the WannaCry ransomware.

Symantec has now uncovered the key component used in the group’s recent wave of financial attacks. The operation, known as “FASTCash” has enabled Lazarus to fraudulently empty ATMs of cash. To make the fraudulent withdrawals, Lazarus first breaches targeted banks’ networks and compromises the switch application servers handling ATM transactions.

Once these servers are compromised, previously unknown malware (Trojan.Fastcash) is deployed. This malware, in turn, intercepts fraudulent Lazarus cash withdrawal requests and sends fake approval responses, allowing the attackers to steal cash from ATMs.

According to the US government alert, one incident in 2017 saw cash withdrawn simultaneously from ATMs in over 30 different countries. In another major incident in 2018, cash was taken from ATMs in 23 separate countries. To date, the Lazarus FASTCash operation is estimated to have stolen tens of millions of dollars.

How FASTCash attacks work

In order to allow their fraudulent withdrawals from ATMs, the attackers inject a malicious Advanced Interactive eXecutive (AIX) executable into a running, legitimate process on the switch application server of a financial transaction network, in this case, an ATM network. The malicious executable contains logic to construct fraudulent ISO 8583 messages. ISO 8583 is the standard for financial transaction messaging. The purpose of this executable has not been previously documented. It was previously believed that the attackers used scripts to manipulate legitimate software on the server into enabling the fraudulent activity.

However, Symantec’s analysis has found that this executable is in fact malware, which we have named Trojan.Fastcash. Trojan.Fastcash has two primary functions:

  1. It monitors incoming messages and intercepts attacker-generated fraudulent transaction requests to prevent them from reaching the switch application that processes transactions.
  2. It contains logic that generates one of three fraudulent responses to fraudulent transaction requests.
  3. Once installed on the server, Trojan.Fastcash will read all incoming network traffic, scanning for incoming ISO 8583 request messages. It will read the Primary Account Number (PAN) on all messages and, if it finds any containing a PAN number used by the attackers where the Message Type Indicator (MTI) is “0x100 Authorization Request from Acquirer”, it will block the message from going any further. It will then transmit a fake response message approving fraudulent withdrawal requests. The result is that attempts to withdraw money via an ATM by the Lazarus attackers will be approved.

FASTCash_How the Lazarus Group is Emptying Millions from ATMs

Variants

Here is one example of the response logic that Trojan.Fastcash uses to generate fake responses. This particular sample has logic to construct one of three fake responses based on the incoming attacker request:

If (Processing Code == 010000):
Response code = 51
If (Processing Code == 300000):
Response code = 00
Amount = Randomly computed number
All other Processing Codes:
Response code = 51

Symantec has found several different variants of Trojan.Fastcash, each of which uses different response logic. It is unclear at present why differing response logic is used. It may be the case that each variant is tailored to a particular bank.

In all known FASTCash attacks to date, the attackers have compromised banking application servers running unsupported versions of the AIX operating system, beyond the end of their service pack support dates.

Who is Lazarus?

Lazarus is a very active group involved in both cyber crime and espionage. Lazarus was initially known for its involvement in espionage operations and a number of high-profile disruptive attacks, including the 2014 attack on Sony Pictures that saw large amounts of information stolen and computers wiped by malware.

In recent years, Lazarus has also become involved in financially motivated attacks. The group was linked to the $81 million theft from the Bangladesh central bank in 2016, along with a number of other bank heists.

Lazarus was also linked to the WannaCry ransomware outbreak in May 2017. WannaCry incorporated the leaked “EternalBlue” exploit that used two known vulnerabilities in Windows (CVE-2017-0144 and CVE-2017-0145) to turn the ransomware into a worm, capable of spreading itself to any unpatched computers on the victim’s network and also to other vulnerable computers connected to the internet. Within hours of its release, WannaCry had infected hundreds of thousands of computers worldwide.

Conclusion

The recent wave of FASTCash attacks demonstrates that financially motivated attacks are not simply a passing interest for the Lazarus group and can now be considered one of its core activities.

As with the 2016 series of virtual bank heists, including the Bangladesh Bank heist, FASTCash illustrates that Lazarus possesses an in-depth knowledge of banking systems and transaction processing protocols and has the expertise to leverage that knowledge in order to steal large sums from vulnerable banks.

In short, Lazarus continues to pose a serious threat to the banking sector and organizations should take all necessary steps to ensure that their payment systems are fully secured.

Featured image from Pixabay

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.