# THE ELEPHANT IN THE ROOM ## Marion Marschalek Cyphort Inc., Austria Email marion@cyphort.com ABSTRACT At the beginning of 2015, the fi rst espionage software designed for large-scale operations with allegedly European roots was reported. Researchers uncovered malware dubbed ‘Babar’ by its creators and determined that it fi tted the profi le of an espionage campaign initially documented by the Communications Security Establishment Canada (CSEC). _PowerPoint slides created by CSEC and leaked through_ whistleblower Edward Snowden link Babar to an operation named ‘SNOWGLOBE’ and attribute it ‘with moderate certainty’ to French intelligence. This paper puts the spotlight on Babar and other malware families related to SNOWGLOBE, including NBOT, Bunny and Casper. The technical fi nesse of the espionage toolkit will be examined, outlining implementation details and peculiarities. In the second part the paper will discuss possibilities and impossibilities of attribution, explaining the inter-family relations between the different binaries as well as analysing the link to the CSEC documents and the credibility of attribution conducted by CSEC. Finally, the examination will close with a proposal for future research on what more is to uncover of the SNOWGLOBE operation. ## INTRODUCTION In the past year more and more cases of nation-state espionage involving malware have surfaced and have been discussed publicly. The United States, United Kingdom, Russia and China, among others, are known to operate a cyber espionage apparatus in order to aid military operations. At the beginning of 2015, researchers uncovered a collective of malware families which is potentially one of the rare approaches to malware-aided espionage conducted by a European nationstate actor outside of the ‘Five Eyes’ alliance. The uncovered malware fi ts the profi le of an operation dubbed ‘SNOWGLOBE’, fi rst mentioned in a leaked presentation of the Communications Security Establishment Canada (CSEC). The slides describe a CNO (covert network operation) involving different malware strains which were used to target entities of political interest in Canada, Norway and Iran among other nations. Of special interest to SNOWGLOBE seems to have been Iran, where a number of universities along with the Atomic Energy Organization were among the targets. Furthermore, CSEC documents malware with the internal project name ‘Babar’, which happens to be a French cartoon character. CSEC assesses ‘with moderate certainty’ that operation SNOWGLOBE is likely to be conducted by a French intelligence agency. The mystery around Babar was fi rst brought to the public by French newspaper Le Monde, which published an article referencing the CSEC slides in March 2014 [1]. Almost a year later, researchers fi nally identifi ed what comes close to the Babar malware mentioned by CSEC. Babar is an espionage tool, the most sophisticated one among a menagerie of related families. Other SNOWGLOBE tools are NBOT, Bunny and Casper, all of which were uncovered along with Babar. The SNOWGLOBE malware has previously been analysed by security company Kaspersky Lab, which dubbed it ‘Animal Farm’ [2]. Next to the malware discussed in this paper, _Kaspersky reports two more ‘cartoonesque’ miscreants,_ namely Tafacalou and Dino. ## SNOWGLOBE’S MALWARE FAMILIES The fi rst family examined was NBOT, a simple denial of service bot which was active from around 2010 to 2012. The malware includes modules to perform fl ooding of a specifi ed URL with packages of different protocols, such as plain TCP, HTTP GET or POST with different confi gurations. Besides that, not much functionality can be found in NBOT binaries. What makes NBOT interesting is the way it is implemented, as it does not give the impression of regular crimeware. The samples are well designed, come with a handful of clear text strings and have no binary protection whatsoever. On deeper inspection it becomes clear that this family really sticks out from the norm, and on following the breadcrumbs one eventually stumbles over related samples with very similar traits. The second identifi ed family was Bunny, a multi-threaded bot with an integrated scripting engine [3]. The family name is derived from a project name embedded in the malware dropper. Bunny incorporates a Lua interpreter and downloads and executes Lua scripts to reach a certain level of polymorphism. The Lua scripts can call back into the C++ code of the malware and alter its behaviour at runtime. Bunny was seen being spread in a spear-phishing campaign in December 2011, in which a PDF document exploiting CVE-2011-4369 was used to install the malware [4]. Also among the stash of related binaries we discovered a DLL, itself part of a fairly sophisticated piece of espionage malware. Further investigation led to the dropper of said DLL, which came with the internal project name Babar64 [5]. Babar is a French cartoon character (an elephant), as well as the name of a malware family mentioned in a classifi ed slide deck from CSEC [1]. The slides were leaked by Edward Snowden and fi rst discussed in an article published by French newspaper Le _Monde [6] in April 2014. The CSEC slides mention_ SNOWGLOBE as the internal name of the campaign involving Babar and related malware and attribute it ‘with moderate certainty’ [1, p.22] to an unspecifi ed French intelligence agency. From an analyst’s perspective, Babar is somewhat more complex than the other families. It comes with solid espionage capabilities, it performs keylogging and invades Windows processes to steal data from instant messengers, softphones, browsers and offi ce applications. The Babar implant comes with a userland rootkit component in order to hook APIs of interest in dedicated remote processes and steal data on the fl y. While Babar could be called the crown jewel within the espionage toolset, it is not the latest creation. CSEC mentioned Babar for the fi rst time in 2009, the analysed binaries were probably compiled at a later point in time, but probably not later than 2012. It is assumed that the Babar binaries at hand are a later version of the malware described by CSEC. Researchers uncovered one of the newer malware families of ----- the same group in March 2015 [7]. Casper (as in Casper the Friendly Ghost) matches with TFC, Bunny and Babar on a binary level and doubtlessly comes from the same authors. It is so-called reconnaissance malware, used to collect data from an infected machine in order to identify the owner and/ or machine-specifi c settings. Casper is known to have been spread through a watering hole attack. The attackers had taken control of the server hosting the website of the Syrian Ministry of Justice in April 2014 to deploy their malicious infrastructure. Two Flash zero-day exploits were involved in spreading Casper to potential targets [8]. All uncovered families can be linked with each other, and several binary attributes match with traits described in the CSEC documents. ## THE ACTORS IN THE SPOTLIGHT NBOT NBOT is a family of denial-of-service bots which, according to compilation time stamps, was created in 2010. The binaries are well structured and multi-threaded, written in C++ and not heavily protected as one would expect non-targeted malware to be. The bots connect to a C&C server and exchange data in clear text via HTTP. The C&C domains are hard coded in the binaries. Currently, two different domains are known, http://callientefever.info/ and http://fullapple.net/, both of which were registered in 2009 and active until 2010. From 2010 onwards, the domains were sinkholed by security vendor Kaspersky Lab. As a means of stealth, the bots create an svchost.exe process and inject a remote thread to execute their binary payload in the context of svchost.exe. NBOT also implements a mechanism to dynamically load APIs at runtime, identifi ed by hashes of API names. The hash function is simple, using left-sided rotation and XOR with the key AB34CD77h to calculate the hashes: for (i=0; i