Close

Suche

BadRabbit Orion Malware Report

This malware report aims at giving a technical analysis of the BadRabbit ransomware using the Orion Malware analysis platform. It gives a technical interpretation of the Orion Malware report and focuses on discussing the similarities and distinctions between BadRabbit and NotPetya’s design and behaviour.

What’s the Difference Between Bad Rabbit and NotPetya?

BadRabbit is made of a first stage payload, which ships the BadRabbit DLL and third-party utilities, making a substantial difference with the NotPetya infection process which was shipped through MeDoc updates (An Ukrainian accounting software). Moreover, BadRabbit differs from NotPetya in another point:

However, the analysis of the malicious DLL reveals relevant similarities between the two malware families, like the Master Boot Record (MBR) modification, the private network spreading and the use of the WebDAV protocol. 

A Technical Analysis

An Overview

The overall analysis of BadRabbit provided by Orion Malware highlights the malicious intent of the application. Indeed, many indicators in both static and dynamic analysis demonstrate ransomware abilities like file encryption or MBR modification. The analysis also reports network communications related the BadRabbit’s propagation capacity to spread across the victim’s private network.

This document will go deeper in the analysis of the different modules reports used by the Airbus CyberSecurity Malware Analysis platform and then reveal BadRabbit’s mechanisms.

BadRabbit ransomware is a Windows Executable. It embeds a third-party software called “DiskCryptor” and a packed DLL which contains most of the ransomware functionalities and another malicious application that interacts with the DiskCryptor’s driver.

The following Figure shows the payload tree automatically build by Orion Malware. It shows the dropper at the root level, the application responsible of the interaction with DiskCryptor, dispci.exe and also the DiskCryptor driver (cscc.dat).

Graphic1
Illustration 1: BadRabbit Payload tree

The two following figures show Orion Malware overview of the static and dynamic analysis. They offer high-level reading of the program’s design and behaviour.

Static analysis is a technique used to understand sample’s functionalities without executing it. Orion Malware looks for samples properties statically and can raise warnings. However it can be time consuming and can be made harder by many obfuscation techniques (packing, dead code…).

The Import Table (IAT) is a list of Windows API referenced by the application and that may be used during its execution. The Static analysis overview Figure below shows warnings raised about some presupposed features deduced after the automated malware’s imports analysis. Functions declared by the application are used to perform various actions like file manipulations, network communications, crypto operations… Imports analysis of a program can gives an analyst some assumptions on the sample functionalities. Complete static analysis report interpretation will be performed in section “Static Analysis”.

Graphic2

In the overview, Orion Malware raised a warning because it spots some functions like:

GetProcAddress/LoadLibrary, used to dynamically resolve and import Windows API Functions. This technique is commonly used by malware authors in order to hide imports from the import table.

Dynamic analysis consists in the execution of the sample inside a controlled environment, a virtual machine. This virtual machine is instrumented and monitored in order to expose the application’s behaviour. This method can give the analyst a quick and automatic response about the nature of the submitted file. However dynamic analysis can be fooled by some “Anti-VM” tricks. Indeed, a malware can try to detect if it is executed inside a virtual machine and hence stop or perform a fake execution and thus lure the analyst. Fortunately, a major part of the Orion Malware development is to make the sandbox robust to anti-VM techniques. The Figure bellow shows the dynamic analysis overview of BadRabbit, it spotlights its ransomware capabilities, its persistence mechanisms, and the fact that the malware loads a Kernel driver, among other things. Detailed dynamic analysis report analysis is performed in the “Dynamic Analysis” section.

Graphic3
Illustration 2: BadRabbit Dynamic Report Overview (Dropper / DLL)

A Static Analysis

Dropper Static Analysis

A quick review of static analysis performed by the platform shows that BadRabbit tries to fool victims by impersonating an Adobe Flash update installer. Malware authors built their executable with exactly the same information than a legit Adobe Flash installer.

Graphic4
 Illustration 3: Version Information

BADRABBIT DLL STATIC ANALYSIS

OVERVIEW
BadRabbit DLL’s static analysis provides more information than the dropper’s. Orion Malware shows that the DLL is able to verify whether it is being debugged, it can be an anti-analysis technique used to prevent an analyst to run the application under a debugger. It can also perform communication with a device driver. All these elements must be investigated by the analyst.

Graphic5
Illustration 4:BadRabbit DLL Static Report Overview

STRINGS ANALYSIS

Orion Malware extracts strings embedded inside the malicious binary and shows those corresponding to a possible Indicator of compromise (IOC).

Graphic6
Illustration 5: BadRabbit DLL Suspicious Strings

A quick look at strings inside the DLL exposes and email address service[at]caforssztxqzf2nm.onion. Orion Malware change @ in at to prevent automatic link creation. The .onion part of the address indicates that it can be a domain of the Tor network, the popular communication anonymization tool. Further investigations (not in the scope of this document) revealed that it is the domain used by the attackers to ask victims for the ransom payment.

VERSION INFORMATION

