The hacker group APT31, known for numerous attacks on government agencies in different countries, attacked Russian companies for the first time. According to Positive Technologies, in the first half of 2021, the APT31 group, in addition to its actions in Russia, carried out about ten malicious mailings in Mongolia, the USA, Canada and Belarus.

The hacker group ART31, also known as Hurricane Panda and Zirconium, has been operating since the 2010s. Its representatives attack mainly the public sector, spying on potential victims and collecting confidential information. Microsoft previously indicated that APT31 is operating from China, and the UK government in mid-July linked the group’s activities with the Chinese Ministry of State Security.

According to Positive Technologies experts, starting in the spring of 2021, ART31 began to expand the geography of attacks and use a new method of hacking and infecting gadgets. According to the company, the hackers send phishing emails containing a link to a fake domain – inst.rsnet-devel [.] Com. It completely imitates the domain of certain government agencies. When a link is opened, a so-called dropper (remote access Trojan) enters the user’s computer, which creates a malicious library on the infected device and installs a special application. The application then launches one of the functions of the downloaded malicious library, and the attacker takes control of the computer.

Daniil Koloskov, senior specialist of the information security threat research department at Positive Technologies, warns that malware developers are trying to bring the malicious library as close as possible to the original, the names of the set of functions of the infected library partially coincide with the official one. Another hacker ploy was that in some attacks, the dropper was signed with a real, valid digital signature, and many security tools perceived it as a program from a certified manufacturer. Positive Technologies experts believe that the signature was most likely stolen, which indicates a good preparation of the group.

Denis Kuvshinov, head of the information security threat research department at Positive Technologies, predicts that in the near future ART31 will be used in attacks, including against Russia, and other tools, which can be detected by their correspondence to the code or the network infrastructure. Positive Technologies specialists have already reported on the attack of a hacker group that they have recorded in the State System for Detection, Prevention and Elimination of the Consequences of Computer Attacks (GosSOPKA). In the near future, the company does not expect a decrease in the number of cyberattacks from ART31, therefore, they advise commercial and other structures to implement indicators in their defenses that will help detect such a virus in time.

Further information and analysis on APT31’s new dropper. Target destinations: Mongolia, Russia, the U.S., and elsewhere


PT Expert Security Center (PT ESC) specialists regularly track the activity of hacker groups and the emergence of new information security threats (threat intelligence). During such monitoring in April 2021, a mailing list with previously unknown malicious content was sent to Mongolia. Some of the files found during the study had rather interesting names (“хавсралт.scr” [“havsralt.scr”] (mong. attachment), “Информация_Рб_июнь_2021_года_2021062826109.exe”) and, as the study showed, they contained a remote access trojan (RAT). Similar attacks were subsequently identified in Russia, Belarus, Canada, and the United States. According to PT ESC threat intelligence analysts, from January to July 2021, approximately 10 attacks were carried out using the discovered malware samples. A detailed analysis of malware samples, data on the paths on which working directories and registry keys were located, techniques and mechanisms used by the attackers (from the injection of malicious code to the logical blocks and structures used) helped correlate this malware with the activity of the APT31 group.

This group, also known as Judgment Panda (CrowdStrike) and Zirconium (Microsoft), has been active since at least 2016. The group is presumed to be of Chinese origin, providing data to the Chinese government and state-owned enterprises to achieve political, economic, and military advantages. Cyberespionage is of key interest. The attackers’ targets include the government sector, aerospace and defense enterprises, as well as international financial companies and the high-tech sector. In different years, the group’s victims have included the government of Finland and, it is presumed, the governments of Norway and Germany too. The group also attacked organizations and individuals close to U.S. presidential candidates during the 2020 campaign. Recent attacks on companies in France, involving the hacking of home and office routers, have also been linked with the group.

In this article, we will study the malware created by the group, focus in more detail on the types of droppers discovered and the tricks used by its developers. We will also present the criteria on the basis of which the attacks were attributed.

Analysis of malicious content


The main objective of the dropper, the appearance of the main function of which is shown in Figure 1, is the creation of two files on the infected computer: a malicious library and an application vulnerable to DLL Sideloading (this application is then launched). Both files are always created over the same path: C:\ProgramData\Apacha. In the absence of this directory, it is created and the process is restarted.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 1. Overview of the dropper’s basic function

At the second stage, the application launched by the dropper loads the malicious library and calls one of its functions. It is noteworthy that MSVCR100.dll was chosen as the name of the malicious library in all cases. A library with an identical name is included in Visual C ++ for Microsoft Visual Studio. It is available on almost all PCs, but in a legitimate case it is located in the System32 folder (Figure 2). Moreover, the size of the malicious library is much smaller than the legitimate one.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 2. Parameters of the legitimate MSVCR100.dll

It is also worth noting the trick of the malware developers: by way of exports, the library contains names that can be found in the legitimate MSVCR100.dll. Without a doubt, this was done to make the malicious library as identical to the original version as possible.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 3. Part of the exports of malicious MSVCR100.dll

However, the number of exports in the malicious sample is much smaller, and most of them are ExitProcess calls.

