Howler Cell has been tracking and investigating the new variant of MedusaLocker. MedusaLocker is a well-known ransomware family active since late 2019. This malware continues to evolve with new variants. v3 incorporates advanced anti-analysis tricks, improved persistence, multi-threaded encryption, and process/service targeting to maximize impact. The MedusaLocker v3 variant is also known as BabyLockerKZ.
This investigation shows the detailed analysis of MedusaLocker v3, based on a command-line sample from a threat landscape perspective. v3 signals MedusaLocker’s adaptation to modern defenses, shifting toward modular design, customizable command-line operations, and stronger evasion traits that align it with more mature ransomware-as-a-service (RaaS) operations.
The group(s) that deploy MedusaLocker have been known to conduct brute-force attacks against open or exposed Remote Desktop Protocol (RDP) to gain an initial foothold in their victims' environments. Sectors impacted include Healthcare, Finance, Government, and Manufacturing. Regardless of past victimology, any industry or company is at risk of this threat.
Below is an overview of MedusaLocker from its initial release to advanced v3 variants.
Version |
First Observed |
Key Features |
Notable Targets |
Industries Affected |
V1 |
September 2019 |
|
|
|
V2 |
Mid–2020 – 2021 |
|
|
|
V3 |
2023 – Active in 2024–2025 |
|
|
|
While this analysis focuses on the execution stage, MedusaLocker campaigns are typically delivered through:
These methods give attackers an initial foothold, after which the MedusaLocker payload is deployed manually or via loaders.
MedusaLocker v3 accepts three arguments:
If no arguments are provided, MedusaLocker defaults to local volume enumeration and mounts additional targets discovered dynamically.
Configuration and settings are embedded in the binary as encrypted resource data. Decryption key: PUTINHUILO1337 Decryption routine uses a custom XOR loop with modulus-based index calculation:
Figure 1 Config Decryption Routine
The configuration blob is decrypted directly into memory, after which it is parsed to extract the encryption keys, ransom note, excluded paths, and runtime commands. Once loaded, the ransomware interprets this configuration and executes the specified actions accordingly. Figure 1 shows the config decryption routine.
MedusaLocker creates a registry key under HKCU\SOFTWARE\PAIDMEMES as shown in Figure 2 and stores values labeled Public and Private. The labels PUBLIC and PRIVATE suggest the malware may be storing configuration values (like encryption keys, tokens, or settings).
Figure 2 Creates Registry in HKCU\SOFTWARE\PAIDMEMES
To achieve persistence on the infected system, the Medusalocker creates a registry entry under HKCU\Software\Microsoft\Windows\CurrentVersion\Run with the value name BabyLockerKZ pointing to its executable path as shown in Figure 3. This ensures the malware will automatically execute every time the user logs in, maintaining a foothold on the system.
Figure 3 Creates persistence with value as BabyLockerKZ
MedusaLocker uses an embedded public key to carry out AES-256 encryption on victim files. This public key is written in base64 encoded form in the config file. Due to the way the implementation is designed, victims have no means of decrypting their files without obtaining the corresponding private key from the ransomware operators.
To execute attacker-controlled commands, the malware employs a Sysnative cmd.exe bypass. Instead of launching commands directly, it constructs the following chain, as shown in Figure 4
\SysWOW64\cmd.exe /c %windir%\sysnative\cmd.exe /c <command>
Figure 4 Sysnative bypass string
This technique allows a 32-bit malware process to run commands in a 64-bit command interpreter, thereby avoiding Windows WOW64 redirection. Each command is executed asynchronously, with its output captured and processed by the malware.
This approach ensures that all attacker instructions execute in the intended 64-bit environment, making the malware more versatile and resilient across Windows architectures.
Before starting file encryption, MedusaLocker enumerates all available logical drives on the victim’s system. This is done through a call to the Windows API GetLogicalDrives, which returns a bitmask representing the drives present (A: through Z:). Figure 5 shows how logical drives are enumerated.
For each active drive letter, the malware:
Figure 5 Logical Drives Enumeration
By default, if MedusaLocker is executed without any command-line arguments, it limits its encryption scope to local volumes. As part of this, it also attempts to mount unassigned or hidden volumes dynamically, ensuring no local target is missed.
However, the malware relaunches itself with the -network command line argument, and it explicitly expands its scope to include network resources such as mapped drives and accessible UNC paths. To achieve this stealthily, MedusaLocker:
This dual execution strategy allows MedusaLocker to cover both attack surfaces:
In short, the -network argument is the malware’s switch to extend ransomware impact beyond the infected host to the broader enterprise environment. Figure 6 explains how the non-elevated child process is executed with a spoofed parent process
Figure 6 Non-elevated child process with a spoofed parent process
In addition to local drives, MedusaLocker also attempts to discover and encrypt files stored on mapped network drives with the above technique. The malware reuses the same GetLogicalDrives API to iterate over drive letters, but applies an extra filter using GetDriveTypeW. Only drives of type DRIVE_REMOTE (4) are considered, which indicates a mapped network location. Figure 7 shows enumerations of mapped network drives via WNetGetConnectionW.
For each mapped drive found:
Figure 7 Enumerating mapped network drives via WNetGetConnectionW
If WNetGetConnectionW fails, the malware even prints a debug-style message to the console:
[!] WNetGetConnection failed 0x%X
This suggests the sample was either compiled with leftover debugging output or the developers wanted runtime visibility during testing, as shown in Figure 8.
Figure 8 Debug-style console message
MedusaLocker contains functionality to mount volumes that do not currently have a drive letter assigned, effectively making otherwise hidden or unmounted storage accessible for encryption.
The routine leverages several Windows APIs:
If the mounting succeeds, the malware prints a success message to the console:
[+] Mounted: <VolumeGUID> -> <DriveLetter>
If it fails, it reports an error instead:
[!] Not mounted: <VolumeGUID> -> <DriveLetter>, error: 0x%X
By mounting previously hidden or system-reserved volumes, the ransomware increases its attack surface, ensuring that it encrypts not just visible drives but also volumes that might normally be overlooked by users and security tools. Figure 9 shows how volumes gets mounted.
Figure 9 Volume mounting routine
MedusaLocker v3 doesn’t just stop at handling plain IPv4 addresses, it also includes functionality to parse CIDR (Classless Inter-Domain Routing) notation, which allows it to work with entire subnets rather than just individual hosts. This is a clear indication that the ransomware is designed with network-wide reach in mind.
In this MedusaLocker v3 variant, we did not observe any Command-and-Control (C2) communication with external servers. Instead, its design is purely focused on ensuring it can reach as many machines as possible within the victim’s environment, leveraging subnet awareness to maximize encryption impact.
One of the reasons MedusaLocker v3 encrypts victim environments so quickly is its ability to dynamically scale the number of worker threads during runtime. The function responsible for this behavior, internally referenced as ThreadPoolSetWorkerCount, acts as the ransomware’s custom thread pool manager, as shown in Figure 10.
Figure 10 ThreadPoolSetWorkerCount routine
Instead of relying on a single-threaded encryption routine, MedusaLocker v3 intelligently distributes the workload across multiple threads. This achieves two critical goals:
MedusaLocker v3 incorporates well-known anti-debugging techniques to evade analysis. One such routine, internally referenced as AntiDebug_Check, utilizes high-resolution timing checks to detect abnormal execution conditions.
To enhance reliability, the routine combines two independent timers:
By comparing these sources, MedusaLocker can detect time manipulation often used by debuggers to slow down execution or bypass anti-analysis checks, as shown in Figure 11.
Figure 11 Anti-Debug Checks
Configuration shown in Figure 12 reveals the ransomware’s strategy, exclusions, and runtime actions.
Figure 12 Medusalocker Ransomware Configuration
MedusaLocker v3 executes a large set of commands before beginning encryption to disable recovery mechanisms and stop database services. These include:
It also terminates SQL-related processes to maximize impact against enterprise workloads:
By doing this, MedusaLocker ensures databases are offline and their backups unrecoverable, making ransom payment the only way to recovery.
The config defines block sizes for partial encryption:
Meaning: files are encrypted in chunks instead of fully, which increases speed while keeping files unusable.
Encrypted files are appended with the extension:
To avoid system instability and allow remote control tools to keep functioning, MedusaLocker skips certain file types and paths.
.exe, .dll, .sys, .ini, .rdp, .lnk, .bmp, .mov, .cab, .url, .vsix, .msi, .pyc, .pyd
This reflects a targeted strategy: only business-critical data is encrypted, while OS and remote admin software remain untouched.
Figure 13 Ransom Note
The ransom note shown in figure 13 (How_to_back_files.html) instructs victims to contact the attackers and is copied into every encrypted directory as well as the victim desktop.
Emails used:
qd7pcafncosqfqu3ha6fcx4h6sr7tzwagzpcdcnytiw3b6varaeqv5yd[.]onion
"We gathered highly confidential/personal data… If you decide to not pay, we will release your data to public or re-seller.”
This clearly shows MedusaLocker v3 is operating under the double extortion model (encryption + data theft).
Tactic |
Technique |
Technique ID |
TTP |
Persistence |
Registry Run Keys / Startup Folder |
T1547.001 |
Creates HKCU\Software\Microsoft\ Windows\CurrentVersion\Run\BabyLockerKZ for persistence |
Execution |
Command and Scripting Interpreter: Windows Command Shell |
T1059.003 |
Executes commands via cmd.exe |
Defense Evasion |
Impair Defenses: Disable or Delete Shadow Copies |
T1490 |
Runs vssadmin.exe Delete Shadows /all /quiet |
Discovery |
System Information Discovery |
T1082 |
Queries local system info before encryption |
Network Share Discovery |
T1135 |
Enumerates network shares for lateral encryption |
|
File and Directory Discovery |
T1083 |
Enumerates files to encrypt |
|
Lateral Movement |
Remote Services: SMB/Windows Admin Shares |
T1021.002 |
Attempts encryption across accessible shares |
Impact |
Data Encrypted for Impact |
T1486 |
Encrypts local and network files with AES-256 |
Inhibit System Recovery |
T1490 |
Deletes shadow copies to prevent recovery |
Category |
Indicator |
Notes |
File Hashes |
SHA256:
|
Primary ransomware binaries |
Registry Keys |
HKCU\SOFTWARE\PAIDMEMES |
Stores public, private keys |
HKCU\Software\Microsoft\Windows \CurrentVersion\Run\BabyLockerKZ |
Persistence entry |
|
Dropped Files |
How_to_back_files.html |
Ransom note |
*.meduza216 |
Encrypted file extension |
|
Command-line Arguments |
-network |
Forces enumeration of network drives |
-shares=<path> |
Encrypt specific network shares |
|
-path=<path> |
Encrypt specific directory |
|
Processes/Execution |
cmd.exe /c vssadmin.exe Delete Shadows /all /quiet |
Shadow copy deletion |
MedusaLocker v3 shows how ransomware continues to evolve with smarter features, network-wide reach, and double extortion tactics. This variant avoids relying on external servers, instead focusing on spreading across every possible machine in the victim’s network. Its advanced persistence, multi-threaded encryption, and anti-recovery tricks make it especially dangerous for organizations.