The Figure below shows version information of the BadRabbit DLL. Malware authors intentionally refer to the DiskCryptor open source utility in the “LocalCopyright” field. They also claim that the application product name is “GrayWorm”, the file name is “dispci.exe” and as file description “Microsoft Display Class Installer”. An analyst with some prior knowledge of the BadRabbit ransomware can spot the ransomware with the OriginalFilename field and also understand that the version information contains some weird information, like the product name or the fact that the copyright refers to the DiskCryptor utility, a disk partition encryption tool, but the file description refers to a Microsoft Display Class Installer.

Graphic7
Illustration 6: BadRabbit DLL Version Information

RESOURCES ANALYSIS

The next figure shows the sections of the BadRabbit DLL. Resources analysis is an important step for an analyst because it can reveal additional malware, configuration file or any other important information.

Graphic8
Illustration 7: BadRabbit DLL Resources

Interesting thing to note from the resources analysis is the presence of a x86 Boot Sector file at the address 319832. This file may be used to replace the original computer’s MBR.

IMPORTS ANALYSIS

DLL imports analysis shows that BadRabbit is able to perform:

GetTickCount, IsDebuggerPresent

DYNAMIC ANALYSIS

This section details BadRabbit behaviour in the controlled environment of the Orion Malware sandbox. The malware’s actions are analysed sequentially from the application initiation phase to the machine reboot initiated by the malware.

FIRST STEPS: UNPACKING AND MAIN PAYLOAD EXECUTION.

Once the fake Adobe Updater application starts, it creates the “inpub.dat” file, namely the BadRabbit DLL, in the C:\Windows folder.

Graphic9
Illustration 8: BadRabbit Main DLL Information

Then the dropper calls infpub.dat’s DllMain() function with the argument ‘15’. Note that since a DLL cannot be executed directly, the launched application is the (legitimate) Windows loader rundll32.exe that will load and execute BadRabbit’s DLL.

Graphic10
Illustration 9: BadRabbit DLL execution

SECOND STEP: SECONDARY PAYLOADS AND THIRD PARTIES EXTRACTION

Right after its creation, the BadRabbit DLL process creates a file named “cscc.dat.”

Graphic11
Figure 1 cscc.dat dcrypt.sys information

Investigations revealed that this file corresponds to the DiskCryptor’s dcrypt.sys kernel module used to perform the encryption of the victim’s disks partitions.
Then BadRabbit creates the following file: C:\Windows\dispci.exe.

Graphic12
Figure 2 dispci.exe information

Dispci.exe is the part of BadRabbit ransomware that performs victim’s disk encryption after the computer reboots.

THIRD STEP: PERSISTENCE, DRIVER INSTALLATION, AND REBOOT SCHEDULING

To ensure that all the persistence mechanisms of the BadRabbit ransomware come into effect, the malware’s authors have opted for the Windows Task Scheduler, a Windows application commonly used in malware’s persistence mechanism.

Two scheduled tasks are created throughout the infection:

Graphic13

“rhaegal”

SYSTEM

dispci.exe

-id 3893254752

Graphic14
Illustration 13: Drogon scheduled task

The second one named “drogon”, also executed under the SYSTEM privilege level, will be executed only one time (/SC once) in order to force the victim’s computer restart and then conducts the victim to see the ransom note. The same technique was used by the NotPetya malware in order to force the computer’s restart.

Finally, the DiskCryptor kernel driver is installed and is controlled by dispci.exe with the aim of encrypting the user’s disks partitions.

The Figure below displays information related to the installed driver.

Graphic15
Illustration 14: BadRabbit DiskCryptor driver installation information

An analyst can confirm from the previous information warnings raises by the Dynamic Overview.

“Client Side Caching DDriver” (DisplayName

cscc.dat/

ImagePath

Type

Start

FOURTH STEP: FILES ENCRYPTION AND PROPAGATION

BadRabbit encrypts the user’s files and creates a scheduled task to shut down the computer.
During the analysis, the BadRabbit DLL, as NotPetya, performs a network discovery by establishing a connection with all possible IP addresses in the victim’s subnet. Once the malware finds a new victim, it tries to spread itself by copying cscc.dat and infpub.dat on network shares with the WebDAV protocol. It also tries to connect to Server Message Block (SMB) servers and uses stolen or some hard-coded credentials.

Graphic15
Figure 3 File Manipulation with WebDAV
Graphic16
Figure 4 SMB Network Scan

The previous figure shows successive connections attempts to various internal network addresses on the SMB port. 

Conclusion

Orion Malware analysis capabilities have helped security researchers flag BadRabbit as an IT threat for a company. Thanks to a complementary analysis, static and dynamic, it revealed some BadRabbit’s features.
Orion Malware does not only raise alerts on an infection at its early stage but also enables security analysts to easily interpret and collect many indicators of compromise (IOC), such as network artefacts, created files or registry activity.

About Orion Malware Analysis


Developed by our experts here at Airbus CyberSecurity to quickly analyse any type of file, provide an automated and complete analysis of each file and help decision making at all levels, if you would like to learn more about how you can use Orion Malware as a day-to-day tool, please get in touch.

Zurück Zu Nachrichten Und Blogs
Zurück nach oben