Why Did Chinese Spyware Linger in U.S .


Phones ?


November 16 , 2016 In what 's being chalked up as an apparent mistake , more than 120,000 Android phones sold in the U.S. were shipped with spying code that sent text messages , call logs and other sensitive data to a server in Shanghai .


The New York Times reported on Nov. 15 that Kryptowire , a mobile enterprise security company , discovered the code on a lower-end smartphone made by BLU Products of Doral , Fla .


The phones are sold at Best Buy and Amazon.com , among other retail outlets .


Kryptowire says the code , which it found on a BLU R1 HD devices , transmitted fine-grained location information and allowed for the remote installation of other apps .


Text message and call logs were transmitted every 72 hours to the Shanghai server , and once a day for other personally identifiable data , the company says .


It turns out , however , that other security researchers noticed suspicious and faulty code on BLU devices as early as March 2015 , and it has taken nearly that long to remove it from the company 's devices .


The finding , in part , shows the risk that can come in opting for less expensive smartphones , whose manufacturers may not diligently fix security vulnerabilities .


It 's also raising eyebrows because of the connection with China , which has frequently sparred with the U.S. over cyber espionage .


BLU Products has now updated its phones to remove the spying code , which most likely would have never been detected by regular users .


The code never informed phone users that it was collecting that data , a behavior uniformly viewed by many as a serious security concern .


The developer of the code , Shanghai Adups Technology Co. , has apologized , contending that the code was intended for another one of its clients who requested better blocking of junk text messages and marketing calls .


Vulnerabilities Reported BLU Products , founded in 2009 , makes lower-end Android-powered smartphones that sell for as little as $ 50 on Amazon .


Like many original equipment manufacturers , it uses software components from other developers .


The company uses a type of software from Adups that 's nicknamed FOTA , short for firmware over-the-air .


The software manages the delivery of firmware updates over-the-air , the term used for transmission via a mobile network .


Firmware is low-level code deep in an operating system that often has high access privileges , so it 's critical that it 's verified and contains no software vulnerabilities .


Long before Kryptowire 's announcement , Tim Strazzere , a mobile security researcher with RedNaga Security , contacted BLU Products in March 2015 after he found two vulnerabilities that could be traced to Adup 's code .


Those vulnerabilities could have enabled someone to gain broad access to an Android device .


Strazzere 's colleague , Jon Sawyer , suggested on Twitter that the vulnerabilities might have not been there by mistake , but rather included as intentionally coded backdoors .


He posted a tweet to The New York Times report , sarcastically writing , " If only two people had called this company out for their backdoors several times over the last few years .


'' Strazzere 's experience in trying to contact both vendors last year is typical of the frustrations frequently faced by security researchers .


" I tried reaching out to Adups and never heard back , '' Strazzere tells Information Security Media Group .


" BLU said they had no security department when I emailed them .


'' Strazzere says he also failed to reach MediaTek , a Taiwanese fabless semiconductor manufacturer whose chipsets that powered BLU phones also contained Adups software .


To their credit , both Google and Amazon appear to have put pressure on device manufacturers to fix their devices when flaws are found , Strazzere says .


For Google , Android security issues - even if not in the core operating code - are a reputation threat , and for Amazon , a product quality issue .


But devices sold outside of Amazon " might not have ever seen fixes , '' he says .


Officials at BLU could n't be immediately reached for comment .


Attitude Change The disinterest in the issues appears to have changed with The New York Times report , which lit a fire underneath Adups and BLU .


Adups addressed the issue in a Nov. 16 news release , writing that some products made by BLU were updated in June with a version of its FOTA that had actually been intended for other clients who had requested an ability to stop text spam .


That version flags messages " containing certain language associated with junk texts and flags numbers associated with junk calls and not in a user 's contacts , '' the company says .


Manufacturers should be keeping close tabs on what software ends up on their devices .


But it would appear that BLU only took action after Kryptowire notified it along with Google , Adups and Amazon .


" When BLU raised objections , Adups took immediate measures to disable that functionality on BLU phones , '' Adups says .


The greater worry is that these situations may sometimes not be simple mistakes .


Security experts have long warned of the ability of advanced adversaries to subvert hardware and software supply chains .


Also , the software vulnerabilities pointed out in the FOTA software by Strazzere in 2015 could have been taken advantage of by cybercriminals looking to steal bank account details or execute other frauds .


Strazzere advises that consumers should look at the pedigree of mobile manufacturers and take a close look at their security track record before making a decision on what device to buy .


" In the end , the consumer needs to vote with their wallet , '' he says .


Skygofree : Following in the footsteps of HackingTeam 16 JAN 2018 At the beginning of October 2017 , we discovered new Android spyware with several features previously unseen in the wild .


In the course of further research , we found a number of related samples that point to a long-term development process .


We believe the initial versions of this malware were created at least three years ago – at the end of 2014 .


Since then , the implant ’ s functionality has been improving and remarkable new features implemented , such as the ability to record audio surroundings via the microphone when an infected device is in a specified location ; the stealing of WhatsApp messages via Accessibility Services ; and the ability to connect an infected device to Wi-Fi networks controlled by cybercriminals .


We observed many web landing pages that mimic the sites of mobile operators and which are used to spread the Android implants .


These domains have been registered by the attackers since 2015 .


According to our telemetry , that was the year the distribution campaign was at its most active .


The activities continue : the most recently observed domain was registered on October 31 , 2017 .


Based on our KSN statistics , there are several infected individuals , exclusively in Italy .


Moreover , as we dived deeper into the investigation , we discovered several spyware tools for Windows that form an implant for exfiltrating sensitive data on a targeted machine .


The version we found was built at the beginning of 2017 , and at the moment we are not sure whether this implant has been used in the wild .


We named the malware Skygofree , because we found the word in one of the domains * .


Malware Features Android According to the observed samples and their signatures , early versions of this Android malware were developed by the end of 2014 and the campaign has remained active ever since .


The code and functionality have changed numerous times ; from simple unobfuscated malware at the beginning to sophisticated multi-stage spyware that gives attackers full remote control of the infected device .


We have examined all the detected versions , including the latest one that is signed by a certificate valid from September 14 , 2017 .


The implant provides the ability to grab a lot of exfiltrated data , like call records , text messages , geolocation , surrounding audio , calendar events , and other memory information stored on the device .


After manual launch , it shows a fake welcome notification to the user : Dear Customer , we ’ re updating your configuration and it will be ready as soon as possible .


At the same time , it hides an icon and starts background services to hide further actions from the user .


Service Name Purpose AndroidAlarmManager Uploading last recorded .amr audio AndroidSystemService Audio recording AndroidSystemQueues Location tracking with movement detection ClearSystems GSM tracking ( CID , LAC , PSC ) ClipService Clipboard stealing AndroidFileManager Uploading all exfiltrated data AndroidPush XMPP С & C protocol ( url.plus:5223 ) RegistrationService Registration on C & C via HTTP ( url.plus/app/pro/ ) Interestingly , a self-protection feature was implemented in almost every service


Since in Android 8.0 ( SDK API 26 ) the system is able to kill idle services , this code raises a fake update notification to prevent it : Cybercriminals have the ability to control the implant via HTTP , XMPP , binary SMS and FirebaseCloudMessaging ( or GoogleCloudMessaging in older versions ) protocols .


Such a diversity of protocols gives the attackers more flexible control .


In the latest implant versions there are 48 different commands .


You can find a full list with short descriptions in the Appendix .


Here are some of the most notable : ‘ geofence ’ – this command adds a specified location to the implant ’ s internal database and when it matches a device ’ s current location the malware triggers and begins to record surrounding audio .


” social ” – this command that starts the ‘ AndroidMDMSupport ’ service – this allows the files of any other installed application to be grabbed .


The service name makes it clear that by applications the attackers mean MDM solutions that are business-specific tools .


The operator can specify a path with the database of any targeted application and server-side PHP script name for uploading .


Several hardcoded applications targeted by the MDM-grabbing command ‘ wifi ’ – this command creates a new Wi-Fi connection with specified configurations from the command and enable Wi-Fi if it is disabled .


So , when a device connects to the established network , this process will be in silent and automatic mode .


This command is used to connect the victim to a Wi-Fi network controlled by the cybercriminals to perform traffic sniffing and man-in-the-middle ( MitM ) attacks .


addWifiConfig method code fragments ‘ camera ’ – this command records a video/capture a photo using the front-facing camera when someone next unlocks the device .


Some versions of the Skygofree feature the self-protection ability exclusively for Huawei devices .


There is a ‘ protected apps ’ list in this brand ’ s smartphones , related to a battery-saving concept .


Apps not selected as protected apps stop working once the screen is off and await re-activation , so the implant is able to determine that it is running on a Huawei device and add itself to this list .


Due to this feature , it is clear that the developers paid special attention to the work of the implant on Huawei devices .


Also , we found a debug version of the implant ( 70a937b2504b3ad6c623581424c7e53d ) that contains interesting constants , including the version of the spyware .


Debug BuildConfig with the version After a deep analysis of all discovered versions of Skygofree , we made an approximate timeline of the implant ’ s evolution .


Mobile implant evolution timeline However , some facts indicate that the APK samples from stage two can also be used separately as the first step of the infection .


Below is a list of the payloads used by the Skygofree implant in the second and third stages .


Reverse shell payload The reverse shell module is an external ELF file compiled by the attackers to run on Android .


The choice of a particular payload is determined by the implant ’ s version , and it can be downloaded from the command and control ( C & C ) server soon after the implant starts , or after a specific command .


In the most recent case , the choice of the payload zip file depends on the device process architecture .


For now , we observe only one payload version for following the ARM CPUs : arm64-v8a , armeabi , armeabi-v7a .


Note that in almost all cases , this payload file , contained in zip archives , is named ‘ setting ’ or ‘ setting.o ’ .


The main purpose of this module is providing reverse shell features on the device by connecting with the C & C server ’ s socket .


Reverse shell payload The payload is started by the main module with a specified host and port as a parameter that is hardcoded to ‘ 54.67.109.199 ’ and ‘ 30010 ’ in some versions : Alternatively , they could be hardcoded directly into the payload code : We also observed variants that were equipped with similar reverse shell payloads directly in the main APK /lib/ path .


