Lokibot

Lokibot was developed in 2015 to steal information from a variety of applications. Despite the age, this malware is still rather popular among cybercriminals.

Type
Stealer
Origin
ex-USSR territory
First seen
3 May, 2015
Last seen
22 October, 2021
Also known as
Loki
LokiPWS
Global rank
4
Week rank
6
Month rank
7
IOCs
21328

What is Lokibot malware?

Lokibot, also known as Loki-bot or Loki bot, is an information stealer malware that collects credentials from the most widely used web browsers, FTP, email clients, and over a hundred software tools installed on the infected system. It was developed in one of the ex-USSR countries.

It was discovered for the first time on May 3rd, 2015 from a sale announcement made by the creator and the malware is still active to this day.

General description of Lokibot

Initially created and sold by a hacker known as "lokistov," or "Carter,", the first versions of Lokibot spyware used to cost up to $400. However, soon after almost identical malware started appearing on hacker forums, available for as little as $80 from a number of sellers. As it is thought, “lokistov” himself was hacked, and the source code of the virus was leaked, allowing others to use its techniques and sell extremely similar malware.

Curiously, a researcher subsequently found out that the first version of the virus got patched by someone without accessing the source code, which gave the hacker community the ability to set a series of individual domains used to receive the retrieved data.

Even though several versions of the virus exist today, after the analysis, it was found that all of them are actually modifications of the original malware. Interestingly, the server to which Lokibot stealer sends data is unique for every particular malware sample.

In the latest versions of Lokibot, a third stage is added to the process of compromising systems, besides more encryption, a technique to escape detection. Each layer is encrypted to attempt to hide the eventual source of code.

The malware uses the known technique of blurring images in documents to force users to enable macros. This trick infects machines quite successfully.

Lokibot malware analysis

A video displaying the simulation of the contamination process created by the ANY.RUN interactive malware hunting service provides the perfect opportunity for malware analysis to see how the contamination process is unfolding on an infected machine. As shown in the simulation, Lokibot needs email attachments, such as a Microsoft Office file or an archive file to be opened to enter an active phase.

process graph of lokibot stealer execution Figure 1: Process graph generated by the ANY.RUN malware hunting service

During the analysis we found out that the malware life cycle can be broken down into the following stages:

  • Contamination. The victim downloads a malicious archive or a Microsoft Office file which eventually downloads the malware;
  • Being packed initially, the Keylogger unpacks itself and begins the execution of the main payload;
  • The virus creates unique loop-functions for each application that it is targeting and saves retrieved data into a buffer;
  • Then, a registry key is modified and the Trojan is copied specifically into a folder with a specific name unique name under the %APPDATA% folder. This allows the virus to establish persistence. MachineGuid MD5 is used for the name generation and the name can also be used as a Mutex as well as bot-id. As the last action of this step, the virus generates a registry key that points to the file it copied before to the specific folder inside the %APPDATA% folder;
  • Then, depending on if the current user is privileged or not the virus sets persistence either under HKEY_LOCAL_MACHINE or KEY_CURRENT_USER;
  • Next, general system information is sent to the C&C server;
  • For persistence, the keylogger then applies triple DES encryption technique to the URL and the registry key;
  • After this the virus starts waiting for commands from C&C, creating a new thread to detect the C&C response.

How to avoid infection by Lokibot?

Since Lokibot spyware requires macros to be activated to infect the system, attackers will do everything in their power to make the victim enable them. Thus keeping macros turned off is the best bet to stay protected from the Trojan. Particularly, extra caution should be exhibited when a document downloaded from a suspicious source or an unknown email address prompts to enable macros.

Also, having antivirus software from trusted developers and always keeping it updated is a good way to decrease the probability of becoming the malware’s victim and protect credentials. Another good common practice is to be extremely mindful when opening attachments or clicking links in emails from unidentified sources.

Distribution of Lokibot

