Skip to main content

PyLocky Ransomware

First observed in June 2018, PyLocky is a Python-based ransomware tool that attempts to imitate the well-known Locky malware.
Report a cyber attack: call 0300 303 5222 or email [email protected]

This content has been archived

This article no longer conforms to NHS Digital's standards for cyber alerts, and may contain outdated or inaccurate information. Use of this information contained in this page is at your own risk

Summary

First observed in June 2018, PyLocky is a Python-based ransomware tool that attempts to imitate the well-known Locky malware.

Affected platforms

The following platforms are known to be affected:

Threat details

PyLocky is distributed via large-scale spam campaigns. The emails sent in these campaigns contain URLs that redirect to a PyLocky landing page when opened. A ZIP archive containing an executable file is then downloaded and opened. The executable will download the PyLocky packages as well as the legitimate PyInstaller tool, which is then used to install the malware.

Once installed, PyLocky uses Windows Management Intstrumentation (WMI) tools to check the affected system's properties, including how much RAM the system has. As an anti-sandboxing measure, PyLocky will not deploy its encryption routine if there is less than 4GB of available RAM. PyLocky will encrypt all local non-system files matching a hard-coded list of extensions using the 3DES algorithm.


Threat updates

Date Update
10 Oct 2018

The PyLocky source code has been has been leaked through a number of dark web forums. As a result, there is likely to be an increase in campaigns using PyLocky (or malware using the PyLocky code) over the coming months.


Remediation steps

Type Step

If a device on your network becomes infected with ransomware it will begin encrypting local machine files and files on any network the logged-in user has permission to access. For system administration accounts this may include backup storage locations.

To avoid becoming infected with ransomware, ensure that:

  • A robust program of education and awareness training is delivered to users to ensure they don’t open attachments or follow links within unsolicited emails.
  • All operating systems, anti-virus and other security products are kept up to date.
  • All day to day computer activities such as email and internet are performed using non-administrative accounts and that permissions are always assigned based on the principle of least privilege.
  • Your organisation adopts a holistic all-round approach to Cyber Security as advocated by the 10 Steps to Cyber Security.

Identifying the source of infection:
Identifying the affected device and disconnecting or quarantining it from the network is essential to damage limitation.

  • Users should immediately report infections to their IT support provider, disconnect their network cable and power the computer down.
  • File auditing should be enabled, and file server logs should be monitored to detect signs of unauthorised encryption and allow the source of encryption to be identified (i.e. the infected device).

To limit the damage of ransomware and enable recovery:
All critical data must be backed up, and these backups must be sufficiently protected/kept out of reach of ransomware.

  • Multiple backups should be created including at least one off-network backup (e.g. to tape).
    The only guaranteed way to recover from a ransomware infection is to restore all affected files from their most recent backup.

Last edited: 17 February 2020 12:53 pm