Equipped reverse shell payload with specific string After an in-depth look , we found that some versions of the reverse shell payload code share similarities with PRISM – a stealth reverse shell backdoor that is available on Github .


Reverse shell payload from update_dev.zip Exploit payload At the same time , we found an important payload binary that is trying to exploit several known vulnerabilities and escalate privileges .


According to several timestamps , this payload is used by implant versions created since 2016 .


It can also be downloaded by a specific command .


The exploit payload contains following file components : Component name Description run_root_shell/arrs_put_user.o/arrs_put_user/poc Exploit ELF db Sqlite3 tool ELF device.db Sqlite3 database with supported devices and their constants needed for privilege escalation ‘ device.db ’ is a database used by the exploit .


It contains two tables – ‘ supported_devices ’ and ‘ device_address ’ .


The first table contains 205 devices with some Linux properties ; the second contains the specific memory addresses associated with them that are needed for successful exploitation .


You can find a full list of targeted models in the Appendix .


Fragment of the database with targeted devices and specific memory addresses If the infected device is not listed in this database , the exploit tries to discover these addresses programmatically .


After downloading and unpacking , the main module executes the exploit binary file .


Once executed , the module attempts to get root privileges on the device by exploiting the following vulnerabilities : CVE-2013-2094 CVE-2013-2595 CVE-2013-6282 CVE-2014-3153 ( futex aka TowelRoot ) CVE-2015-3636 Exploitation process After an in-depth look , we found that the exploit payload code shares several similarities with the public project android-rooting-tools .


Decompiled exploit function code fragment run_with_mmap function from the android-rooting-tools project As can be seen from the comparison , there are similar strings and also a unique comment in Italian , so it looks like the attackers created this exploit payload based on android-rooting-tools project source code .


Busybox payload Busybox is public software that provides several Linux tools in a single ELF file .


In earlier versions , it operated with shell commands like this : Stealing WhatsApp encryption key with Busybox Social payload Actually , this is not a standalone payload file – in all the observed versions its code was compiled with exploit payload in one file ( ‘ poc_perm ’ , ‘ arrs_put_user ’ , ‘ arrs_put_user.o ’ ) .


This is due to the fact that the implant needs to escalate privileges before performing social payload actions .


This payload is also used by the earlier versions of the implant .


It has similar functionality to the ‘ AndroidMDMSupport ’ command from the current versions – stealing data belonging to other installed applications .


The payload will execute shell code to steal data from various applications .


The example below steals Facebook data : All the other hardcoded applications targeted by the payload : Package name Name jp.naver.line.android LINE : Free Calls & Messages com.facebook.orca Facebook messenger com.facebook.katana Facebook com.whatsapp WhatsApp com.viber.voip Viber Parser payload Upon receiving a specific command , the implant can download a special payload to grab sensitive information from external applications .


The case where we observed this involved WhatsApp .


In the examined version , it was downloaded from : hxxp : //url [ .


] plus/Updates/tt/parser.apk The payload can be a .dex or .apk file which is a Java-compiled Android executable .


After downloading , it will be loaded by the main module via DexClassLoader api : As mentioned , we observed a payload that exclusively targets the WhatsApp messenger and it does so in an original way .


The payload uses the Android Accessibility Service to get information directly from the displayed elements on the screen , so it waits for the targeted application to be launched and then parses all nodes to find text messages : Note that the implant needs special permission to use the Accessibility Service API , but there is a command that performs a request with a phishing text displayed to the user to obtain such permission .


Windows We have found multiple components that form an entire spyware system for the Windows platform .


Name MD5 Purpose msconf.exe 55fb01048b6287eadcbd9a0f86d21adf Main module , reverse shell network.exe f673bb1d519138ced7659484c0b66c5b Sending exfiltrated data system.exe d3baa45ed342fbc5a56d974d36d5f73f Surrounding sound recording by mic update.exe 395f9f87df728134b5e3c1ca4d48e9fa Keylogging wow.exe


16311b16fd48c1c87c6476a455093e7a Screenshot capturing skype_sync2.exe 6bcc3559d7405f25ea403317353d905f Skype call recording to MP3 All modules , except skype_sync2.exe , are written in Python and packed to binary files via the Py2exe tool .


This sort of conversion allows Python code to be run in a Windows environment without pre-installed Python binaries .


msconf.exe is the main module that provides control of the implant and reverse shell feature .


It opens a socket on the victim ’ s machine and connects with a server-side component of the implant located at 54.67.109.199:6500 .


Before connecting with the socket , it creates a malware environment in ‘ APPDATA/myupd ’ and creates a sqlite3 database there – ‘ myupd_tmp\\mng.db ’ : CREATE TABLE MANAGE ( ID INT PRIMARY KEY NOT NULL , Send INT NOT NULL , Keylogg INT NOT NULL , Screenshot INT NOT NULL , Audio INT NOT NULL ) ; INSERT INTO MANAGE ( ID , Send , Keylogg , Screenshot , Audio


) VALUES ( 1 , 1 , 1 , 1 , 0 ) Finally , the malware modifies the ‘ Software\Microsoft\Windows\CurrentVersion\Run ’ registry key to enable autostart of the main module .


The code contains multiple comments in Italian , here is the most noteworthy example : “ Receive commands from the remote server , here you can set the key commands to command the virus ” Here are the available commands : Name Description cd Change current directory to specified quit Close the socket nggexe Execute received command via Python ’ s subprocess.Popen ( ) without outputs ngguploads Upload specified file to the specified URL nggdownloads Download content from the specified URLs and save to specified file nggfilesystem Dump file structure of


the C : path , save it to the file in json format and zip it nggstart_screen nggstop_screen Enable/disable screenshot module .


When enabled , it makes a screenshot every 25 seconds nggstart_key nggstop_key Enable/disable keylogging module nggstart_rec nggstop_rec Enable/disable surrounding sounds recording module ngg_status Send components status to the C & C socket * any other * Execute received command via Python ’ s subprocess.Popen ( ) , output result will be sent to the C & C socket .


All modules set hidden attributes to their files : Module Paths Exfiltrated data format msconf.exe % APPDATA % /myupd/gen/ % Y % m % d- % H % M % S_filesystem.zip ( file structure dump ) system.exe % APPDATA % /myupd/aud/ % d % m % Y % H % M % S.wav ( surrounding sounds ) update.exe % APPDATA % /myupd_tmp/txt/ % APPDATA % /myupd/txt/ % Y % m


% d- % H % M % S.txt ( keylogging ) wow.exe % APPDATA % /myupd/scr/ % Y % m % d- % H % M % S.jpg ( screenshots ) skype_sync2.exe % APPDATA % /myupd_tmp/skype/ % APPDATA % /myupd/skype/ yyyyMMddHHmmss_in.mp3 yyyyMMddHHmmss_out.mp3 ( skype calls records ) Moreover , we found one module written


in .Net – skype_sync2.exe .


The main purpose of this module is to exfiltrate Skype call recordings .


Just like the previous modules , it contains multiple strings in Italian .


After launch , it downloads a codec for MP3 encoding directly from the C & C server : http : //54.67.109.199/skype_resource/libmp3lame.dll The skype_sync2.exe module has a compilation timestamp – Feb 06 2017 and the following PDB string : \\vmware-host\Shared Folders\dati\Backup\Projects\REcodin_2\REcodin_2\obj\x86\Release\REcodin_2.pdb network.exe is a


module for submitting all exfiltrated data to the server .


In the observed version of the implant it doesn ’ t have an interface to work with the skype_sync2.exe module .


network.exe submitting to the server code snippet Code similarities We found some code similarities between the implant for Windows and other public accessible projects .


https : //github.com/El3ct71k/Keylogger/ It appears the developers have copied the functional part of the keylogger module from this project .


update.exe module and Keylogger by ‘ El3ct71k ’ code comparison Xenotix Python Keylogger including specified mutex ‘ mutex_var_xboz ’ .


update.exe module and Xenotix Python Keylogger code comparison ‘ addStartup ’ method from msconf.exe module ‘ addStartup ’ method from Xenotix Python Keylogger Distribution We found several landing pages that spread the Android implants .


Malicious URL Referrer Dates http : //217.194.13.133/tre/internet/Configuratore_3.apk http : //217.194.13.133/tre/internet/ 2015-02-04 to present time http : //217.194.13.133/appPro_AC.apk – 2015-07-01 http : //217.194.13.133/190/configurazione/vodafone/smartphone/VODAFONE % 20Configuratore % 20v5_4_2.apk http : //217.194.13.133/190/configurazione/vodafone/smartphone/index.html


2015-01-20 to present time http : //217.194.13.133/190/configurazione/vodafone/smartphone/Vodafone % 20Configuratore.apk http : //217.194.13.133/190/configurazione/vodafone/smartphone/index.html currently active http : //vodafoneinfinity.sytes.net/tim/internet/Configuratore_TIM.apk http : //vodafoneinfinity.sytes.net/tim/internet/ 2015-03-04 http : //vodafoneinfinity.sytes.net/190/configurazione/vodafone/smartphone/VODAFONE


% 20Configuratore % 20v5_4_2.apk http : //vodafoneinfinity.sytes.net/190/configurazione/vodafone/smartphone/ 2015-01-14 http : //windupdate.serveftp.com/wind/LTE/WIND % 20Configuratore % 20v5_4_2.apk http : //windupdate.serveftp.com/wind/LTE/ 2015-03-31 http : //119.network/lte/Internet-TIM-4G-LTE.apk http : //119.network/lte/download.html


2015-02-04 2015-07-20 http : //119.network/lte/Configuratore_TIM.apk 2015-07-08 Many of these domains are outdated , but almost all ( except one – appPro_AC.apk ) samples located on the 217.194.13.133 server are still accessible .


All the observed landing pages mimic the mobile operators ’ web pages through their domain name and web page content as well .


Further research of the attacker ’ s infrastructure revealed more related mimicking domains .


Unfortunately , for now we can ’ t say in what environment these landing pages were used in the wild , but according to all the information at our dsiposal , we can assume that they are perfect for exploitation using malicious redirects or man-in-the-middle attacks .


For example , this could be when the victim ’ s device connects to a Wi-Fi access point that is infected or controlled by the attackers .