Lokibot stealer is distributed mostly via mail-spam campaigns, prompting the user to download a malicious file that is attached. Particularly, the three most commonly used types of files are Microsoft Office documents configured to begin the download and installation processes of the malware, archive files that contain a Loki-Bot executable or ISO files, also containing a Loki-Bot executable.

Lokibot execution process

Interactive sandbox simulation conducted on the ANY.RUN malware hunting service allows us to take a closer look at how the execution process of Lokibot unfolds in a case when a contaminated Microsoft Office file is the infection source.

  • The simulation starts with opening a Microsoft Office file. Immediately, WINWORD.EXE is executed with enable macros.
  • Then, through the exploitation of the CVE-2017-11882 vulnerability, Microsoft Office Equation Editor proceeds to download a malicious executable file;
  • Finally, a malicious executable file runs itself and then proceeds to steal the personal data and connect to the C&C server.

process tree of a lokibot stealer execution Figure 2: Illustrates the execution processes of Lokibot as shown by ANY.RUN simulation

a text report of a lokibot analysis Figure 3: A text report created by ANY.RUN

The virus generates multiple artifacts during its execution process. Particularly, four types of files can be simultaneously stored in the secret %APPDATA% directory at any point in time. Those files can have “.exe,” “.lck,” “.hdb” or “.kdb.” extensions, and each file type is used for a specific purpose:

  • .exe files contain an executable copy of the Trojan that triggers when a user logs into an account,
  • .lck files are generated to prevent resource conflicts when either Windows Credentials or Keylogging are decrypted,
  • .hdb files are used to store the hashes of all data samples already transmitted to the C&C server
  • .kdb files are in turn used to hold information about the data that is yet to be sent to the server

Based on the analysis, the keylogger uses the following algorithm to name the files:

  1. First, Lokibot takes the value of MachineGuid from the registry branch HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Cryptography . In the case of our simulation, it was set to dc5131b5-5fbc-4f85-b1ed-28d4392080ca.

lokibot mutex creation GUID registry

  1. Then, the virus uses the MD5 algorithm to calculate the hash sum of the MachineGuid which in our case ended up being c83ba0aa282a966263dda560052b3caf.

lokibot mutex creation md5

  1. Finally, characters from the 8th to the 13th of the resulting hash amount are used as the name of the subdirectory, and the characters from the 13th to the 18th are used as the name of the files.

lokibot mutex creation

Lokibot communication with C&C

To communicate with the C&C server, the patched version of the virus which is also the most widely spread strain sends a “ckav.ru” string. Interestingly, the sent data is also is a substring of “fuckav.ru”.

How to detect Lokibot malware using ANY.RUN?

Among other things you can detect either it is Lokibot in front of you or not by looking inside sending packets - there's always text "ckav.ru" inside them. Just click on the sent packet in the "HTTP REQUESTS" tab and take a look inside a packet.

lokibot network stream Figure 4: Lokibot network stream

Conclusion

Not lastly due to the fact that the first version of the malware was leaked and cloned, eventually becoming available for a significantly cheaper price than the original, Lokibot spyware became a widely spread malware that is continuing to appear in several mail-spam campaigns. In fact, the virus has become so popular that its set-up explanation videos on stealing credentials are publically available on YouTube.

Fortunately, modern malware hunting tools like ANY.RUN provides the ability to examine the malware behavior in detail and establish solid protection against the hazard.

IOCs

