RANSOM_PETYA.SM4
Trojan-Ransom.Win32.Petr.xw (KASPERSKY), Trojan.Gen.MBT (NORTON), Ransom:Win32/Petya.B!rsm (Microsoft)
Windows

Threat Type: Ransomware
Destructiveness: No
Encrypted:
In the wild: Yes
OVERVIEW
This Ransomware arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
It encrypts files with specific file extensions. It drops files as ransom note.
TECHNICAL DETAILS
Arrival Details
This Ransomware arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.
Installation
This Ransomware drops the following copies of itself into the affected system:
- \{remote machine name}\admin$\{malware filename}
- admin$ refers to the directory where Windows is installed.
It drops the following files:
- %User Temp%\{temp name} or %Temp%\{temp name} - modified build of Mimikatz
- example of {temp name} can be {random hex numbers}.tmp
- %ProgramData%\dllhost.dat or %Windows%\dllhost.dat - PsExec tool
(Note: %Temp% is the Windows temporary folder, where it usually is C:\Windows\Temp on all Windows operating system versions.. %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.)
Information Theft
This Ransomware gathers the following data:
- Username
- Password
Other Details
This Ransomware does the following:
- This ransomware overwrites the affected system's Master Boot Record (MBR).
- It does not rename the encrypted files.
- It checks for the presence of %Windows%\{malware file name (without extension)}. If existing, it will stop its execution.
- It creates a scheduled task to restart the system after a random amount of time (minimum of 1 hour).
- It restarts the system after its file encryption routine.
- It encrypts the Master File Table (MFT) during the fake CHKDSK screen after system reboot.
- It exploits MS17-010 to propagate in the network.
- It executes the following commands to execute its copy on the remote machine:
- dllhost.dat \{remote machine name} -accepteula -s -d C:\Windows\System32\rundll32 "C:\Windows\{malware filename}",#1 {random number minimum 10} {enumerated credentials}
(Note: dllhost.dat is the PsExec tool)
- dllhost.dat \{remote machine name} -accepteula -s -d C:\Windows\System32\rundll32 "C:\Windows\{malware filename}",#1 {random number minimum 10} {enumerated credentials}
- If unsuccessful, it uses wmic.exe to execute the file in the remote machine:
- %System%\wbem\wmic.exe /node:"{node}" /user:"{user name}" /password:"{password}" process call create "C:\Windows\System32\rundll32 \"C:\Windows\{malware filename}\" #1 {random number minimum 10} {enumerated credentials}"
- It displays the following images after rebooting the infected system:
Ransomware Routine
This Ransomware encrypts files with the following extensions:
- .3ds
- .7z
- .accdb
- .ai
- .asp
- .asp
- .x
- .avhd
- .b
- .ack
- .bak
- .c
- .cfg
- .co
- .nf
- .cpp
- .c
- .s
- .ctl
- .db
- .f
- .disk
- .d
- .jvu
- .doc
- .docx
- .dwg
- .eml
- .fdb
- .gz
- .h
- .hd
- .d
- .kdbx
- .m
- .ail
- .mdb
- .msg
- .nrg
- .ora
- .ost
- .ova
- .ovf
- .php
- .pmf
- .ppt
- .pptx
- .pst
- .pvi
- .py
- .pyc
- .rar
- .rtf
- .sln
- .sql
- .tar
- .vbox
- .vbs
- .vcb
- .vdi
- .vfd
- .vmc
- .vmdk
- .vm
- .sd
- .vmx
- .v
- .sdx
- .vsv
- .work
- .xls
- .xlsx
- .xv
- .d
- .zip
It drops the following file(s) as ransom note:
SOLUTION
Step 1
Before doing any scans, Windows XP, Windows Vista, and Windows 7 users must disable System Restore to allow full scanning of their computers.
Step 2
Note that not all files, folders, and registry keys and entries are installed on your computer during this malware's/spyware's/grayware's execution. This may be due to incomplete installation or other operating system conditions. If you do not find the same files/folders/registry information, please proceed to the next step.
Step 3
Restore your system's Master Boot Record (MBR)
To restore your system's Master Boot Record (MBR):
• On Windows 2000, XP, and Server 2003:
- Insert your Windows Installation CD into your CD drive then restart your computer.
- When prompted, press any key to boot from the CD.
- On the Main Menu, type r to enter the Recovery Console.
(Note for Windows 2000: After pressing r, type c to choose the Recovery Console on the repair options screen.) - Type the number that corresponds to the drive and folder that contains Windows (usually C:\WINDOWS) and press Enter.
- Type your Administrator password and press Enter.
- In the input box, type the following then press Enter:
fixmbr {affected drive} - Type exit and press Enter to restart the system normally.
• On Windows Vista, 7, and Server 2008:
- Insert your Windows Installation DVD into the DVD drive, then press the restart button on your computer.
- When prompted, press any key to boot from the DVD.
- Depending on your Windows Installation DVD, you might be required to choose the installation language. On the Install Windows window, choose your language, locale, and keyboard layout or input method. Click Repair your computer.
- Select Use recovery tools that can help fix problems starting Windows. Select your installation of Windows. Click Next.
- If the Startup Repair window appears, click Cancel, Yes, then Finish.
- In the System Recovery Options menu, click Command Prompt.
- In the Command Prompt window, type the following then press Enter:
BootRec.exe /fixmbr - Type exit and press Enter to close the Command Prompt window.
- Click Restart to restart your computer normally.
• On Windows 8, 8.1, and Server 2012:
- Insert your Windows Installation DVD in the DVD drive, then restart your computer.
- When prompted, press any key to boot from the DVD.
- Depending on your Windows Installation DVD, you might be required to select the keyboard layout. Then on the Windows Setup window, choose your language, locale, and input method. Click Next, then click Repair your computer.
- Click Troubleshoot>Advanced Options>Command Prompt.
- In the Command Prompt window, type the following then press Enter:
BootRec.exe /fixmbr - Type exit and press Enter to close the Command Prompt window.
- Click Continue to restart the system normally.
Step 4
Search and delete this file
- %ProgramData%\dllhost.dat
Step 5
Scan your computer with your Trend Micro product to delete files detected as RANSOM_PETYA.SM4. If the detected files have already been cleaned, deleted, or quarantined by your Trend Micro product, no further step is required. You may opt to simply delete the quarantined files. Please check the following Trend Micro Support pages for more information:
Step 6
Restore encrypted files from backup.
Did this description help? Tell us how we did.