Artifacts During the research , we found plenty of traces of the developers and those doing the maintaining .


As already stated in the ‘ malware features ’ part , there are multiple giveaways in the code .


Here are just some of them : ngglobal – FirebaseCloudMessaging topic name Issuer : CN = negg – from several certificates negg.ddns [ .


] net , negg1.ddns [ .


] net , negg2.ddns [ .


] net – C & C servers NG SuperShell – string from the reverse shell payload ngg – prefix in commands names of the implant for Windows Signature with specific issuer Whois records and IP relationships provide many interesting insights as well .


There are a lot of other ‘ Negg ’ mentions in Whois records and references to it .


For example : Conclusions The Skygofree Android implant is one of the most powerful spyware tools that we have ever seen for this platform .


As a result of the long-term development process , there are multiple , exceptional capabilities : usage of multiple exploits for gaining root privileges , a complex payload structure , never-before-seen surveillance features such as recording surrounding audio in specified locations .


Given the many artifacts we discovered in the malware code , as well as infrastructure analysis , we are pretty confident that the developer of the Skygofree implants is an Italian IT company that works on surveillance solutions , just like HackingTeam .


HenBox : The Chickens Come Home to Roost March 13 , 2018 at 5:00 AM Unit 42 recently discovered a new Android malware family we named “ HenBox ” masquerading as a variety of legitimate Android apps .


We chose the name “ HenBox ” based on metadata found in most of the malicious apps such as package names and signer detail .


HenBox masquerades as apps such as VPN and Android system apps and often installs legitimate versions of these apps along with HenBox to trick users into thinking they downloaded the legitimate app .


While some of the legitimate apps HenBox use as decoys can be found on Google Play , HenBox apps themselves have only been found on third-party ( non-Google Play ) app stores .


HenBox appears to primarily target the Uyghurs – a minority Turkic ethnic group that is primarily Muslim and lives mainly in the Xinjiang Uyghur Autonomous Region in North West China .


It also targets devices made by Chinese manufacturer Xiaomi and those running MIUI , an operating system based on Google Android made by Xiaomi .


Smartphones are the dominant form of internet access in the region and Xinjiang was recently above the national average of internet users in China .


The result is a large online population who have been the subject of numerous cyber-attacks in the past .


Once installed , HenBox steals information from the devices from a myriad of sources , including many mainstream chat , communication , and social media apps .


The stolen information includes personal and device information .


Of note , in addition to tracking the compromised device ’ s location , HenBox also harvests all outgoing phone numbers with an “ 86 ” prefix , which is the country code for the People ’ s Republic of China ( PRC ) .


It can also access the phone ’ s cameras and microphone .


HenBox has ties to infrastructure used in targeted attacks with a focus on politics in South East Asia .


These attackers have used additional malware families in previous activity dating to at least 2015 that include PlugX , Zupdax , 9002 , and Poison Ivy .


This also aligns with HenBox ’ s timeline , as in total we have identified almost 200 HenBox samples , with the oldest dating to 2015 .


Most of the samples we found date from the last half of 2017 , fewer samples date from 2016 , and a handful date back to 2015 .


In 2018 , we have already observed a small but consistent number of samples .


We believe this indicates a fairly sustained campaign that has gained momentum over recent months .


HenBox Enters the Uyghur App Store In May 2016 , a HenBox app was downloaded from uyghurapps [ .


] net .


Specifically , the app was an Android Package ( APK ) file that will be discussed in more detail shortly .


The domain name , language of the site and app content hosted suggest this site is a third-party app store for whom the intended users are the Uyghurs .


Such app stores are so-called because they are not officially supported by Android , nor are they provided by Google , unlike the Play Store .


Third-party app stores are ubiquitous in China for a number of reasons including : evermore powerful Chinese Original Equipment Manufacturers ( OEM ) , a lack of an official Chinese Google Play app store , and a growing smartphone market .


The HenBox app downloaded in May 2016 was masquerading as the DroidVPN app .


At the time of writing , the content served at the given URL on uyghurapps [ .


] net , is now a legitimate version of the DroidVPN app , and looks as shown in Figure 1 below .


henbox_2 Figure 1 Uyghurapps [ .


] net app store showing the current DroidVPN app Virtual Private Network ( VPN ) tools allow connections to remote private networks , increasing the security and privacy of the user ’ s communications .


According to the DroidVPN app description , it “ helps bypass regional internet restrictions , web filtering and firewalls by tunneling traffic over ICMP. ” Some features may require devices to be rooted to function and according to some 3rd party app stores , unconditional rooting is required , which has additional security implications for the device .


We have not been able to ascertain how the DroidVPN app on the uyghurapps [ .


] net app store was replaced with the malicious HenBox app ; however , some indicators point to the server running an outdated version of Apache Web Server on a Windows 32-Bit operating system .


In light of this , we believe an attack against unpatched vulnerabilities is a reasonable conjecture for how the server was compromised .


The HenBox app downloaded in May 2016 , as described in Table 1 below , masquerades as a legitimate version of the DroidVPN app by using the same app name “ DroidVPN ” and the same iconography used when displaying the app in Android ’ s launcher view , as highlighted in Figure 2 below Table 1 .


APK SHA256 Size ( bytes ) First Seen App Package name App name 0589bed1e3b3d6234c30061be3be1cc6685d786ab3a892a8d4dae8e2d7ed92f7 2,740,860 May 2016 com.android.henbox DroidVPN Table 1 Details of the HenBox DroidVPN app on the uyghurapps [ .


] net app store henbox_3 Figure 2 HenBox app installed , purporting to be DroidVPN Depending on the language setting on the device , and for this particular variant of HenBox , the installed HenBox app may have the name “ Backup ” but uses the same DroidVPN logo .


Other variants use other names and logos , as described later .


Given the DroidVPN look and feel being used by this variant of HenBox , it ’ s highly likely the uyghurapps [ .


] net page for DroidVPN remained identical when serving either HenBox or DroidVPN apps , just that the legitimate APK file had been replaced with HenBox for an unknown period of time .


In addition to the look and feel of DroidVPN , this HenBox variant also contained a legitimate DroidVPN app within its APK package as an asset , which could be compared to a resource item within a Windows Portable Executable ( PE ) file .


Once the HenBox app is installed and launched , it launches an install process for the embedded app as a decoy to other malicious behaviors occurring in the background , and to satisfy the victim with the app they were requesting , assuming they requested to download a particular app , such as DroidVPN .


The version of the legitimate DroidVPN embedded inside this HenBox variant is the same version of DroidVPN available for download from uyghurapps [ .


] net , at the time of writing .


It ’ s worth noting , newer versions of the DroidVPN app are available on Google Play , as well as in some other third-party app stores , which could indicate uyghurapps [ .


] net is not awfully well maintained or updated to the latest apps available .


At the time of writing , to our knowledge no other third-party app stores , nor the official Google Play store , were or are hosting this malicious HenBox variant masquerading as DroidVPN .


The Right App at the Right Time The malicious HenBox and embedded DroidVPN app combination is one instance of the type of legitimate apps the attackers choose to mimic to compromise their victims .


These threat actors frequently offer malicious apps purporting to be legitimate apps that are broadly used or important to a targeted population .


It ’ s worth noting however , about one-third of the HenBox apps contained embedded APK objects that did not refer to legitimate apps .


Some were only 3 bytes long , containing strings such as “ ddd ” and “ 333 ” , or were otherwise corrupted .


Beyond the previously mentioned DroidVPN example , other viable embedded apps we found include apps currently available on Google Play , as well as many third-party app stores .


Table 2 below lists some of these apps with their respective metadata .


Sample 1 marks the first HenBox sample we saw embedding a legitimate app within its assets to be dropped and installed on the victim device as a decoy .


The legitimate app in question was a Uyghur language keyboard app targeted at native speakers of the Uyghur language and their smartphones .


Sample 2 , has the package name cn.android.setting masquerading as Android ’ s Settings app , which has a similar package name ( com.android.settings ) .


This variant of HenBox also used the common green Android figure as the app logo and was named 设置 ( “ Backup ” in English ) .


This variant ’ s app name , along with many others , is written in Chinese and describes the app as a backup tool .


Please see the IOCs section for all app and package name combinations .


Interestingly , the embedded app in sample 2 is not a version of the Android Settings app but instead the “ Amaq Agency ” app , which reports on ISIS related news .


Reports indicate fake versions of the Amaq app exist , likely in order to spy on those that use it .


A month after observing sample 2 , we obtained another which used the same package name as sample 2 ( cn.android.setting ) .


However , this time the app name for both HenBox and the embedded app were identical : Islamawazi .


Islamawazi is also known as the Turkistan Islamic Party or “ TIP ” .


This organization was formerly known as the East Turkestan Islamic Party and is purported to be an Islamic extremist separatist organization founded by Uyghur jihadists .


The embedded app appears to be a media player .


These examples , together with the HenBox app placed on a very specific third-party app store , point clearly to at least some of the intended targets of these malicious apps being Uyghurs , specifically those with interest in or association with terrorist groups .


These threat actors appear to be choosing the right apps – those that could be popular with locals in the region , at the right time – while tensions grow in this region of China , to ensure a good victim install-base .


HenBox Roosts HenBox has evolved over the past three years , and of the almost two hundred HenBox apps in AutoFocus , the vast majority contain several native libraries as well as other components in order to achieve their objective .


Most components are obfuscated in some way , whether it be simple XOR with a single-byte key , or through the use of ZIP or Zlib compression wrapped with RC4 encryption .


These components are responsible for a myriad of functions including handling decryption , network communications , gaining super-user privileges , monitoring system logs , loading additional Dalvik code files , tracking the device location and more .


The remainder of this section describes at a high-level what HenBox is capable of , and how it operates .


The description is based on analysis of the sample described in Table 3 below , which was of interest given its C2 domain mefound [ .


] com overlaps with PlugX , Zupdax , and Poison Ivy malware families discussed in more detail later .