Below is an example of a call to a malicious function from the created library. After the call, control is transferred to the malicious code. Note that the names of malicious functions were most often those used during the regular loading of applications.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 4. Calling a malicious function inside a legitimate application

During the analysis of malware samples, PT ESC specialists detected different versions of droppers that contain the same set of functions. The main difference is the name of the directory in which the files contained in the dropper will be created. However, in all the instances studied, the directories found in C:\ProgramData\ were used.

The version of the dropper that downloads all files from the control server is worthy of particular note. Let’s take a closer look. At the first stage, the presence of a working directory is also checked, after which connection is made to the control server and the necessary data is downloaded from it.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 5. Checking for a directory

Communication with the server is not encrypted in any way, nor is the control server’s address inside the malware. Downloaded files are written to the created working directory.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 6. Creating files in the working directory

Figure 7 displays the code sections responsible for downloading all files from the server (the last reviewed case), while Figure 8 displays the code for loading the main library (first instance).

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 7. Downloading files from C2
, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 8. Downloading a malicious library from C2

Examining the open directories of control servers revealed unencrypted libraries (Figure 9).

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 9. Encrypted and unencrypted libraries on the server

It is also worth noting that in some cases, particularly during attacks on Mongolia, the dropper was signed with a valid digital signature (Figure 10). PT ESC experts believe that this signature was most likely stolen.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 10. Valid digital signature of a dropper

Malicious library

Execution commences with receipt of a list of launched processes. That said, this has no impact on anything and is not used anywhere. The library then checks for the presence of the file C:\\ProgramData\\Apacha\\ssvagent.dll. This is the encrypted main load downloaded from the server. If this file does not exist, then the address of the control server from which the download will be performed is decrypted.

In fact, this is a 5-byte XOR with a key built into the library. Inside the binary file, the key is stored in the form xmmword with the constant 9000000090000000900000009h (the fifth byte is added to the memory by the malware itself using the direct address). In fact, encryption is performed with byte 0x9. After decrypting the C2 address, it connects to the control server and downloads the encrypted payload from it. Then the received data is saved in the file C:\\ProgramData\\Apacha\\ssvagent.dll, and the legitimate application ssvagent.exe is restarted. The main part of the described functions is presented in Figure 11.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 11. Decrypting the C2 address, loading and launching a new instance of ssvagent.exe

If the payload has been loaded earlier, it is checked for an application that is already running. To do this, a mutex named ssvagent is created; if it has been created, the application ends.

The library then writes the legitimate ssvagent.exe to startup via the registry, as shown in Figure 12.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 12. Persistence via registry key

After this, the file downloaded from the server is decrypted using a XOR operation with a 5-byte key. (The algorithm and key shown in Figure 10 differ from those used when decrypting the address of the control server.) Just as when decrypting the address of the control server, the key is stored in the form xmmword and is a constant: 1100000033000000060000000Eh. The fifth byte is identical in all cases; its value is 0x12.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 13. Decryption code of the main library

After this, the decrypted data is placed in the application memory, and control is transferred to it.


The main library starts its execution by creating a package that will be sent to the server. Officially, the package is created from three parts:

  1. Main heading
  2. Hash
  3. Encrypted data

The main heading has the following structure:

typedef struct _MAIN_HEADER
DWORD sizeOfPacket;//excluding the field itself
DWORD const_1;
DWORD const_2;


The values of const_1 and const_2 are identical and remain unchanged from package to package (unit value equalized to 4 bytes value).

To generate a hash, which is preceded by the main heading, the malware obtains the MAC address and PC name (the result of executing GetComputerNameExW). These values are concatenated (without using any separators), after which an MD5 hash is taken from the resulting value, which is then converted into a string. An example of hash generation is presented in Figure 14.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 14. Example of hash generation

The third part of the package is then formed. The structure describing it is presented below:

typedef struct  _FIRST_PACKET
char pcName[]; //result of GetComputerNameExW
BYTE splitByte_0x09;
char userName[]; // result of GetUserNameW
BYTE splitByte_0x09;
char hostIp[];
BYTE splitByte_0x09;
char decrStr_1[2];
BYTE splitByte_0x2E;
char decrStr_2[1];
BYTE splitByte_0x2E;
char decrStr_3[5];
BYTE splitByte_0x2E;
char decrStr_4[2];
BYTE splitByte_0x2E;
char osVersion_inverted[2];
BYTE splitByte_0x09;
char version[3];
BYTE splitByte_0x09;
char macAddr[];
BYTE splitByte_0x09;

Each field is separated from the other by a value of 0x09; some fields are separated by a value of 0x2E.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 15. An example of a generated package

Heading fields decrStr_1 through decrStr_4 are not generated by the malware and are not collected on the infected computer. All values are encrypted inside the malware. Each value is decrypted separately and is added to the heading. The decrStr_4 field depends on the bitness of the operating system, which ultimately leads to different offsets of the encrypted data transferred to the decryption function (Figure 17) as an argument.

The format of a complete generated package is presented below. The main heading is highlighted in green; the hash, in red; the encrypted data, in yellow.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 16. Encrypted package with all headings
, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 17. Decrypting data from a specific position within a binary file

