Security Experts:

Connect with us

Hi, what are you looking for?


Malware & Threats

New Python-based Ransomware Poses as Locky

A ransomware family used in attacks in July and August was posing as the infamous Locky ransomware that was highly active in 2016, Trend Micro researchers have discovered. 

A ransomware family used in attacks in July and August was posing as the infamous Locky ransomware that was highly active in 2016, Trend Micro researchers have discovered. 

Written in Python and dubbed PyLocky, the new malware is packaged with PyInstaller, a tool that turns Python applications into standalone executables. 

What makes PyLocky stand out from the crowd compared to other Python malware is anti-machine learning capability. It also uses the open-source script-based Inno Setup Installer and can pose a real challenge to static analysis methods, the security researchers say. 

Furthermore, PyLocky has seen a highly concentrated distribution, with several spam emails targeting European countries, particularly France. Initially low, the spam volume increased in time. 

A spam run observed in early August targeted French businesses, leveraging social engineering in an attempt to lure potential victims into clicking a link that redirects them to a malicious URL to download a ZIP file containing PyLocky.

Once installed on a victim’s machine, the malware attempts to encrypt image, video, document, sound, program, game, database, and archive files, among others. Overall, it targets a list of over 150 file types for encryption. 

The ransomware abuses Windows Management Instrumentation (WMI) to check the properties of the affected system. It also features anti-sandbox capabilities, sleeping for 999,999 seconds (around 11.5 days) if the affected system has a total visible memory size of less than 4GB. 

The ransomware’s encryption routines are implemented using the PyCrypto library and leverage the 3DES (Triple DES) cipher. PyLocky iterates through each logical drive, generates a list of files, and then overwrites targeted files with an encrypted version.

After completing the encryption process, PyLocky drops a ransom note and also establishes communication with its command and control (C&C) server. The malware’s ransom notes are in English, French, Korean, and Italian, suggesting that its operators are aiming at broader campaigns. 

“PyLocky’s evasion techniques and abuse of legitimate tools typically reserved to administrators further exemplify the significance of defence in depth. For instance, machine learning is a valuable cybersecurity tool in detecting unique malware, but it is not a silver bullet. With today’s threats, there are different vectors at the attackers’ disposal, which makes a multi-layered approach to security important,” Trend Micro concludes. 

Related: GandCrab: The New King of Ransomware?

Related: ‘RedEye’ Ransomware Destroys Files, Rewrites MBR

Written By

Ionut Arghire is an international correspondent for SecurityWeek.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.


Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.


Expert Insights

Related Content


The changing nature of what we still generally call ransomware will continue through 2023, driven by three primary conditions.


No one combatting cybercrime knows everything, but everyone in the battle has some intelligence to contribute to the larger knowledge base.


A recently disclosed vBulletin vulnerability, which had a zero-day status for roughly two days last week, was exploited in a hacker attack targeting the...

Malware & Threats

Threat actors are increasingly abusing Microsoft OneNote documents to deliver malware in both targeted and spray-and-pray campaigns.

Malware & Threats

Microsoft plans to improve the protection of Office users by blocking XLL add-ins from the internet.


More than 3,800 servers around the world have been compromised in recent ESXiArgs ransomware attacks, which also include an improved process.

Malware & Threats

Unpatched and unprotected VMware ESXi servers worldwide have been targeted in a ransomware attack exploiting a vulnerability patched in 2021.

Malware & Threats

A vulnerability affecting IBM’s Aspera Faspex file transfer solution, tracked as CVE-2022-47986, has been exploited in attacks.