SHA256 Package Name App Name a6c7351b09a733a1b3ff8a0901c5bde fdc3b566bfcedcdf5a338c3a97c9f249b com.android.henbox 备份 ( Backup ) Table 3 HenBox variant used in description Once this variant of HenBox is installed on the victim ’ s device , the app can be executed in two different ways : One method for executing HenBox is for the victim to launch the malicious app ( named “ Backup ” , in


this instance ) from the launcher view on their device , as shown in Figure 3 below .


This runs code in the onCreate ( ) method of the app ’ s MainActivity class , which in effect is the program ’ s entry point .


This process is defined in the app ’ s AndroidManifest.xml config file , as shown in the following snippet .


Doing so executes code checking if the device is manufactured by Xiaomi , or if Xiaomi ’ s fork of Android is running on the device .


Under these conditions , the app continues executing and the intent of targeting Xiaomi devices and users could be inferred , however poorly written code results in execution in more environments than perhaps intended ; further checks are made to ascertain whether the app is running on an emulator , perhaps to evade researcher analysis environments .


Assuming these checks pass , one of the main ELF libraries is loaded that orchestrates other components and provides functionality to the app ’ s Dalvik code through the Java Native Interface ( JNI ) .


HenBox checks whether this execution is its first by using Android ’ s shared preferences feature to persist XML key-value pair data .


If it is the first execution , and if the app ’ s path does not contain “ /system/app ” ( i.e .


HenBox is not running as a system app ) , another ELF library is loaded to aid with executing super-user commands .


The second method uses intents , broadcasts , and receivers to execute HenBox code .


Providing the app has registered an intent to process particular events from the system , and one of said events occurs , HenBox is effectively brought to life through external stimulus from another app on the system broadcasting a request , or the system itself broadcasting a particular event has occurred .


These intents are typically defined statically in the app ’ s AndroidManifest.xml config file ; some HenBox variants register further intents from their code at run-time .


Once a matching intent is triggered , the respective Receiver code will be executed , leading to other HenBox behaviors being launched , which are described later .


Table 4 below lists the intents that are statically registered in this HenBox variant ’ s AndroidManifest.xml config file , together with a description of what that intent does , and when it would be used .


Depending on the intent triggered , one of two Receivers would be called , in this instance they are called Boot or Time but the name is somewhat immaterial .


Receiver Intent Name Description BootReceiver android.intent.action.BOOT_COMPLETED System notification that the device has finished booting .


android.intent.action.restart A legacy intent used to indicate a system restart .


android.intent.action.SIM_STATE_CHANGED System notification that the SIM card has changed or been removed .


android.intent.action.PACKAGE_INSTALL System notification that the download and eventual installation of an app package is happening ( this is deprecated ) android.intent.action.PACKAGE_ADDED System notification that a new app package has been installed on the device , including the name of said package .


com.xiaomi.smarthome.receive_alarm Received notifications from Xiaomi ’ s smart home IoT devices .


TimeReceiver android.intent.action.ACTION_TIME_CHANGED System notification that the time was set .


android.intent.action.CONNECTIVITY_CHANGE System notification that a change in network connectivity has occurred , either lost or established .


Since Android version 7 ( Nougat ) this information is gathered using other means , perhaps inferring the devices used by potential victim run older versions of Android .


Table 4 HenBox variant 's Intents and Receivers Most of the intents registered in the AndroidManifest.xml file , or loaded during run-time , are commonly found in malicious Android apps .


What ’ s more interesting , and much less common , is the inclusion of the com.xiaomi.smarthome.receive_alarm intent filter .


Xiaomi , a privately owned Chinese electronics and software company , is the 5th largest smart phone manufacturer in the world and also manufactures IoT devices for the home .


Most devices can be controlled by Xiaomi ’ s “ MiHome ” Android app , which is available on Google Play with between 1,000,000 and 5,000,000 downloads .


Given the nature of connected devices in smart homes , it ’ s highly likely many of these devices , and indeed the controller app itself , communicate with one another sending status notifications , alerts and so on .


Such notifications would be received by the MiHome app or any other , such as HenBox , so long as they register their intent to do so .


This could essentially allow for external devices to act as a trigger to execute the malicious HenBox code , or perhaps afford additional data HenBox can collect and exfiltrate .


Either method to load HenBox ultimately results in an instance of a service being launched .


This service hides the app from plain sight and loads another ELF library to gather environmental information about the device , such as running processes and apps , and details about device hardware , primarily through parsing system logs and querying running processes .


The service continues by loading an ELF , created by Baidu , which is capable of tracking the device location before setting up a monitor to harvest phone numbers associated with outgoing calls for those numbers with a country code “ +86 ” prefix , which relates to the People ’ s Republic of China .


Further assets are decrypted and deployed , including another Dalvik DEX code file , which has various capabilities including registering itself as the incoming SMS handler for the device to intercept SMS messages , loading another ELF library that includes a version of BusyBox - a package containing various stripped-down Unix tools useful for administering such systems – and , interestingly , is capable of turning off the sound played when the device ’ s cameras take pictures .


The Android permissions requested by HenBox , as defined in the apps ’ AndroidManifest.xml files , range from accessing location and network settings to messages , call , and contact data .


HenBox can also access sensors such as the device camera ( s ) and the microphone .


Beyond the Android app itself , other components such as the aforementioned ELF libraries have additional data-stealing capabilities .


One ELF library , libloc4d.so , handles amongst other things the loading of the app-decoded ELF library file “ sux ” , as well as handling connectivity to the C2 .


The sux library appears to be a customized super user ( su ) tool that includes code from the com.koushikdutta.superuser app and carries the equivalent of a super user ( su ) binary in order to run privileged commands on the system .


The primary goal of sux appears to be steal messages and other data from popular messaging and social media apps specified within the HenBox sample .


A similar tool , with the same filename , has been discussed in previous research but the SpyDealer malware appears unrelated to HenBox .


More likely , this is a case of common attack tools being re-used between different threat actor groups .


This particular HenBox variant , as listed in Table 3 above , harvests data from two popular messaging and social media apps : Voxer Walkie Talkie Messenger ( com.rebelvox.voxer ) and Tencent ’ s WeChat ( com.tencent.mm ) .


These types of apps tend to store their data in databases and , as an example , HenBox accesses Voxer ’ s database from the file “ /data/data/com.rebelvox.voxer/databases/rv.db ” .


Once opened , HenBox runs the following query to gather message information .


Not long after this variant was public , newer variants of HenBox were seen , and some had significant increases in the number of targeted apps .


Table 5 describes the latest variant seen in AutoFocus .


SHA256 Package Name App Name First Seen 07994c9f2eeeede199dd6b4e760fce3 71f03f3cc4307e6551c18d2fbd024a24f com.android.henbox 备份 ( Backup ) January 3rd 2018 Table 6 contains an updated list of targeted apps from which this newer variant of HenBox is capable of harvesting data .


Interestingly , the two communication apps described above as being targeted by the HenBox variant listed in Table 3 do not appear in this updated list .


Package Name App Name com.whatsapp WhatsApp Messenger com.pugna.magiccall n/a org.telegram.messenger Telegram com.facebook.katana Facebook com.twitter.android Twitter jp.naver.line.android LINE : Free Calls & Messages com.instanza.cocovoice Coco com.beetalk BeeTalk com.gtomato.talkbox TalkBox Voice Messenger - PTT com.viber.voip Viber Messenger com.immomo.momo MOMO陌陌 com.facebook.orca Messenger – Text and Video Chat for Free com.skype.rover


Skype ; 3rd party stores only Most of these apps are well established and available on Google Play , however , com.skype.rover appears to be available only on third-party app stores .


The same is likely to be the case for com.pugna.magiccall but this is unknown currently .


It ’ s clear to see that the capabilities of HenBox are very comprehensive , both in terms of an Android app with its native libraries and given the amount of data it can glean from a victim .


Such data includes contact and location information , phone and message activity , the ability to record from the microphone , camera , and other sensors as well as the capability to access data from many popular messaging and social media apps .


Infrastructure While investigating HenBox we discovered infrastructure ties to other malware families associated with targeted attacks against Windows users – notable overlaps included PlugX , Zupdax , 9002 , and Poison Ivy .


The overall image of these ties is below in Figure 5 and paints a picture of an adversary with at least 5 malware families in their toolbox dating back to at least 2015 .


The overlap between the HenBox and 9002 malware families Unit 42 has seen involves three shared C2s between several samples ; the first IP below is used for more than half of the HenBox samples we have seen to date : 47.90.81 [ .


] 23 222.139.212 [ .


] 16 lala513.gicp [ .


] net The overlaps between the Henbox , PlugX , Zupdax , and Poison Ivy malware families involves a web of shared C2s and IP resolutions centered around the below : 59.188.196 [ .


] 172 cdncool [ .


] com ( and third-levels of this domain ) www3.mefound [ .


] com www5.zyns [ .


] com w3.changeip [ .


] org Ties to previous activity The registrant of cdncool [ .


] com also registered six other domains .


To date , Unit 42 has seen four of the seven ( the first three in the list below , along with cdncool [ .


] com ) used in malicious activity and it is reasonable to assume the remaining three are or were intended to serve the same purpose .


tcpdo [ .


] net adminsysteminfo [ .


] com md5c [ .


] net linkdatax [ .


] com csip6 [ .


] biz adminloader [ .


] com Unit 42 published a blog in July 2016 about 9002 malware being delivered using a combination of shortened links and a file hosted on Google Drive .


The spear phishing emails had Myanmar political-themed lures and , if the 9002 C2 server responded , the Trojan sent system specific information along with the string “ jackhex ” .


“ jackhex ” has also been part of a C2 for what is likely related Poison Ivy activity detailed below , along with additional infrastructure ties .


The C2 for the aforementioned 9002 sample was logitechwkgame [ .


] com , which resolved to the IP address 222.239.91 [ .


] 30 .


At the same time , the domain admin.nslookupdns [ .


] com also resolved to the same IP address , suggesting that these two domains are associated with the same threat actors .


In addition , admin.nslookupdns [ .


] com was a C2 for Poison Ivy samples associated with attacks on Myanmar and other Asian countries discussed in a blog published by Arbor Networks in April 2016 .


Another tie between the activity is the C2 jackhex.md5c [ .


] net , which was also used as a Poison Ivy C2 in the Arbor Networks blog .


“ jackhex ” is not a common word or phrase and , as noted above , was also seen in the beacon activity with the previously discussed 9002 sample .


