标题 简介 类型 公开时间
关联规则 关联知识 关联工具 关联文档 关联抓包
参考1(官网)
参考2
参考3
详情
[SAFE-ID: JIWO-2025-1437]   作者: ecawen 发表于: [2018-04-08]

本文共 [939] 位读者顶过

Technical Malware Analysis [出自:jiwo.org]

The file with the following properties was used to conduct this analysis:

MD5 15361551cb2f705f80e95cea6a2a7c04
SHA1 a388e464edeb8230adc955ed6a78540ed1433078
SHA256 73222ff531ced249bf31f165777696bb20c42d2148938392335f97f5d937182a
Compile Time 2018-03-17 16:36:18 UTC
PDB String D:\Work\_Rarog\Release\Rarog.pdb

 

When Rarog is initially executed, the malware will look for the existence of the following file:

  • C:\ProgramData\MicrosoftCorporation\Windows\System32\Isass.exe

In the event this file is missing on the system, Rarog will enter its installation routine, which is outlined below.

 

Installation Routine

The installation routine begins by creating the following hidden directory path:

  • C:\ProgramData\MicrosoftCorporation\Windows\System32\

It then copies itself to the directory above with a filename of ‘Isass.exe’. This newly copied file is then executed in a new process. After this takes place, the malware makes a HTTP POST request as follows:

The response of the above request is simply base64-encoded and decodes to ‘success’. The response is checked, and if the response of ‘success’ is received, the malware proceeds.

The malware makes the following request to determine if the C2 wishes the malware to spawn a fake error message box:

The base64 response above decodes to the following:

“1;1;System Error;The program can’t start because MSVCP110.dll is missing from your computer. Try reinstalling the program to fix this problem.”

The response is split by ‘;’. The first parameter is hardcoded, while the second is used to specify the type of message box to display. The following options are provided:

Parameter MessageBox Option
0 No error message displayed.
1 A stop-sign icon appears in the message box.
2 A question-mark icon appears in the message box.
3 An exclamation-point icon appears in the message box.
4 An icon consisting of a lowercase letter i in a circle appears in the message box.

The third parameter specifies the title of the message box, while the last parameter represents the message. Using the example previously, we are presented with the following message:

rarog_10

Figure 9 Fake error message box displayed by Rarog

Finally, Rarog will execute the following command, which will kill the current malware instance, and deleting it from disk.

 

Post-Installation Routine

After the installation routine completes and a new instance of Isass.exe is spawned, this new instance of Rarog will check for the existence of the following file:

  • C:\ProgramData\{4FCEED6C-B7D9-405B-A844-C3DBF418BF87}\driver.dat

If this file does not exist, Rarog will create the necessary hidden directory structure, and make a series of HTTP POST requests. The first request will be to ‘/2.0/method/checkConnection’ to ensure the remote C2 server is alive. The second request is to the following:

The response provided by the C2 server is the stored identifier of the victim within the C2 database. This number is stored in the ‘driver.dat’ file.

The following registry key is created to ensure Rarog persists across reboots:

The following hidden directory is created, and the following three files are written to this location:

C:\ProgramData\WindowsAppCertification\WindowHelperStorageHostSystemThread.ps1

C:\ProgramData\WindowsAppCertification\cert.cmd

C:\ProgramData\WindowsAppCertification\checker.vbs

The contents of WindowHelperStorageHostSystemThread.ps1 is as follows:

 

The contents of cert.cmd is as follows:

The contents of checker.vbs is as follows:

The following command is executed to create a Scheduled Task to run the checker.vbs script periodically:

The following command is executed to create a Scheduled Task to run Isass.exe periodically:

Additionally, the following command is executed to generate a shortcut link in the victim’s startup folder:

These various registry modifications, file modifications, and commands executed provides multiple ways for Rarog to persist on the system both across reboots, as well as in instances where the malware dies or is forcibly closed.

Rarog then makes the following POST request to ensure the ID exists on the remote C2 server:

Again, Rarog looks for a response of ‘success’. Rarog continues to make the following POST request:

The decoded response by the C2 server is ‘2;1;1;1;2;’. This data is split via ‘;’ and the values are used to indicate whether certain Rarog features are enabled or not. The value of ‘1’ represents ‘On’, while anything else represents ‘Off’.

