Researchers have obtained samples of what appears to be Babar, a nation state espionage malware believed to have been developed and used by a French intelligence agency.
References to Babar first surfaced in March last year when French publication Le Monde published a few slides provided by Edward Snowden. Additional slides were published in January 2015 by German publication Der Spiegel. The documents, created by Canada’s Communications Security Establishment (CSE), describe a campaign dubbed “Operation Snowglobe.”
Connecting the malware to French intelligence
According to the slides from CSE, the operation mainly targeted organizations in Iran, including universities, the Ministry of Foreign Affairs, the Atomic Energy Organization, and a subsidiary of the country’s telecommunications company. The attackers also targeted a French-language Canadian media firm, and organizations in France, Norway, Spain, Greece, and two former French colonies in Africa, Algeria and the Ivory Coast.
The infrastructure used by the threat actor had been mainly hosted in countries that are part of the Five Eyes intelligence alliance and some European countries such as Norway, Poland, and the Czech Republic.
The CSE determined with “moderate certainty” that the operation was conducted by French intelligence based not only on the list of targets, but also based on malware analysis.
One of the pieces of malware discovered by the Canadian agency was internally named Babar, possibly inspired by Babar the Elephant, a fictional character who first appeared in a French children’s book. The developer used the nickname “titi,” which is a French diminutive for Thiery and a colloquial term for small person. Investigators also linked the attack to France based on language and regional settings.
Babar espionage malware
One of the pieces of malware believed to be linked to Operation Snowglobe has been dubbed “EvilBunny.” A detailed analysis of the threat was published in November 2014 by Marion Marschalek, a researcher at Cyphort.
After Der Spiegel published the slides containing additional information on the Snowglobe attacks, researchers obtained other malware samples matching the description provided by CSE.
Marschalek teamed up with the security firm G DATA and ESET researcher Joan Calvet to analyze Babar, a remote access Trojan (RAT) capable of executing code, stealing clipboard data, logging keystrokes, capturing audio streams, taking screenshots, and stealing files.
According to Marschalek, Babar has two components: a dropper and an implant. The attackers deliver the dropper through drive-by downloads or malicious email attachments. The dropper then installs the implant on infected machines.
“Babar essentially is an implant, a malicious Windows DLL. Babar’s implant is a 32-bit DLL written in C++, which upon start injects itself to running processes and invades desktop applications by applying a global Windows hook,” Marschalek explained in a blog post.
“Babar comes with a userland rootkit component which applies global Windows hooks to invade all processes on its desktop. This way Babar can install API hooks for various APIs via Windows Detours technique to actively steal data from arbitrary processes,” the expert added.
G DATA researcher Paul Rascagnères pointed out that there are several pieces of information in the CSE slides linking the malware described there with the samples found by researchers. For example, in both cases there is a typo in the user agent string, the C&C interface is written in English but likely not by a native speaker, and regional and language parameters are set to “fr.”
On the other hand, script names and locations are different, and so is the developer’s username. Instead of “titi,” the Babar samples analyzed by G DATA were developed by “admin,” while the EvilBunny samples were created by “user.”
As for the similarities between Babar and EvilBunny, they both contain the typo in the user agent string, and they both use the same method to detect antivirus solutions installed on the infected machine.
Experts believe EvilBunny and Babar could be the implants referred to as Snowballs and Snowman in the CSE report. However, the samples analyzed by researchers appear to be newer versions of the malware.
“The G DATA SecurityLabs are convinced that the number of similarities identified between EvilBunny and Babar show that both malware families originate from the same developers,” Rascagnères explained.
The researcher noted that while they have been able to conduct an in-depth analysis of the malware, they haven’t identified any further evidence to support the theory that a French intelligence agency is behind the threat.