Finally , since publishing the 9002 blog , Unit 42 has also seen the aforementioned 9002 C2 used as a Poison Ivy C2 with a Myanmar political-themed lure .


In our 9002 blog we noted some additional infrastructure used either as C2s for related Poison Ivy samples , or domain registrant overlap with those C2 domains .


When we published that blog Unit 42 hadn ’ t seen any of the three registrants overlap domains used in malicious activity .


Since then , we have seen Poison Ivy samples using third-levels of querlyurl [ .


] com , lending further credence the remaining two domains , gooledriveservice [ .


] com and appupdatemoremagic [ .


] com are or were intended for malicious use .


While we do not have complete targeting , information associated with these Poison Ivy samples , several of the decoy files were in Chinese and appear to be part of a 2016 campaign targeting organizations in Taiwan with political-themed lures .


Conclusion Typically masquerading as legitimate Android system apps , and sometimes embedding legitimate apps within them , the primary goal of the malicious HenBox appears to be to spy on those who install them .


Using similar traits , such as copycat iconography and app or package names , victims are likely socially engineered into installing the malicious apps , especially when available on so-called third-party ( i.e .


non-Google Play ) app stores which often have fewer security and vetting procedures for the apps they host .


It ’ s possible , as with other Android malware , that some apps may also be available on forums , file-sharing sites or even sent to victims as email attachments , and we were only able to determine the delivery mechanism for a handful of the apps we have been able to find .


The hosting locations seen for some HenBox samples , together with the nature of some embedded apps including : those targeted at extremist groups , those who use VPN or other privacy-enabling apps , and those who speak the Uyghur language , highlights the victim profile the threat actors were seeking to attack .


The targets and capabilities of HenBox , in addition to the ties to previous activity using four different Windows malware families with political-themed lures against several different South East Asian countries , indicates this activity likely represents an at least three-year-old espionage campaign .


THURSDAY , OCTOBER 11 , 2018 GPlayed Trojan - .Net playing with Google Market Introduction In a world where everything is always connected , and mobile devices are involved in individuals ' day-to-day lives more and more often , malicious actors are seeing increased opportunities to attack these devices .


Cisco Talos has identified the latest attempt to penetrate mobile devices — a new Android trojan that we have dubbed " GPlayed .


'' This is a trojan with many built-in capabilities .


At the same time , it 's extremely flexible , making it a very effective tool for malicious actors .


The sample we analyzed uses an icon very similar to Google Apps , with the label " Google Play Marketplace '' to disguise itself .


The malicious application is on the left-hand side .


What makes this malware extremely powerful is the capability to adapt after it 's deployed .


In order to achieve this adaptability , the operator has the capability to remotely load plugins , inject scripts and even compile new .NET code that can be executed .


Our analysis indicates that this trojan is in its testing stage but given its potential , every mobile user should be aware of GPlayed .


Mobile developers have recently begun eschewing traditional app stores and instead want to deliver their software directly through their own means .


But GPlayed is an example of where this can go wrong , especially if a mobile user is not aware of how to distinguish a fake app versus a real one .


Trojan architecture and capabilities This malware is written in .NET using the Xamarin environment for mobile applications .


The main DLL is called " Reznov.DLL .


'' This DLL contains one root class called " eClient , '' which is the core of the trojan .


The imports reveal the use of a second DLL called " eCommon.dll .


'' We determined that the " eCommon '' file contains support code and structures that are platform independent .


The main DLL also contains eClient subclasses that implement some of the native capabilities .


The package certificate is issued under the package name , which also resembles the name of the main DLL name .


Certificate information The Android package is named " verReznov.Coampany .


'' The application uses the label " Installer '' and its name is " android.app.Application .


'' Package permissions The trojan declares numerous permissions in the manifest , from which we should highlight the BIND_DEVICE_ADMIN , which provides nearly full control of the device to the trojan .


This trojan is highly evolved in its design .


It has modular architecture implemented in the form of plugins , or it can receive new .NET source code , which will be compiled on the device in runtime .


Initialization of the compiler object The plugins can be added in runtime , or they can be added as a package resource at packaging time .


This means that the authors or the operators can add capabilities without the need to recompile and upgrade the trojan package on the device .


Trojan native capabilities This is a full-fledged trojan with capabilities ranging from those of a banking trojan to a full spying trojan .


This means that the malware can do anything from harvest the user 's banking credentials , to monitoring the device 's location .


