Petya Self Propagating Ransomware
The contents of this article were previously found on PetrWrap Ransomware CC-1287).
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
The contents of this article were previously found on PetrWrap Ransomware CC-1287).
Affected platforms
The following platforms are known to be affected:
Threat details
A new variant of PetrWrap ransomware is leveraging a modified EternalBlue SMBv1 exploit (patched in MS017-010) which is used to self-propagate within local and remote networks.
The malware also uses the EternalRomance SMB exploit (ALSO patched in MS017-010) which is a remote code execution exploit targeting Windows XP to Windows 2008 systems over TCP port 445.
The malware is also capable of self propagating to networked systems previously patched in MS017-010 via authentication reuse and PsExec tools or WMIC.
- PsExec is a legitimate Microsoft windows tool which is a tool used to execute processes on remote systems with full interactivity with console applications.
- WMIC is a legitimate Windows tool - The Windows Management Instrumentation Command-line (WMIC) is a command-line and scripting interface that simplifies the use of Windows Management Instrumentation (WMI) and systems managed through WMI.
This malware uses Mimikatz to capture credentials. Mimikatz is a custom tool that extracts data from the lsass.exe process. After extraction, credentials are passed to PsExec tools or WMIC for distribution inside a network.
A single infected system on the network possessing administrative credentials is capable of spreading this infection to all the other computers through WMI or PSEXEC.
The malware includes several evasion techniques including long sleeps to avoid analysis by researchers.
The malware could also be delivered as an attachment in spam email which includes the CVE-2017-0199 vulnerability, a remote code execution vulnerability in Word pad which downloads the NotPetya ransomware and utilises the EternalBlue SMB exploit (MS17-010) to spread laterally across the network.
CVE-2017-0199 is a vulnerability within Microsoft Office that was patched as part of April’s Microsoft Patch Tuesday. The vulnerability works by utilising an embedded OLE2 link object that when opened causes the winword.exe process to call out to a remote server to obtain a malicious HTA file. Microsoft HTA application (mshta.exe) then proceeds to load and execute the malicious script.
The malware adds a scheduled task to reboot the computer after the system is first infected. Encryption is initiated after reboot as a fake “chkdisk” screen message appears. - Before the reboot, files can be safely backed up if infection is suspected.
If the user has admin rights on the machine the encryption routine encrypts the Master Boot Record of the infected system upon reboot after infection. If the user does not have admin rights, only the individual files the user has access to are encrypted and not the Master Boot Record.
Know
Remediation steps
| Type | Step |
|---|---|
|
Ensure all systems are protected with the latest AV definitions
Ensure the following ports are blocked at your organisations firewall
SMB Vulnerability Remediation
Ransomware Remediation To avoid becoming infected with ransomware, ensure that:
Identifying the source of infection:
To limit the damage of ransomware and enable recovery:
The only guaranteed way to recover from a ransomware infection is to restore all affected files from their most recent backup. |
CVE Vulnerabilities
Last edited: 21 December 2021 12:39 pm