IP addresses
192.168.100.191
204.11.56.48
72.52.179.174
209.99.40.222
204.93.178.31
82.221.129.18
103.21.59.27
192.168.100.173
173.239.8.164
192.169.69.25
160.153.133.149
93.157.63.185
67.225.140.132
108.167.146.149
192.168.100.227
185.141.27.187
68.66.216.56
208.91.198.102
74.208.236.199
45.133.200.3
Hashes
463688d6dfb7d1afcb6e3b13110542de17dd81cd271a79beb55d2916b5563c4c
8948dee3a319253518fa5e411ef6dc99aaba30b078b10417bb823826a5d1c9a7
bfd85e23edeff064a09bba65f2f2f23ab652aeb613c42b61c91de50f791dd5ea
d94cfec2bb6b443a9feb8f28a5160030473209d66742fe1a62d4442bd1d2e47a
4665b3b45e91dd971bae643ebad2547c8492f078591203805717948a16cbb491
d8bb1bb8587840321e74cf2ab2f3596344cbb5ffeb77060bd9aade848fed03fd
5ef7d0c13ec748206da57ce2ed9749936aff69d837d98dd150e43360f59ec63b
a6ea2ee57ef3ca4a2a8253d1587183a4739f03dbcefd6b2c8ad7171d2f790cd0
fb7858cc3360d06a5a3895a721249409755e3c49542f5358899997c367ce9cd1
e3dad18db5bea83e4cab4a3084659689a13213c10efa9543efdd1bbd29e22ac8
ed5e8ff7e2e5e830e2265ab6d76a5889a656444e157237426c0504a21a517471
37d685665a9b56dd4d6210a887d81118e3a6b55bd78c0cd4e8c9e75d812502ac
fdec4f55cde88d88655a58c99ed75bc2218430a32c29062a258ecf7932e548d6
cf0dac69d1019ef5bfe48cec8864233431019b8421a63c515a97f76c5f9f7554
4ff16c7a2e9afe4eb44539b7d08c09e7236eabe78775e97da7301055c13a6659
4dec8e046a24e264e33b75cc22fb5b259aafbec1e3eac9d116fa19c3e411b0a4
a3f50eb98afaf1fa3611be5e129012a443fb0f7e248e8d1e2c2e395d69c4fae1
6065a675d7139a622ce9b68fbd2b6909ce47acc09a24afcf697b170b8ed53b3b
3d4d1c3f28b7b10b13d50b9812fc71d832da575f1aa6f2d411b7747979194d2e
03a1be5b887d8ba304f4870a878fc82e24df77c863c717bf04ede928006283de
Domains
isns.net
www.tenorshare.com
qxq.ddns.net
app.backinstock.org
ddos.dnsnb8.net
powertoolsforyou.com
vxvault.net
kanavagronomy.in
intohave.com
tangotangocash.com
krupskaya.com
m-onetrading-jp.com
majul.com
thuocnam.tk
ww1.survey-smiles.com
shopget24.com
701602.parkingcrew.net
shop.definitelykingsley.com
ext.mysecurify.com
oneflextiank.com

HAVE A LOOK AT

Adwind screenshot
Adwind
adwind trojan
Adwind RAT, sometimes also called Unrecom, Sockrat, Frutas, jRat, and JSocket, is a Malware As A Service Remote Access Trojan that attackers can use to collect information from infected machines. It was one of the most popular RATs in the market in 2015.
Read More
Agent Tesla screenshot
Agent Tesla
agenttesla trojan rat stealer
Agent Tesla is spyware that collects information about the actions of its victims by recording keystrokes and user interactions. It is falsely marketed as a legitimate software on the dedicated website where this malware is sold.
Read More
Ave Maria screenshot
Ave Maria
avemaria stealer trojan rat
Ave Maria malware is a Remote Access Trojan that is also called WARZONE RAT. Hackers use it to control the PCs of their victims remotely and steal information from infected PCs. For example, they can remotely activate the camera to take pictures of a victim and send them to a control server.
Read More
Azorult screenshot
Azorult
azorult trojan rat
AZORult can steal banking information, including passwords and credit card details, as well as cryptocurrency. This constantly updated information stealer malware should not be taken lightly, as it continues to be an active threat.
Read More
Crimson RAT screenshot
Crimson RAT
crimson rat trojan
Crimson is a Remote Access Trojan — a malware that is used to take remote control of infected systems and steal data. This particular RAT is known to be used by a Pakistani founded cybergang that targets Indian military objects to steal sensitive information.
Read More
Danabot screenshot
Danabot
danabot trojan stealer
Danabot is an advanced banking Trojan malware that was designed to steal financial information from victims. Out of the Trojans in the wild, this is one of the most advanced thanks to the modular design and a complex delivery method.
Read More