There are several indicators ( see section " trojan activity '' below ) that it is in its last stages of development , but it has the potential to be a serious threat .


Trojan details Upon boot , the trojan will start by populating a shared preferences file with the configuration it has on its internal structures .


Afterward , it will start several timers to execute different tasks .


The first timer will be fired on the configured interval ( 20 seconds in this case ) , pinging the command and control ( C2 ) server .


The response can either be a simple " OK , '' or can be a request to perform some action on the device .


The second timer will run every five seconds and it will try to enable the WiFi if it 's disabled .


The third timer will fire every 10 seconds and will attempt to register the device into the C2 and register wake-up locks on the system to control the device 's status .


During the trojan registration stage , the trojan exfiltrates private information such as the phone 's model , IMEI , phone number and country .


It will also report the version of Android that the phone is running and any additional capabilities .


Device registration This is the last of the three main timers that are created .


The trojan will register the SMS handler , which will forward the contents and the sender of all of the SMS messages on the phone to the C2 .


The final step in the trojan 's initialization is the escalation and maintenance of privileges in the device .


This is done both by requesting admin privileges on the device and asking the user to allow the application to access the device 's settings .


Privilege escalation requests The screens asking for the user 's approval wo n't close unless the user approves the privilege escalation .


If the user closes the windows , they will appear again due to the timer configuration .


After the installation of the trojan , it will wait randomly between three and five minutes to activate one of the native capabilities — these are implemented on the eClient subclass called " GoogleCC .


'' This class will open a WebView with a Google-themed page asking for payment in order to use the Google services .


This will take the user through several steps until it collects all the necessary credit card information , which will be checked online and exfiltrated to the C2 .


During this process , an amount of money , configured by the malicious operator , is requested to the user .


Steps to request the user 's credit card information In our sample configuration , the request for the views above can not be canceled or removed from the screen — behaving just like a screen lock that wo n't be disabled without providing credit card information .


All communication with the C2 is done over HTTP .


It will use either a standard web request or it will write data into a web socket if the first method fails .


The C2 can also use WebSocket as a backup communication channel .


Before sending any data to the C2 using the trojan attempts to disguise its data , the data is serialized using JSON , which is then encoded in Base64 .


However , the trojan replaces the '= ' by 'AAAZZZXXX ' , the '+ ' by '| ' and the '/ ' by ' .


' to disguise the Base64 .


Request encoding process The HTTP requests follow the format below , while on the WebSocket only the query data is written .


q= - : As is common with trojans , the communication is always initiated by the trojan on the device to the C2 .


The request codes are actually replies to the C2 action requests , which are actually called " responses .


'' There are 27 response codes that the C2 can use to make requests to the trojan , which pretty much match what 's listed in the capabilities section .


Error Registration Ok Empty SendSMS RequestGoogleCC Wipe OpenBrowser SendUSSD RequestSMSList RequestAppList RequestLocation ShowNotification SetLockPassword LockNow MuteSound LoadScript LoadPlugin ServerChange StartApp CallPhone SetPingTimer SMSBroadcast RequestContacts AddInject RemoveInject Evaluate Another feature of this trojan is the ability to register injects , which are JavaScript snippets of code .


These will be executed in a WebView object created by the trojan .


This gives the operators the capability to trick the user into accessing any site while stealing the user 's cookies or forging form fields , like account numbers or phone numbers .


Trojan activity At the time of the writing of this post , all URLs ( see IOC section ) found on the sample were inactive , and it does not seem to be widespread .


There are some indicators that this sample is just a test sample on its final stages of development .


There are several strings and labels still mentioning 'test ' or 'testcc ' — even the URL used for the credit card data exfiltration is named " testcc.php .


'' Debug information on logcat Another indicator is the amount of debugging information the trojan is still generating — a production-level trojan would keep its logging to a minimum .


The only sample was found on public repositories and almost seemed to indicate a test run to determine the detection ratio of the sample .


We have observed this trojan being submitted to public antivirus testing platforms , once as a package and once for each DLL to determine the detection ratio .


The sample analyzed was targeted at Russian-speaking users , as most of the user interaction pages are written in Russian .


However , given the way the trojan is built , it is highly customizable , meaning that adapting it to a different language would be extremely easy .


The wide range of capabilities does n't limit this trojan to a specific malicious activity like a banking trojan or a ransomware .


This makes it impossible to create a target profile .


Conclusion This trojan shows a new path for threats to evolve .


Having the ability to move code from desktops to mobile platforms with no effort , like the eCommon.DLL demonstrates that malicious actors can create hybrid threats faster and with fewer resources involved than ever before .


This trojan 's design and implementation is of an uncommonly high level , making it a dangerous threat .


These kinds of threats will become more common , as more and more companies decide to publish their software directly to consumers .


There have been several recent examples of companies choosing to release their software directly to consumers , bypassing traditional storefronts .


The average user might not have the necessary skills to distinguish legitimate sites from malicious ones .


We 've seen that this has been the case for many years with spear-phishing campaigns on desktop and mobile platforms , so , unfortunately , it does n't seem that this will change any time soon .


And this just means attackers will continue to be successful .


Coverage Additional ways our customers can detect and block this threat are listed below .


Advanced Malware Protection ( AMP ) is ideally suited to prevent the execution of the malware used by these threat actors .


Cisco Cloud Web Security ( CWS ) or Web Security Appliance ( WSA ) web scanning prevents access to malicious websites and detects malware used in these attacks .


Email Security can block malicious emails sent by threat actors as part of their campaign .


Network Security appliances such as Next-Generation Firewall ( NGFW ) , Next-Generation Intrusion Prevention System ( NGIPS ) , and Meraki MX can detect malicious activity associated with this threat .


AMP Threat Grid helps identify malicious binaries and build protection into all Cisco Security products .


Umbrella , our secure internet gateway ( SIG ) , blocks users from connecting to malicious domains , IPs , and URLs , whether users are on or off the corporate network .


Open Source Snort Subscriber Rule Set customers can stay up to date by downloading the latest rule pack available for purchase on Snort.org .


Indicators of compromise ( IOC ) URLs hxxp : //5.9.33.226:5416 hxxp : //172.110.10.171:85/testcc.php hxxp : //sub1.tdsworker.ru:5555/3ds/ Hash values Package.apk - A342a16082ea53d101f556b50532651cd3e3fdc7d9e0be3aa136680ad9c6a69f eCommon.dl - 604deb75eedf439766896f05799752de268baf437bf89a7185540627ab4a4bd1


Reznov.dll - 17b8665cdbbb94482ca970a754d11d6e29c46af6390a2d8e8193d8d6a527dec3 Custom activity prefix com.cact.CAct Cerberus - A new banking Trojan from the underworld August 2019 In June 2019 , ThreatFabric analysts found a new Android malware , dubbed “ Cerberus ” , being rented out on underground forums .


Its authors claim that it was used for private operations for two years preceding the start of the rental .


They also state that the code is written from scratch and is not using parts of other existing banking Trojans unlike many other Trojans that are either based completely on the source of another Trojan ( such as the leaked Anubis source code that is now being resold ) or at least borrow parts of other Trojans .


After thorough analysis we can confirm that Cerberus was indeed not based on the Anubis source code .


One peculiar thing about the actor group behind this banking malware is that they have an “ official ” twitter account that they use to post promotional content ( even videos ) about the malware .


Oddly enough they also use it to make fun of the AV community , sharing detection screenshots from VirusTotal ( thus leaking IoC ) and even engaging in discussions with malware researchers directly The following screenshot shows tweets from their advertisement campaign : That unusual behavior could be explained by the combination of the need for attention and a probable lack of experience .


What is sure is that the gap in the Android banking malware rental business left open after the rental of the Anubis 2 and RedAlert 2 Trojans ended provides a good opportunity for the actors behind Cerberus to grow their business quickly .


The Android banking Trojan rental business Rental of banking Trojans is not new .


It was an existing business model when computer-based banking malware was the only form of banking malware and has shifted to the Android equivalent a few years later .


The life span of Android banking malware is limited to either the will of its author ( s ) to support it or the arrest of those actors .


This malware-life-cycle has been observed to reoccur every few years , bringing new malware families into light .


Each time a rented malware reaches the end of its life it provides the opportunity for other actors a to take over the malware rental market-share .


As visible on following chart , the lifespan of many well-known rented Android bankers is usually no more than one or two years .


When the family ceases to exist a new one is already available to fill the void , proving that the demand for such malware is always present and that therefore Cerberus has a good chance to survive .


After the actor behind RedAlert 2 decided to quit the rental business , we observed a surge in Anubis samples in the wild .


After the Anubis actor was allegedly arrested and the source code was leaked there was also huge increase in the number of Anubis samples found in the wild , but the new actors using Anubis have no support or updates .


Due to this Cerberus will come in handy for actors that want to focus on performing fraud without having to develop and maintain a botnet and C2 infrastructure .


Analysis of evasion techniques Along with the standard payload and string obfuscation , Cerberus uses a rather interesting technique to prevent analysis of the Trojan .


Using the device accelerometer sensor it implements a simple pedometer that is used to measure movements of the victim .


The idea is simple - if the infected device belongs to a real person , sooner or later this person will move around , increasing the step counter .


The Trojan uses this counter to activate the bot - if aforementioned step counter hits the pre-configured threshold it considers running on the device to be safe .


This simple measure prevents the Trojan from running and being analyzed in dynamic analysis environments ( sandboxes ) and on the test devices of malware analysts .


The code responsible for this verification is shown in the following snippet : How it works When the malware is first started on the device it will begin by hiding its icon from the application drawer .


Then it will ask for the accessibility service privilege as visible in the following screenshot : After the user grants the requested privilege , Cerberus starts to abuse it by granting itself additional permissions , such as permissions needed to send messages and make calls , without requiring any user interaction .


It also disables Play Protect ( Google ’ s preinstalled antivirus solution ) to prevent its discovery and deletion in the future .


After conveniently granting itself additional privileges and securing its persistence on the device , Cerberus registers the infected device in the botnet and waits for commands from the C2 server while also being ready to perform overlay attacks .


The commands supported by the analyzed version of the Cerberus bot are listed below .


As can be seen , the possibilities offered by the bot are pretty common .


Command Description push Shows a push notification .


Clicking on thenotification will result in launching a specified app startApp Starts the specified application getInstallApps Gets the list of installedapplications on the infected device getContacts Gets the contact names and phone numbers from the addressbook on the infected device deleteApplication Triggers the deletion of the specified application forwardCall Enables call forwarding to the specified number sendSms Sends a text message with specified text from the infecteddevice to the specified phone number startInject Triggers the overlay attack against the specified application startUssd


Calls the specified USSD code openUrl Opens the specified URL in the WebView getSMS Gets all text messages from the infected device killMe Triggers the kill switch for the bot updateModule Updates the payload module Cerberus features Cerberus malware has the same capabilities as most other Android banking Trojans such as the use of overlay attacks , SMS control and contact list harvesting .


The Trojan can also leverage keylogging to broaden the attack scope .


Overall , Cerberus has a pretty common feature list and although the malware seems to have been written from scratch there does not seem to be any innovative functionality at this time .


For example , some of the more advanced banking Trojans now offer features such as a back-connect proxy , screen-streaming and even remote control .


Cerberus embeds the following set of features that allows itself to remain under the radar and successfully perform attacks : Overlaying : Dynamic ( Local injects obtained from C2 ) Keylogging SMS harvesting : SMS listing SMS harvesting : SMS forwarding Device info collection Contact list collection Application listing Location collection Overlaying : Targets list update SMS : Sending Calls : USSD request making Calls : Call forwarding Remote actions : App installing Remote actions : App starting Remote actions : App removal Remote actions : Showing arbitrary web pages Remote actions : Screen-locking


Notifications : Push notifications C2 Resilience : Auxiliary C2 list Self-protection : Hiding the App icon Self-protection : Preventing removal Self-protection : Emulation-detection Architecture : Modular Overlay attack Most Android banking Trojans use overlay attacks to trick the victim into providing their personal information ( such as but not limited to : credit card information , banking credentials , mail credentials ) and Cerberus is no exception .


In this particular case , the bot abuses the accessibility service privilege to obtain the package name of the foreground application and determine whether or not to show a phishing overlay window , as shown in the following code snippet : Targets Some examples of phishing overlays are shown below .


They exist in two types : the credentials stealers ( first 2 screenshots ) and the credit card grabbers ( last screenshot ) .


The only active target list observed in the wild is available in the appendix and contains a total of 30 unique targets .


It is interesting to observe that the actual target list contains : 7 French banking apps 7 U.S. banking apps 1 Japanese banking app 15 non-banking apps This uncommon target list might either be the result of specific customer demand , or due to some actors having partially reused an existing target list .


Conclusion Although not yet mature enough to provide the equivalent of a full-blown set of Android banking malware features ( such as RAT , RAT with ATS ( Automated Transaction Script ) , back-connect proxy , media streaming ) , or providing an exhaustive target list , Cerberus should not be taken lightly .


Due to the current absence of maintained and supported Android banking Malware-as-a-Service in the underground community , there is a certainly demand for a new service .


Cerberus is already capable to fulfill this demand .


In addition to the feature base it already possesses and the money that can be made from the rental , it could evolve to compete with the mightiest Android banking Trojans .


Next to the features , we expect the target list to be expanded to contain additional ( banking ) apps in the near future .


Knowledge of the threat landscape and implementation of the right detection tools remains crucial to be able to protect yourself from fraud ; Cerberus is yet a new Trojan active in the wild !


Appendix Samples Some of the latest Cerberus samples found in the wild : App name Package name SHA 256 hash Flash Player com.uxlgtsvfdc.zipvwntdy 728a6ea44aab94a2d0ebbccbf0c1b4a93fbd9efa8813c19a88d368d6a46b4f4f Flash Player com.ognbsfhszj.hqpquokjdp fe28aba6a942b6713d7142117afdf70f5e731c56eff8956ecdb40cdc28c7c329


Flash Player com.mwmnfwt.arhkrgajn ffa5ac3460998e7b9856fc136ebcd112196c3abf24816ccab1fbae11eae4954c Flash Player com.wogdjywtwq.oiofvpzpxyo 6ac7e7ed83b4b57cc4d28f14308d69d062d29a544bbde0856d5697b0fc50cde4 Flash Player com.hvdnaiujzwo.fovzeukzywfr


cfd77ddc5c1ebb8498c899a68ea75d2616c1c92a0e618113d7c9e5fcc650094b Flash Player com.gzhlubw.pmevdiexmn 3f2ed928789c200e21fd0c2095619a346f75d84f76f1e54a8b3153385850ea63 Target list The actual observed list of mobile apps targeted by Cerberus contains a total of 30 unique applications .


This list is expected to expand : Package name Application name com.android.vending Play Market com.boursorama.android.clients Boursorama Banque com.caisseepargne.android.mobilebanking Banque com.chase.sig.android Chase Mobile com.clairmail.fth Fifth Third Mobile Banking com.connectivityapps.hotmail Connect for Hotmail com.google.android.gm Gmail com.imo.android.imoim imo free video calls and chat com.infonow.bofa Bank of America


Mobile Banking com.IngDirectAndroid ING com.instagram.android Instagram com.konylabs.capitalone Capital One® Mobile com.mail.mobile.android.mail mail.com mail com.microsoft.office.outlook Microsoft Outlook com.snapchat.android Snapchat com.tencent.mm WeChat com.twitter.android Twitter com.ubercab Uber com.usaa.mobile.android.usaa USAA Mobile com.usbank.mobilebanking U.S. Bank - Inspired by customers com.viber.voip Viber com.wf.wellsfargomobile


Wells Fargo Mobile com.whatsapp WhatsApp com.yahoo.mobile.client.android.mail Yahoo Mail – Organized Email fr.banquepopulaire.cyberplus Banque Populaire fr.creditagricole.androidapp Ma Banque jp.co.rakuten_bank.rakutenbank 楽天銀行 -個人のお客様向けアプリ mobi.societegenerale.mobile.lappli L ’ Appli Société Générale net.bnpparibas.mescomptes Mes Comptes BNP Paribas org.telegram.messenger Telegram Triout - Spyware Framework


for Android with Extensive Surveillance Capabilities August 20 , 2018 No operating system is safe from malware , as cyber criminals will always want to steal , spy or tamper with your data .


The proliferation of Android devices – from smartphones to tablets and smart TVs – has opened up new possibilities for malware developers , as all these devices pack microphones , cameras and location-tracking hardware they can turn into the perfect spy tools .


Bitdefender researchers have identified a new Android spyware , dubbed Triout , which appears to act as a framework for building extensive surveillance capabilities into seemingly benign applications .


Found bundled with a repackaged app , the spyware ’ s surveillance capabilities involve hiding its presence on the device , recording phone calls , logging incoming text messages , recoding videos , taking pictures and collecting GPS coordinates , then broadcasting all of that to an attacker-controlled C & C ( command and control ) server .


It ’ s interesting that Triout , which is detected by Bitdefender ’ s machine learning algorithms , was first submitted from Russia , and most scans/reports came from Israel .


The sample ’ s first appearance seems to be May 15 , 2018 , when it was uploaded to VirusTotal , but it ’ s unclear how the tainted sample is disseminated .


Third-party marketplaces or some other attacker-controlled domains are likely used to host the sample .


A subsequent investigation revealed that the spyware has the following capabilities : Records every phone call ( literally the conversation as a media file ) , then sends it together with the caller id to the C & C ( incall3.php and outcall3.php ) Logs every incoming SMS message ( SMS body and SMS sender ) to C & C ( script3.php ) Has capability to hide self Can send all call logs ( “ content : //call_log/calls ” , info : callname , callnum , calldate , calltype , callduration


) to C & C ( calllog.php ) Whenever the user snaps a picture , either with the front or rear camera , it gets sent to the C & C ( uppc.php , fi npic.php orreqpic.php ) Can send GPS coordinates to C & C ( gps3.php ) The C & C server to which the application seems to be sending collected data appears to be operational , as of this writing , and running since May 2018 .


January 23 , 2017 SpyNote RAT posing as Netflix app As users have become more attached to their mobile devices , they want everything on those devices .


There ’ s an app for just about any facet of one ’ s personal and professional life , from booking travel and managing projects , to buying groceries and binge-watching the latest Netflix series .


The iOS and Android apps for Netflix are enormously popular , effectively turning a mobile device into a television with which users can stream full movies and TV programs anytime , anywhere .


But the apps , with their many millions of users , have captured the attention of the bad actors , too , who are exploiting the popularity of Netflix to spread malware .


Recently , the ThreatLabZ research team came across a fake Netflix app , which turned out to be a new variant of SpyNote RAT ( Remote Access Trojan ) .


SpyNote RAT is capable of performing a variety of alarming functions that includes : Activating the device ’ s microphone and listening to live conversations Executing commands on the device Copying files from the device to a Command & Control ( C & C ) center Recording screen captures Viewing contacts Reading SMS messages The screenshot below shows part of the sandbox ’ s report on the SpyNote RAT ’ s signature and detected functions : The fake Netflix app we are analyzing in this blog appears to be built using an updated version of SpyNote RAT builder ,


which was leaked last year .


Technical details Please note that our research is not about the legitimate Netflix app on Google Play .


The spyware in this analysis was portraying itself as the Netflix app .


Once installed , it displayed the icon found in the actual Netflix app on Google Play .


As soon as the user clicks the spyware ’ s icon for the first time , nothing seems to happen and the icon disappears from the home screen .


This is a common trick played by malware developers , making the user think the app may have been removed .


But , behind the scenes , the malware has not been removed ; instead it starts preparing its onslaught of attacks .


For contacting C & C , the spyware was found to be using free DNS services , as shown in the screenshot below : SpyNote RAT uses an unusual trick to make sure that it remains up and running and that the spying does not stop .


It does so using the Services , Broadcast Receivers , and Activities components of the Android platform .


Services can perform long-running operations in the background and does not need a user interface .


Broadcast Receivers are Android components that can register themselves for particular events .


Activities are key building blocks , central to an app ’ s navigation , for example .


The SpyNote RAT registers a service called AutoStartup and a broadcast receiver named BootComplete .


MainActivity registers BootComplete with a boot event , so that whenever the device is booted , BootComplete gets triggered .


BootComplete starts the AutoStartup service and the AutoStartup service makes sure that MainActivity is always running .


What follows are some of the features exhibited by SpyNote RAT .


Command execution Command execution can create havoc for victim if the malware developer decides to execute commands in the victim ’ s device .


Leveraging this feature , the malware developer can root the device using a range of vulnerabilities , well-known or zero-day .


The following screenshot shows the command execution functionality in action : The paramString parameter shown in the above screenshot can be any command received from C & C .


Screen capture and audio recording SpyNote RAT was able to take screen captures and , using the device ’ s microphone , listen to audio conversations .


This capability was confirmed when the Android permission , called android.permission.RECORD_AUDIO , was being requested along with code found in the app .


SpyNote RAT captured the device ’ s screen activities along with audio using the MediaProjectionCallback functionality ( available with Lollipop , the Android 5.0 release , and later ) and saved the output in a file named " video.mp4 '' as shown in the following screenshot SMS stealing SpyNote RAT was also observed stealing SMS messages from the affected devices , as shown in screenshot below : Stealing contacts The ability to steal contacts is a favorite feature for spyware developers , as the stolen contacts can be used to further spread the spyware


The following screenshot shows the contacts being stolen and written in a local array , which is then sent to C & C : Uninstalling apps Uninstalling apps is another function favored by developers of Android spyware and malware .


They tend to target any antivirus protections on the device and uninstall them , which increases the possibility of their malware persisting on the device .


Following screenshot shows this functionality in action : Other functions In addition to the functionalities we ’ ve described , the SpyNote RAT was exhibiting many other behaviors that make it more robust than most off-the-shelf malware .


SpyNote RAT was designed to function only over Wi-Fi , which is the preferable mode for Android malware to send files to C & C .


The screenshot below shows SpyNote RAT scanning for Wi-Fi and enabling it if a known channel is found : Additional features - SpyNote RAT could click photos using the device 's camera , based on commands from C & C .


- There were two interesting sub-classes found inside Main Activity : Receiver and Sender .


Receiver was involved in receiving commands from the Server and the main functionality of Sender was to send all the data collected to the C & C over Wi-Fi .


- SpyNote RAT was also collecting the device ’ s location to identify the exact location of the victim .


SpyNote RAT builder The SpyNote Remote Access Trojan ( RAT ) builder is gaining popularity in the hacking community , so we decided to study its pervasiveness .


What we found were several other fake apps developed using the SpyNote builder , which should come as a warning to Android users .


Some of the targeted apps were : Whatsapp YouTube Video Downloader Google Update Instagram Hack Wifi AirDroid WifiHacker Facebook Photoshop SkyTV Hotstar Trump Dash PokemonGo With many more to come .


Furthermore , we found that in just the first two weeks of 2017 , there have been more than 120 such spyware variants already built using the same SpyNote Trojan builder as SpyNote RAT and roaming in the wild .


A complete list of sample hashes is available here .


Conclusion The days when one needed in-depth coding knowledge to develop malware are long gone .


Nowadays , script kiddies can build a piece of malware that can create real havoc .


Moreover , there are many toolkits like the SpyNote Trojan builder that enable users to build malware with ease and few clicks .


In particular , avoid side-loading apps from third-party app stores and avoid the temptation to play games that are not yet available on Android .


Yes , we are talking about SuperMarioRun , which was recently launched by Nintendo only for iOS users .


Recent blogs by the Zscaler research team explain how some variants of Android malware are exploiting the popularity of this game and tricking Android users into downloading a fake version .


( Have a look here and here .


) You should also avoid the temptation to play games from sources other than legitimate app stores ; such games are not safe and may bring harm to your reputation and your bank account .


FakeSpy Masquerades as Postal Service Apps Around the World July 1 , 2020 KEY FINDINGS The Cybereason Nocturnus team is investigating a new campaign involving FakeSpy , an Android mobile malware that emerged around October 2017 .


FakeSpy is an information stealer used to steal SMS messages , send SMS messages , steal financial data , read account information and contact lists , steal application data , and do much more .


FakeSpy first targeted South Korean and Japanese speakers .


However , it has begun to target users all around the world , especially users in countries like China , Taiwan , France , Switzerland , Germany , United Kingdom , United States , and others .


FakeSpy masquerades as legitimate postal service apps and transportation services in order to gain the users ' trust .


Once installed , the application requests permissions so that it may control SMS messages and steal sensitive data on the device , as well as proliferate to other devices in the target device ’ s contact list .


Cybereason 's investigation shows that the threat actor behind the FakeSpy campaign is a Chinese-speaking group dubbed " Roaming Mantis '' , a group that has led similar campaigns .


FakeSpy has been in the wild since 2017 ; this latest campaign indicates that it has become more powerful .


Code improvements , new capabilities , anti-emulation techniques , and new , global targets all suggest that this malware is well-maintained by its authors and continues to evolve .


TABLE OF CONTENTS Key Findings Introduction Threat Analysis Fakespy Code Analysis Dynamic Library Loading Stealing Sensitive Information Anti-Emulator Techniques Under Active Development Who is Behind Fakespy 's Smishing Campaigns ?


Conclusions Cybereason Mobile Detects and Stops FakeSpy Indicators of Compromise INTRODUCTION For the past several weeks , Cybereason has been investigating a new version of Android malware dubbed FakeSpy , which was first identified in October 2017 and reported again in October 2018 .


A new campaign is up and running using newly improved , significantly more powerful malware as compared to previous versions .


FakeSpy is under active development and is evolving rapidly ; new versions are released every week with additional evasion techniques and capabilities .


Our analysis shows that the threat actor behind the FakeSpy malware is a Chinese-speaking group , commonly referred to as " Roaming Mantis '' , a group that is known to have launched similar campaigns in the past .


FakeSpy is an information stealer that exfiltrates and sends SMS messages , steals financial and application data , reads account information and contact lists , and more .


The malware uses smishing , or SMS phishing , to infiltrate target devices , which is a technique that relies on social engineering .


The attackers send fake text messages to lure the victims to click on a malicious link .


The link directs them to a malicious web page , which prompts them to download an Android application package ( APK ) .


This most recent FakeSpy campaign appears to target users of postal services around the world .


New versions of FakeSpy masquerade as government post office apps and transportation services apps .


Our analysis indicates that the threat actors are no longer limiting their campaigns to East Asian countries , but are targeting additional countries around the world .


THREAT ANALYSIS Infection Vector : Smishing Your Device Thus far , FakeSpy campaigns are characterized by SMS phishing ( a.k.a .


smishing ) .


These SMS messages masquerade as a message from the local post office and link to the FakeSpy download .


In a previous campaign reported by JPCERT , mobile users were alerted by phishy messages containing “ delivery updates ” purportedly from Sagawa Express .


Fake SMS message luring users to enter a fake website , which contains the malicious APK ( JPCERT report ) .


Clicking the SMS link brings the user to a fake website that prompts them to download and install the FakeSpy APK , which is masquerading as a local postal service app .


Targeting Postal and Transportation Services Companies One of the most significant findings is that new versions of FakeSpy target not only Korean and Japanese speakers , but also almost any postal service company around the world .


Example of more recent FakeSpy campaigns targeting France .


New FakeSpy campaign applications leveraging fake postal services apps .


All recent FakeSpy versions contain the same code with minor changes .


The FakeSpy malware has been found to masquerade as any of the following companies : United States Postal Service - An independent agency of the executive branch of the United States federal government .


USPS is the most well-known branch of the US government and provides a publicly funded postal service .


Royal Mail - British postal service and courier company .


For most of its history it operated as a government department or public corporation .


Deutsche Post - Deutsche Post DHL Group , a German multinational package delivery and supply chain management company headquartered in Bonn .


La Poste - La Poste is a public limited postal service company in France .


Japan Post - A private Japanese post , logistics and courier headquartered in Tokyo .


Yamato Transport - One of Japan 's largest door-to-door delivery service companies , also in Tokyo .


Chunghwa Post - The government-owned corporation Chunghwa is the official postal service of Taiwan .


Swiss Post - The national postal service of Switzerland , a fully state-owned limited company ( AG ) regulated by public law .


The fake applications are built using WebView , a popular extension of Android ’ s View class that lets the developer show a webpage .


FakeSpy uses this view to redirect users to the original post office carrier webpage on launch of the application , continuing the deception .


This allows the application to appear legitimate , especially given these applications icons and user interface .


New FakeSpy applications masquerading as post office apps .


FAKESPY CODE ANALYSIS Once the user clicks on the malicious link from the SMS message , the app asks them to approve installation from unknown resources .


This configuration can be toggled on by going to ‘ Settings ’ - > ‘ Security ’ - > ‘ Unknown Resources ’ .


PackageInstaller shows the app ’ s permission access and asks for the user 's approval , which then installs the application .


This analysis dissects FakeSpy ’ s Chunghwa Post app version , which emerged in April 2020 .


During the installation , the malware asks for the following permissions : READ_PHONE_STATE - Allows read-only access to the phone state , including the current cellular network information , the status of any ongoing calls , and a list of any PhoneAccounts registered on the device .


READ_SMS - Allows the application to read text messages .


RECEIVE_SMS - Allows the application to receive SMS messages .


WRITE_SMS - Allows the application to write to SMS messages stored on the device or SIM card , including y deleting messages .


SEND_SMS - Allows the application to send SMS messages .


INTERNET - Allows the application to open network sockets .


WRITE_EXTERNAL_STORAGE - Allows the application to write to external storage .


READ_EXTERNAL_STORAGE - Allows the application to read from external storage .


RECEIVE_BOOT_COMPLETED - Allows the application to receive a broadcast after the system finishes booting .


GET_TASKS - Allows the application to get information about current or recently run tasks .


( deprecated in API level 21 ) SYSTEM_ALERT_WINDOW - Allows the application to create windows shown on top of all other apps .


WAKE_LOCK - Allows the application to use PowerManager WakeLocks to keep the processor from sleeping or the screen from dimming .


ACCESS_NETWORK_STATE - Allows the application to access information about networks .


REQUEST_IGNORE_BATTERY_OPTIMIZATIONS - Whitelists the application to allow it to ignore battery optimizations .


READ_CONTACTS - Allows the application to read the user 's contacts data .


FakeSpy package permissions .


On opening the app , two pop-up messages appear on screen : Change SMS App : This sets permissions to intercept every SMS received on the device and send a copy of these messages to the C2 server .


Ignore Battery Optimization : This sets permissions to continue to operate at full capacity while the phone 's screen is turned off and the phone locked .


These requests rely on the end user accepting the permission changes and points to the importance of healthy skepticism when giving applications permissions .


FakeSpy Chunghwa Post version installation process and application UI .


DYNAMIC LIBRARY LOADING Once the application has finished the installation process , the malware starts its real malicious activity .


The malicious application da.hao.pao.bin ( Chunghwa Post ) loads a library file libmsy.so used to execute the packed mycode.jar file .


The JAR file is the decrypted version of the file tong.luo , which is located in the assets folder .


Decompiled APK resources .


By comparing the sizes of the encrypted asset file tong.luo vs the decrypted JAR file mycode.jar , it is interesting to note that it is the same file ( almost the same size ) .


Comparing encrypted vs decrypted asset file .


After libmsy.so decrypts the asset file tong.luo , it loads mycode.jar dynamically into FakeSpy ’ s process , as is shown from the output of the “ adb logcat ” command .


Logcat logs show FakeSpy uses libmsy.so to execute the malicious packed mycode.jar file .


By analyzing running processes on the infected device , it shows that the malware creates a child process of itself to perform the multi-process ptrace anti-debugging technique .


FakeSpy uses an anti-debugging technique by creating another child process of itself .


By performing a deep analysis of the malware , we were able to extract the unpacked JAR file mycode.jar and reveal some very interesting code .


STEALING SENSITIVE INFORMATION FakeSpy has multiple built in information stealing capabilities .


The first function is used for contact information stealing : the function upCon steals all contacts in the contact list and their information .


Then , it sends it to the C2 server using the URL that ends with /servlet/ContactUpload .


The stolen data fields are : Mobile - The infected device phone number and contact ’ s phone number Contacts - A headline used for the attacker to distinguish between the type of stolen information he gets Name - Contact ’ s full name ( Display name ) upCon ( upload contact ) function used for stealing contact list information .


For testing purposes we inserted a fake contacts list to our Android Emulator and observed resultant behavior .


Exfiltrated contact list data sent to the C2 server .


The second stealing function is the onStartCommand , which steals infected device data and additional information .


The stolen data is sent to the C2 server using the URL ending with /servlet/xx .


The stolen data fields are : Mobile - The infected device phone number Machine - The device model ( in our example : Google Pixel 2 ) Sversion - The OS version Bank - Checks if there are any banking-related or cryptocurrency trading apps Provider - The telecommunication provider ( IMSI value in device settings ) npki - Checks if the folder named NPKI ( National Public Key Infrastructure ) might contain authentication certificates related to financial transactions onStartCommand function for stealing device information and additional sensitive data .


Exfiltrated device information and additional sensitive data sent to the C2 server .


FakeSpy asks to be the default SMS app because it uses the function onReceive to intercept incoming SMS messages .


It saves the messages ’ metadata and content , filters the information by fields , and sends them to the C2 server using the URL /servlet/SendMassage2 .


The fields it collects are : Mobile - The phone number which sent the SMS Content - The message body Sender - The contact name who sent the message Time - The time the message was received onReceive function used to intercept incoming SMS messages .


The malware uses the function sendAll to send messages that spread the malware to other devices .


It sends a smishing message to the entire contact list of the infected device along with the malicious link to the FakeSpy installation page .


sendAll function used to spread malicious messages to the contact list .


Another interesting feature in FakeSpy ’ s code is the collection of the device 's IMEI ( International Mobile Station Equipment Identity ) number and all installed applications using the function upAppinfos .


It sends all of this data to the C2 server using the URL ending with /servlet/AppInfos .


upAppinfos function used for obtaining the device IMEI and all of its installed applications .


FakeSpy is able to check the network connectivity status by using the function isNetworkAvailable .


What makes this function more suspicious is the two strings written in Chinese characters : ===状态=== ( ===Status=== ) - Checks whether the device is connected to a network ===类型=== ( ===Type=== ) - Checks whether the device sees available nearby Wifi networks isNetworkAvailable function used for monitoring network connectivity status .


ANTI-EMULATOR TECHNIQUES FakeSpy appears to use multiple techniques to evade detection via the emulator .


It shows that the malware can detect whether it ’ s running in an emulated environment or a real mobile device , and can change its code pattern accordingly .


The first example of this is in the onStart function , where the malware looks for the string “ Emulator ” and a x86 processor model .


Anti-emulator code .


In order to simulate this technique , we took two videos side by side of how FakeSpy ( the Royal Mail sample ) behaves differently on a physical device versus an emulator .


FakeSpy behavior on physical device vs emulator ( anti-emulator ) .


This simulation shows that FakeSpy behaves differently on a physical device versus an emulator .


When executed the second time by clicking on the app on the physical device , FakeSpy redirects to the app settings .


In contrast , on the emulator , a toast message is displayed that shows “ Install completed ” , at which point FakeSpy removes its shortcut from the device 's homescreen .


Another example of FakeSpy ’ s anti-emulation techniques is how it uses the getMachine function , which uses the TelephonyManager class to check for the deviceID , phone number , IMEI , and IMSI .


Some emulators build their phone number out of the default number created in the emulator software and the port number : 5554. getMachine function using anti-emulator technique .


UNDER ACTIVE DEVELOPMENT An analysis of new FakeSpy samples to old ones showed code discrepancies and new features .


These artifacts indicate that FakeSpy 's campaign is still live and under development .


The newer version of FakeSpy uses new URL addresses for malicious communication with FakeSpy .


The function main uses a DES encryption algorithm to encode these addresses .