Thursday 21 July 2016

Monday 18 July 2016

, , , , ,

Pokemon GO evolves in Malware GO - Part 1






















As reported from different fonts, Pokemon Go is a virtual reality game and it is also the first game developed by Nintendo for smartphone Android and iOS.

Researchers discovered an infected Android version of the mobile game Pokemon GO. The installation file (APK) was modified to include a malicious remote access tool (RAT) called DroidJack, which would give an attacker full control over a victim’s phone.The game was first released in Australia and New Zealand on July 4th and on July 6th in the US. 

The game had not been officially released globally at the same time, many gamers wishing to access the game before it was released in their country, attempted to download a copy of the game outside of legitimate channels.


PART 1 - STATIC ANALYSIS


In the first part of this article I want to do a deep dive analysis of the evil APK and compare the differences between the real and the infected App.

Who created the evil App retrieved a game's copy, inserted inside a RAT tool and spread the APK in different third part market. The attacker took advantages of frenzy of the rest of the world to play the game before to be official released in the countries.


HERE WE GOOOOOOO!!!!


First of all I think it is important to analyze the differences between PERMISSIONs included within the Manifest file.

























In the red square is highlighted a part of permissions added into the evil APK.

The user, accepting these permissions give to the attacker the full access of his SMS, contacts list, camera, microphone, Internal and external (SD card) memory, etc.

Another evidence is reported in the image below. In the green square is present the safe part of the APK, in the red square is reported the padding code, where different droidjack server services are invoked to be enabled.
In the same part is possible to read the declaration of two activities, CamSnapDJ and VideoSnapDJ
Two receivers are also declared:
  • Connector to run on boot completed
  • CallListener to read phone state
























Inspecting content of both APK files, stand out that three different packages were added by the attacker. 


Droidjack is also known as SandroRat, below is reported the evidence:


The attacker used Java Crypto library to encrypt communications with AES (Advanced Encryption Standard) algorithm.

Source: https://docs.oracle.com/javase/7/docs/api/javax/crypto/Cipher.html

I was able to decode the Key from the byte array


Below is reported the URL contacted and the port used to communicate with the C&Cs.



This malware identifies the device and creates a Database to store these information. Then everything is sent to the website http://droidjack(dot)net/storeReport(dot)php.
































In the class bs the attacker verifies if the device is rooted by checking into the fonder /system/app/ the existence of the APK file Superuser.apk.

If the smartphone is rooted, this malware will have device full control.



The image below reports how this malware monitors and stores information about SMS incoming, outgoing, and in drafted.



In the last picture I reported how the Whatsapp database is read and stolen.




Finally, this report evidences how third part market that give you the opportunity to download APK for free, could spread malicious App. To protect yourself from possible infections, download apps from official app store and not from third-party site.


There's no such thing as a free lunch!!


IOC:

SHA256: 15db22fd7d961f4d4bd96052024d353b3ff4bd135835d2644d94d74c925af3c4
MD5: d350cc8222792097317608ea95b283a8
Domain: 
  • http://pokemon.no-ip.org (IP address: 88.223.178.130)
  • http://droidjack.net/storeReport.php (IP: 162.251.80.24)


Dynamic analysis is coming soon...


Thursday 7 July 2016

, , , ,

JS Dropper Galaxy

The wonderful ways to obfuscate JavaScript Dropper




Malware Analysis and Code Reverse Engineering is one of my passion in security field.

Today I'd like to show two wonderful ways to offuscate a JavaScript file in order to get complicated code analysis.

I analyzed the same phishing campaign (based on e-mail's Object) that spreads two different JavaScript dropper. 

As usual the author try to lure the user using double file extensions. 


The first is the following:

This file is well obfuscated and only a dynamic analysis help you to understand which actions it will perform during its execution.

The second is the following:

JavaScript Obfuscated Code - Part  1
JavaScript Obfuscated Code - Part 2
This JavaScript give me the evidence that who create it is not a very expert in code development and obfuscating field.

The trick used to obfuscate this file is to create a lot of functions that have an array filled with random number and only one position with text or one char, the function will return when invoked a specific position that is the only char present into the array. (Look Part 1)

The second part shows as who created this file, invoked more than one function within specified array position in order to rebuild URL and other objects ("Scripting.FileSystemObject", "ADODB.Stream", "MSXML2.XMLHTTP") used for evil purpose.

Below I am reporting two images that show the JavaScript code de-obfuscated. Reading it you can see which Objects will invoked in your OS when the JS file will be executed, which URL will be contacted and in which folder the evil files will be stored in your computer. 

No dynamic analysis is necessary to understand which actions this JavaScript will be performed and which URL will be requested.

JavaScript De-obfuscated Code - Part 1
JavaScript De-obfuscated Code - Part 2

 The same Campaign, two different file...?!?!