Position Name Description
0 USB Devices Searches the machine for removable drives. Copies Rarog to the removable drive with the name of ‘autorun.exe’. Also creates an ‘autorun.inf’ file in the same directory, which will execute ‘autorun.exe’ when loaded.
1 Helpers Creates the hidden ‘C:\ProgramData\MicrosoftCorporation\Windows\Helpers\’ directory, and copies Isass.exe to ‘SecurityHeaIthService.exe’, ‘SystemldleProcess.exe’, and ‘winIogon.exe’ in this directory.
2 Mining Status Makes a POST request to ‘/2.0/method/get’ to retrieve a URL for a mining executable. This file is stored in the ‘C:\ProgramData\{CB28D9D3-6B5D-4AFA-BA37-B4AFAABF70B8}\’ directory.
3 Miners Killer Makes a POST request to ‘/4.0/method/modules’. This provides a list of DLLs that are placed in the ‘C:\ProgramData\MicrosoftCorporation\Windows\Modules\’ folder. These DLLs are then loaded by Rarog. The DLLs in question are expected to have an export function named ‘Instance’.
4 Task Manager This does not appear to be used by the malware.

 

When the ‘Mining Status’ option is enabled, and a miner is successfully downloaded from a remote server, Rarog will make the following request to the C2 server:

The response decodes to the following:

These parameters will be supplied to the mining program upon execution. Prior to running the miner, Rarog will check the running processes on the system for the following strings. Should they be encountered, the processes will be killed, and the executable will be deleted from the system.

  • minergate
  • stratum
  • cryptonight
  • monerohash
  • nicehash
  • dwarfpool
  • suprnova
  • nanopool
  • xmrpool

These strings represent common strings associated with mining pools used by individuals when mining various cryptocurrencies.

Rarog will make the following request to determine how much of a percentage of the victim’s CPU to use for mining:

The response decodes to a value of ‘50’. Rarog continues to make a request to ‘/4.0/method/blacklist’ determine what processes should be blacklisted. The server in question did not have a configured blacklist, but an example of what may be returned is shown below:

This list represents common resource-intensive applications, such as games, that Rarog will continually monitor for. In the event such a program is running in the foreground, Rarog will suspend mining operations.

The malware then makes the following request to retrieve the amount of time that Rarog will sleep before mining on the target victim:

Prior to continuing, Rarog will check the running processes on the system for the following common security applications, and will not proceed if found:

  • NetMonitor
  • Taskmgr.exe
  • Process Killer
  • KillProcess
  • System Explorer
  • AnVir
  • Process Hacker

Rarog takes the previously collected CPU usage percentage and applies it against the number of CPUs found on the system. As an example, if a system had four CPU cores, and the setting was at 50%, Rarog could configure the miner to use 2 threads (0.5 x 4). The following mining command is executed by Rarog:

 

Botnet Functionality

Rarog will periodically make HTTP POST requests to the following:

This particular URI has the ability to provide additional tasks for Rarog to perform. The following list of supported commands are included:

Command Description
install Download and execute specified file
open_url Open the specified URL in browser
ddos Perform DDoS operations against specified target
update Update Rarog Trojan from specified URL
restart_bot Restart Rarog Trojan
delete_bot Delete Rarog Trojan

 

SHA256 Hashes

For a full list of SHA256 hashes and their first encountered timestamp, please refer to the following file.

 

C2 Servers

For a full list of C2 servers and their first encountered timestamp, please refer to the following file.

 

File and Folder Artifacts

C:\ProgramData\MicrosoftCorporation\Windows\System32\

C:\ProgramData\MicrosoftCorporation\Windows\System32\Isass.exe

C:\ProgramData\MicrosoftCorporation\Windows\System32\_Isass.exe

C:\ProgramData\{4FCEED6C-B7D9-405B-A844-C3DBF418BF87}\

C:\ProgramData\{4FCEED6C-B7D9-405B-A844-C3DBF418BF87}\driver.dat

C:\ProgramData\WindowsAppCertification\

C:\ProgramData\WindowsAppCertification\WindowHelperStorageHostSystemThread.ps1

C:\ProgramData\WindowsAppCertification\cert.cmd

C:\ProgramData\WindowsAppCertification\checker.vbs

C:\ProgramData\MicrosoftCorporation\Windows\Helpers\

C:\ProgramData\MicrosoftCorporation\Windows\Helpers\SecurityHeaIthService.exe

C:\ProgramData\MicrosoftCorporation\Windows\Helpers\SystemldleProcess.exe

C:\ProgramData\MicrosoftCorporation\Windows\Helpers\winIogon.exe

C:\ProgramData\{CB28D9D3-6B5D-4AFA-BA37-B4AFAABF70B8}\

C:\ProgramData\MicrosoftCorporation\Windows\Modules

 

Registry Artifacts

HKCU\Software\Microsoft\Windows\CurrentVersion\Run\Windows_Antimalware_Host_Syst

评论

暂无
发表评论
 返回顶部 
热度(939)
 关注微信