The mystery of fileless banking malware
Kaspersky Lab experts reconstruct a puzzling tactic to cash out at ATMs, without leaving any trace
One day bank employees discovered an empty ATM: there was no money, no traces of physical interaction with the machine, and no malware. After Kaspersky Lab experts spent time unwinding this mysterious case, they were able to not only understand the cybercriminal tools used in the robbery, but also reproduce the attack themselves, discovering a security breach at the bank.
In February 2017 Kaspersky Lab published the results of an investigation into mysterious fileless attacks against banks: criminals were using in-memory malware to infect banking networks. But why were they doing this? The ATMitch case has given us the whole picture.
Kaspersky Lab registered that attacks hit more than 140 enterprise networks in a range of business sectors, reveals Mohammad Amin Hasbini, senior security researcher at Kaspersky Lab. In total, infections have been registered in 40 countries, including in the META region: in Turkey, Saudi Arabia, Iran, Pakistan, Libya, Tunisia, Morocco, Egypt, Kenya, Uganda, Congo, Tanzania. "ATMich cases were reported in just two countries up to now, but the attackers might still be active. We advise organizations to check their systems, keeping in mind that detection of such an attack is possible only in RAM, the network and registry – and that, in such instances, the use of Yara rules based on a scan of malicious files are of no use. To prevent such attacks comprehensive security software is advised. Kaspersky Lab products successfully detect operations using tactics of this kind”, says Hasbini.
The investigation started after the bank’s forensics specialists recovered and shared two files containing malware logs from the ATM's hard drive (kl.txt and logfile.txt) with Kaspersky Lab. These were the only files left after the attack: it was not possible to recover the malicious executables because after the robbery cybercriminals had wiped the malware. But even this tiny amount of data can be enough for Kaspersky Lab to run a successful investigation.
Within the log files, Kaspersky Lab experts were able to identify pieces of information in plain text that helped them to create a YARA rule for public malware repositories and to find a sample. YARA rules — basically search strings — help analysts to find, group, and categorize related malware samples and draw connections between them based on patterns of suspicious activity on systems or networks that share similarities.
After a day of waiting, experts found a wanted malware sample – "tv.dll", or ‘ATMitch’ as it was later dubbed. It was spotted in the wild twice: once from Kazakhstan, and once from Russia.
This malware is remotely installed and executed on an ATM from within the target bank: through the remote administration of ATM machines. After it’s installed and connected to the ATM, the ATMitch malware communicates with the ATM as if it is legitimate software. It makes it possible for attackers to conduct a list of commands – such as collecting information about the number of banknotes in the ATM’s cassettes. What’s more; it provides criminals with the ability to dispense money at any time, at the touch of a button.
Usually criminals start by getting information on the amount of money a dispenser has. After that, a criminal can send a command to dispense any number of banknotes from any cassette. After withdrawing money in this curious way, criminals only need to grab the money and go. An ATM robbery like this takes just seconds!
Once an ATM is robbed, the malware deletes its traces.
It is still not known who is behind the attacks. The use of open source exploit code, common Windows utilities and unknown domains during the first stage of the operation makes it almost impossible to determine the group responsible. However, "tv.dll", used in the ATM stage of the attack contains a Russian language resource, and known groups that could fit into this profile are GCMAN and Carbanak.
“Combatting these kinds of attacks requires a specific set of skills from the security specialist guarding the targeted organization. The successful breach and exfiltration of data from a network can only be conducted with common and legitimate tools; after the attack, criminals may wipe all the data that could lead to their detection leaving no traces, nothing. To address these issues, memory forensics is becoming critical to the analysis of malware and its functions. And as our case proves, a carefully directed incident response can help solve even the perfectly prepared cybercrime,” said Sergey Golovanov, principal security researcher at Kaspersky Lab.
Kaspersky Lab products successfully detect operations using the above tactics, techniques and procedures. Further information on this story and Yara rules for forensic analysis of the fileless attacks can be found in the two blogs on Securelist.com: first and second. Technical details, including Indicators of Compromise were also provided to customers of Kaspersky Intelligence Services.