The source code of a backdoor associated with the prolific FIN7 threat actor has emerged on VirusTotal alongside builders and other tools from the group, FireEye security researchers reveal.
Also referred to as Carbanak, or Anunak, the financially-motivated actor has been active since at least 2015, mainly focused on targeting businesses worldwide to steal credit card information. The group is believed to have hit over 100 US companies, mainly in the restaurant, gaming, and hospitality industries.
Three Ukrainian nationals were arrested last year for allegedly being members of the group, with one of them a supervisor, but the FIN7 activity did not cease, and a recent report revealed the use of a new malware family in recent attacks.
Carbanak, the group’s full-featured backdoor, which has been used to perpetrate millions of dollars, has been analyzed multiple times before. Now, the security researchers have a new perspective on the malware, courtesy of two RAR archives containing the full Carbanak source code.
The code was 20MB is size, comprising 755 files, with 39 binaries and 100,000 lines of code, FireEye says in a series of blogs detailing the analysis of the source code and its findings.
To analyze the code, which is in Russian, a script that would create a prioritized vocabulary list was used (available on GitHub), which resulted in a 3,400+ word vocabulary list. This allowed the researchers to read comments in the code and helped with the translating of the Carbanak graphical user interfaces found in the source code dump.
In one of the RAR archives, the researchers discovered an operator’s manual explaining the semantics of all the backdoor commands.
The source code analysis revealed that, while in simpler backdoors a single function is in charge with receiving commands from the command and control (C&C) server and passing them to the correct function, Carbanak is completely different. It uses the Windows mechanism called named pipes to control threads, processes, and plugins.
“When the CARBANAK tasking component receives a command, it forwards the command over a named pipe where it travels through several different functions that process the message, possibly writing it to one or more additional named pipes, until it arrives at its destination where the specified command is finally handled,” FireEye explains.
This mechanism allows the malware to control both inherent command handlers and plugins, and is also flexible enough to allow for a local client to dispatch commands to Carbanak without the use of a network. One such client was also present in the dump.
The malware authors used an obfuscated import resolution several hundred times throughout their backdoor, FireEye discovered.
“The CARBANAK source code is illustrative of how these malware authors addressed some of the practical concerns of obfuscation. Both the tasking code and the Windows API resolution system represent significant investments in throwing malware analysts off the scent of this backdoor,” FireEye concluded.