Tuesday, July 16, 2019

A New Wave Emerges

Lately, during our daily adware and spyware analysis routine, people from the FortiGuard Labs team experienced an Android sample that didn't look familiar.

Analysis


In a start looking, it appeared obvious the APK was heavily obfuscated, and it was possibly packed with a couple technique we'd not seen before. This isn't to state it uses an very complicated technique. It appears to mostly depend on generating a number of random functions to cover the actual functionalities from the sample.

During our initial examination, we spotted some interesting code among the rubbish functions being generated, therefore we made the decision to operate the sample through FortiGuard’s in-house APK sandbox analysis system to collect more details from the both static and dynamic analysis.

Sandbox Results


The outcomes acquired in the sandbox helped us comprehending the sample. To begin with, within the Dex operation section, in which a dynamically loaded file ought to be logged, there's two records. The very first is associated with the loading from the primary application itself, an additional describes personal files easily known as “payload.apk” - meaning the sample will probably install yet another application during execution. However, the majority of the interesting calls, like information exfiltration and connection initiations, are performed in the code within the first application.



With this particular information in hands, and understanding recent adware and spyware families, we'd a hunch in regards to what adware and spyware this may be. However, firstly: we wanted to eliminate its very annoying obfuscation.

Obfuscation Analysis


The code is made of very untidy because it is mostly made up of at random generated garbage. Fortunately, web site is extremely identifiable, and the majority of the courses are useless, getting no real functionality whatsoever. However, when first analyzing this application, the sheer a few different classes can appear discouraging. Fortunately, web site of these junk-classes is extremely foreseeable.

Additionally, there's a obvious distinction between the classes which are useless and those which contain used code. Easily enough, all the interesting classes maintain their original name. However, to complicate things further, it appears as though every legitimate function or package is supported by 7 functions or packages performing useless calculations.

The majority of the strings within the code originate from using functions applying a XOR understanding of byte arrays - an easy but relatively effective solution. Every string matches a particular function that accepts no arguments and returns a `String` object.

Within the screenshots utilized in case study section below, what's proven may be the de-obfuscated form of the code. We won't feel the process regarding how to get that within this report, since it is boring and easy. It really necessitates the removal of many unnecessary functions and also the execution from the ones yielding the needed strings.

At this time you want to provide a big shout-to Max 'Libra' Kersten and the AndroidProjectCreator to make this de-obfuscation process less painful than we anticipated. If you haven't learned about this project, go and take a look.

Adware and spyware Analysis


As identified within the title of the blogpost, this obfuscated sample is one of the BianLian adware and spyware family, discussed the very first time by ThreatFabric in 2018.

BianLIan began like a dropper for other adware and spyware, but developers rapidly started to apply their very own malicious code that mainly targets Turkish banking applications.

Once they are acquired, it initiates all its modules. When compared with its 2018 version, the authors behind this update have added newer and more effective functionalities. Additionally to extensively mistreating Ease of access services, it offers the next modules. Their list include modules in the old and wave of BianLian in addition to individuals put in this latest version:

  • text: Module accustomed to send, receive, and log SMS messages
  • ussd: Module accustomed to run USSD codes making calls
  • injects: Module accustomed to run overlay attacks, totally on banking applications
  • locker: Module accustomed to lock the screen, rendering the unit unusable for any user


Additionally to those modules, this BianLian sample incorporated even the following two modules that we'll describe in greater detail below:

  • screencast
  • socks5

No comments:

Post a Comment