Skip to main content
Mallory
Malware

PyLocky

Tracked since Jan 6, 2026 · Updated 3 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns0Associated
Actors0Associated
ATT&CK14Techniques
IOCs11Tracked
Type
Ransomware
Capabilities
ExfiltrationDefense evasionReconnaissance
Delivery
MalspamLure
Platforms
Windows

PyLocky is a Python-based ransomware family that masquerades as Locky in its ransom messaging but is unrelated to the Locky malware family. It was observed in 2018 in spam-driven campaigns, particularly affecting organizations and users in Europe, with notable concentration in France. Reported victims included small and medium-sized businesses, larger enterprises, associations, and home users.

PyLocky is commonly delivered through invoice-themed spam lures that direct recipients to download an archive containing a Windows executable. The malware has been packaged with PyInstaller and distributed with Inno Setup components, complicating static analysis and detection. After execution, it drops Python runtime components and supporting libraries, gathers host information through Windows Management Instrumentation, and performs anti-analysis checks based on system memory before proceeding.

The ransomware enumerates files across logical drives and encrypts a broad range of file types. Reported analyses indicate it uses the PyCrypto library and 3DES for file encryption, generates victim-specific values including a random user identifier, password, and initialization vector, and communicates with command-and-control infrastructure to transmit system information used in the encryption workflow. Encrypted files have been observed with extensions including lockedfile, lockymap, and locky depending on version. PyLocky then drops ransom notes, including multilingual variants, to instruct victims on payment and recovery.

PyLocky demonstrates defense-evasion characteristics through packaging and anti-sandbox delays, and it includes host reconnaissance prior to encryption. Public decryptors have been released for versions 1 and 2 through law-enforcement and researcher collaboration, enabling recovery in some cases without paying the ransom. Separate research also documented a decryptor workflow that depended on capturing the malware’s initial command-and-control traffic because data exchanged during early communications was incorporated into the encryption process.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
MITRE ATT&CK

Techniques & procedures

14 distinct techniques documented for this family, organized by ATT&CK tactic.

Resource Development

1 technique
T1583Acquire InfrastructureEvidence1

The pyLocker Ransomware utilizes Command & Control servers on the Tor network.

Initial Access

2 techniques
T1566PhishingEvidence1

In late July and throughout August, we observed waves of spam email delivering the PyLocky ransomware.

T1566.002Spearphishing LinkEvidence1

The email entices the user to click a link, which redirects users to a malicious URL containing PyLocky.

Execution

3 techniques
T1047Windows Management InstrumentationEvidence1

When PyLocky executes, it generates a random user ID and password and gathers information about the infected machine using WMI wrappers.

T1059Command and Scripting InterpreterEvidence1

PyLocky is written in Python, a popular scripting language; and packaged with PyInstaller

T1204User ExecutionEvidence1

The malicious URL leads to a ZIP file ( Facture_23100.31.07.2018.zip ) that contains a signed executable ( Facture_23100.31.07.2018.exe ). When successfully run, the Facture_23100.31.07.2018.exe will drop malware components

Stealth

2 techniques
T1036MasqueradingEvidence1

Although it tries to pass off as Locky in its ransom note, PyLocky is unrelated to Locky.

T1497Virtualization/Sandbox EvasionEvidence1

For its anti-sandbox capability, PyLocky will sleep for 999,999 seconds — or just over 11.5 days — if the affected system’s total visible memory size is less than 4GB.

Discovery

3 techniques
T1082System Information DiscoveryEvidence2

When PyLocky executes, it generates a random user ID and password and gathers information about the infected machine using WMI wrappers.

T1083File and Directory DiscoveryEvidence1

After obtaining the absolute path of every file on the system, the malware then calls the encryption algorithm, passing it the IV and password.

T1497Virtualization/Sandbox EvasionEvidence1

For its anti-sandbox capability, PyLocky will sleep for 999,999 seconds — or just over 11.5 days — if the affected system’s total visible memory size is less than 4GB.

Collection

1 technique
T1560Archive Collected DataEvidence1

The malicious URL leads to a ZIP file ( Facture_23100.31.07.2018.zip ) that contains a signed executable

Command and Control

2 techniques
T1071Application Layer ProtocolEvidence2

The pyLocker Ransomware utilizes Command & Control servers on the Tor network. These Tor servers are provided in the ransom notes created on a victim's computer...

T1105Ingress Tool TransferEvidence1

When successfully run, the Facture_23100.31.07.2018.exe will drop malware components — several C++ and Python libraries and the Python 2.7 Core dynamic-link library (DLL) — along with the main ransomware executable

Impact

1 technique
T1486Data Encrypted for ImpactEvidence3

PyLocky is a family of ransomware written in Python that attempts to masquerade as a Locky variant. This ransomware will encrypt all files on a victim machine before demanding that the user pay a ransom to gain access to their decrypted files.

Indicators of compromise

Observables

11 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Activity feed

Recent activity

4 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
cyber security newsNews · Jan 6, 202610 Best Ransomware File Decryptor Tools – 2026Ransomware that targets French and European companies, increases ransom over time, and uses WMI for system information gathering. Decryption requires capturing initial C2 network traffic.Read more ↗bleeping computerNews · Jun 13, 2019pyLocky Decryptor Released by French AuthoritiesRansomware active in Europe that encrypts files and appends extensions including .lockedfile, .lockymap, and .locky. It uses Tor-based command-and-control servers referenced in ransom notes. The released decryptor for versions 1 and 2 appears to rely on two hard-coded private RSA keys, suggesting investigators may have obtained the master private keys from attacker infrastructure rather than exploiting a cryptographic flaw.Read more ↗talosintelligence otherNews · Jan 10, 2019Pylocky Unlocked: Cisco Talos releases PyLocky ransomware decryptorPython-based ransomware that encrypts files on victim machines, appends the .lockedfile extension, communicates with a C2 server during initial execution to send system information and encryption-related data, and overwrites original files with a ransom note.Read more ↗trend micro blog historicNews · Sep 10, 2018A Closer Look at the Locky Poser, PyLocky Ransomware | Trend Micro (US)Python-based ransomware packaged with PyInstaller that encrypts a hardcoded list of file types using 3DES via the PyCrypto library, drops multilingual ransom notes, performs anti-sandbox checks using WMI and long sleep delays, and sends victim system information to a C&C server via POST after encryption.Read more ↗
Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching11Match every observed IP, domain, and hash against your live telemetry.
Associated threat actorsGroups linked to this family, with evidence pinned to each claim.
Associated vulnerabilitiesCVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping14Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.