Library
My library

+ Add to library

Contact us
24/7 Tech support | Rules regarding submitting

Send a message

Your tickets

Profile

Trojan.Scavenger.3

Added to the Dr.Web virus database: 2025-04-18

Virus description added:

sha1:

  • fe612df1ae5fba63ca4eaeb880e9f14b1061636b (version.dll)

Description

A malicious program written in C++ and a component of the Trojan.Scavenger family. It represents a dynamic library that is downloaded by Trojan.Scavenger.2 malware and placed in a target browser’s directory. Its main task is to disable the browser’s protective mechanisms and modify a number of the extensions installed in it.

Operating routine

Trojan launching

The trojan library version.dll exploits the DLL Search Order Hijacking vulnerability and automatically runs when the browser starts up and functions as one of its components.

Checking the running environment

When launched, Trojan.Scavenger.3 finds the main browser process by verifying that the current process has the argument --type. This is to distinguish the main—more privileged—process from the child ones. If the trojan detects the argument --type in the process, it stops working.

Next, Trojan.Scavenger.3 performs an environment check, which is standard for the family. If it detects signs that it is being launched in a virtual environment or debug mode, it stops working.

Hooking the system functions

At the beginning and end of the operation, Trojan.Scavenger.3 installs hooks on the following system functions:

  • GetCommandLineW
  • CreateFileW
  • GetFileAttributesExW

The hook installation technique is splicing.

Hooking the function GetCommandLineW

This hook is for modifying arguments sent to the main browser process when it is launched. The following arguments are added to the command line:

  • --no-sandbox — disables the browser’s sandbox initialization, resulting in no isolation of the executed JavaScript code;
  • --test-type — launches the browser in a special mode, in which various auto-starts from extensions are disabled.

Patching the Chromium extensions check

To apply this patch, Trojan.Scavenger.3 searches the target library of the Chromium browser engine. To do so, it obtains the list of all of the current process’s loaded modules and tries to find the one with the function CrashForExceptionInNonABICompliantCodeRange (this is the export function from Chromium). If Trojan.Scavenger.3 successfully obtains the module address, it remembers it.

Having found the required address, the trojan reads the code section of the loaded module byte-by-byte, trying to find a match for the required opcode signature:

48 ?? ?? ?? ?? 80 ?? ?? ?? 75 ?? 48 89 CF 80 ?? ?? 01 74 ?? 48 ?? ?? 74 ??

This signature is hardcoded in the trojan’s body and consists of 36 bytes; however, the check is only performed on the first 25 bytes.

After the code is found, Trojan.Scavenger.3 patches the extensions verification by replacing the value 1 with the value 2:

#drweb

As a result, the extensions check in the browser is rendered disabled.

Connecting to the C2 server and working with the browser extensions

The first messages between the trojan and the C2 server are packets for creating and checking the encryption key in accordance with the algorithm discussed in the corresponding description for the Trojan.Scavenger family.

Next, the trojan receives from the server the list of browser extensions that are to be modified as well as the modifications themselves. For this, it sends requests to the server via the route /c/c.

Requests with the route /c/c

These requests have parameters that are standard for the family.

The C2 server response depends on which string is sent in the request body; this string is encrypted with an XXTEA algorithm. The following strings can be sent in the request:

  • MANU
  • BAND|<extension_id>

First, the trojan sends the string MANU. The C2 server responds with the list of IDs for the extensions that the trojan needs to modify:

["bfnaelmomeimhlpmgjnjophhpkkoljpa", "nkbihfbeogaeaoehlefnkodbefgpgknn", "nngceckbapebfimnlniiiahkandclblb", "hdokiejnpimakedhajhdlcegeplioahd", "opcgpfmipidbgpenhmajoajpbobppdil"]

After receiving the list of target extensions, Trojan.Scavenger.3 crawls the directory storing the extensions installed in the browser. Next, it copies the required ones to the directory %TEMP%/ServiceWorkerCache.

After that, the trojan sends the message BAND|<extension_id>. The C2 server responds to it with the JSON that looks like this:

[ 
  {
    "file_name": "<the file name or the regular expression>",
    "match_helper": "<the string to start searching from>",
    "match": "<the string or the regular expression to be changed>",
    "replacement": "<the string to be replaced with>"
  },...
]

Next, Trojan.Scavenger.3 modifies the target extensions. However, it does not modify the original extensions from the directory where they are stored—only the copies of them from its own directory %TEMP%/ServiceWorkerCache. This way, the originals are preserved.

Hooking the functions CreateFileW and GetFileAttributesExW

After modifying the extensions, the trojan hooks the functions CreateFileW and GetFileAttributesExW. These hooks are needed to redirect the work done with the extension files. At this stage, the local paths to the original extension files are substituted with the paths to the modified ones in the directory %TEMP%/ServiceWorkerCache.

More about Trojan.Scavenger.2
News about the trojan
Indicators of compromise

Curing recommendations

  1. If the operating system (OS) can be loaded (either normally or in safe mode), download Dr.Web Security Space and run a full scan of your computer and removable media you use. More about Dr.Web Security Space.
  2. If you cannot boot the OS, change the BIOS settings to boot your system from a CD or USB drive. Download the image of the emergency system repair disk Dr.Web® LiveDisk , mount it on a USB drive or burn it to a CD/DVD. After booting up with this media, run a full scan and cure all the detected threats.
Download Dr.Web

Download by serial number

Use Dr.Web Anti-virus for macOS to run a full scan of your Mac.

After booting up, run a full scan of all disk partitions with Dr.Web Anti-virus for Linux.

Download Dr.Web

Download by serial number

  1. If the mobile device is operating normally, download and install Dr.Web for Android. Run a full system scan and follow recommendations to neutralize the detected threats.
  2. If the mobile device has been locked by Android.Locker ransomware (the message on the screen tells you that you have broken some law or demands a set ransom amount; or you will see some other announcement that prevents you from using the handheld normally), do the following:
    • Load your smartphone or tablet in the safe mode (depending on the operating system version and specifications of the particular mobile device involved, this procedure can be performed in various ways; seek clarification from the user guide that was shipped with the device, or contact its manufacturer);
    • Once you have activated safe mode, install the Dr.Web for Android onto the infected handheld and run a full scan of the system; follow the steps recommended for neutralizing the threats that have been detected;
    • Switch off your device and turn it on as normal.

Find out more about Dr.Web for Android