The generated package is encrypted with RC-4 with the key 0x16CCA81F, which is embedded in the encrypted data and sent to the server. After this, malware waits for commands from the server.

Let’s take a look at the list of commands that the malware implements:

  • 0x3: get information on mapped drives.
  • 0x4: perform file search.
  • 0x5: create a process, communication through the pipe.
  • 0xA: create a process via ShellExecute.
  • 0xC: create a new stream with a file download from the server.
  • 0x6, 0x7, 0x8, 0x9 (identical): search for a file or perform the necessary operation via SHFileOperationW (copy file, move file, rename file, delete file).
  • 0xB: create a directory.
  • 0xD: create a new stream, sending the file to the server.
  • 0x11: self-delete.

It is noteworthy that some of them duplicate each other’s functions, and some are identical in terms of code implementation. This is most likely connected with the fact that the potential malware version is 1.0. This assumption is based on the value embedded in the code and contained in the network packages.

The code for processing the last command is particularly intriguing: all the created files and registry keys are deleted using a bat-file.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 18. Code for removing all components


During their investigation, PT ESC specialists found a Secureworks report describing the APT31 DropboxAES RAT trojan. Analysis of the detected malware instances allows us to assert that the group is also behind the attack we studied. Numerous overlaps were found in functionality, techniques and mechanisms used, starting with the injection of malicious code (up to the names of the libraries used) and ending with logical blocks and structures used inside the program code. The paths along which the malware working directories are located and the registry keys through which the persistence mechanism and their identity to the working directories are provided are also identical. In addition, the command handlers executed by the malware proved to be extremely similar, while the self-delete mechanism is identical.

The main difference between this version of the malware and that reviewed by Secureworks lies in the communication of the main load with the control server. In the cases studied, there was a custom communication protocol that Dropbox does not use to exchange data.

Network infrastructure

The detected malware samples, including the encrypted ones, revealed no overlaps between them in the network infrastructure. Nevertheless, in several cases, the payload accessed nodes other than those from which it was downloaded.

, Chinese government hackers attack Russian companies for the first time, The Cyber Post
Figure 19. Identified servers

In one of the latest malware samples, an interesting domain inst.rsnet-devel[.]com was identified, which imitates the domain of federal government bodies and government bodies of constituent entities of the Russian Federation for a segment of the Internet. This might indicate an attack on government organizations in the Russian Federation.Authors: Denis Kuvshinov, Daniil Koloskov, PT ESC


In the study PT ESC specialists analyzed new versions of the malware used by APT31 in attacks from January to July this year. The revealed similarities with earlier versions of malicious samples described by researchers, such as in 2020, suggest that the group is expanding the geography of its interests to countries where its growing activity can be detected, Russia in particular. We believe that further instances will be revealed soon of this group being used in attacks, including against Russia, along with other tools that might be identified by code correspondence or network infrastructure.


Malicious library

Network indicators









Network signature

As a result of researching the format of the complete generated packet, Positive Technologies experts managed to develop rules for detecting this threat in network traffic. You can download the free redistributable rules from our repository at


Resource Development
T1587.001MalwareAPT31 develops malware and malware components that can be used during targeting
T1587.002Develop Capabilities: Code Signing CertificatesAPT31 uses code signing to sign their malware and tools
Initial Access
T1566PhishingAPT31 sends phishing messages to gain access to victim systems
T1204.002User Execution: Malicious FileAPT31 relies upon a user open a malicious file to get it executed
T1059.003Command and Scripting Interpreter: Windows Command ShellAPT31 uses the Windows command shell for command execution
T1106Native APIAPT31 directly interacts with the native OS application programming interface (API) to execute behaviors
T1547.001Boot or Logon Autostart Execution: Registry Run Keys / Startup FolderAPT31 achieves persistence by adding a program to a Registry run key
T1574Hijack Execution Flow: DLL Search Order HijackingAPT31 executes their own malicious payloads by hijacking the way operating systems run programs
Defense Evasion
T1036MasqueradingAPT31 manipulates features of their artifacts to make them appear legitimate to users
T1140Deobfuscate/Decode Files or InformationAPT31 uses mechanisms to decode or deobfuscate information
T1027Obfuscated Files or InformationAPT31 uses encryption to make it difficult to detect or analyze an executable file
T1112Modify RegistryAPT31 APT31 team uses the Windows registry for persistence
T1082System Information DiscoveryAPT31 obtains detailed information about the operating system
T1005Data from Local SystemAPT31 uses backdoor functionality to exfiltrate any file on the infected machine
Command and Control
T1001Data ObfuscationAPT31 obfuscates command and control traffic to make it more difficult to detect
T1521Standard Cryptographic ProtocolAPT31 uses data hiding in C&C with RC4
T1043Commonly Used PortAPT31 uses ports 80 and 443 for communication
T1071.001Application Layer Protocol: Web ProtocolsAPT31 uses HTTP and HTTPS protocols to communicate with control servers
T1020Automated ExfiltrationAPT31 uses automatic exfiltration of stolen files
T1041Exfiltration Over C2 ChannelAPT31 uses C&C channel to exfiltrate data