Analysis by: John Anthony Banes

ALIASES:

Ransom:Win32/WannaCrypt (Microsoft); Ransom.Wannacry (Symantec); Mal/Wanna-A (Sophos)

 PLATFORM:

Windows

 OVERALL RISK RATING:
 DAMAGE POTENTIAL:
 DISTRIBUTION POTENTIAL:
 REPORTED INFECTION:
 INFORMATION EXPOSURE:

  • Threat Type: Ransomware

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel: Downloaded from the Internet, Dropped by other malware

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 may be dropped by other malware.

It connects to certain websites to send and receive information.

It encrypts files with specific file extensions. It drops files as ransom note.

  TECHNICAL DETAILS

File Size: 229,376 bytes
File Type: EXE
Memory Resident: Yes
Initial Samples Received Date: 11 May 2017
Payload: Encrypts files, Connects to URLs/IPs

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.

It may be dropped by the following malware:

  • WORM_WCRY.H

Installation

This Ransomware adds the following folders:

  • {malware path}\TaskHost

It drops the following file(s)/component(s):

  • {malware path}\!WannaDecryptor!.exe → tool also detected as RANSOM_WCRY.H
  • {malware path}\!WannaDecryptor!.exe.lnk → shortcut to tool
  • {malware path}\c.wry → contains bitcoin address and onion server
  • {malware path}\f.wry → contains a list of encrypted files that will decrypt for free
  • {malware path}\m.wry → ransom note, formatted
  • {malware path}\r.wcy → ransom note
  • {malware path}\t.wry → encrypted component
  • {malware path}\u.wry → tool, also detected as RANSOM_WCRY.H
  • {malware path}\{Random Numbers}.bat → creates a VBS file and deletes this batch file as well as the created VBS file
  • {malware path}\c.vbs → script that creates the shortcut file for tool
  • {malware path}\TaskHost\{Random Characters}.tmp
  • {malware path}\00000000.eky
  • {malware path}\00000000.pky
  • {malware path}\00000000.res
  • {folder of encrypted files}\{random characters}.tmp
  • {folder of encrypted files}\!WannaDecryptor!.exe.lnk → shortcut to tool

Autostart Technique

This Ransomware adds the following registry entries to enable its automatic execution at every system startup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows\CurrentVersion\Run
Microsoft Update Task Scheduler = "{malware path}\taskhcst.exe" /r

Other System Modifications

This Ransomware adds the following registry entries:

HKEY_LOCAL_MACHINE\SOFTWARE\WannaCryptor
wd = {malware path}

Other Details

This Ransomware connects to the following website to send and receive information:

  • {BLOCKED}himrr7jqw6.onion

Ransomware Routine

This Ransomware encrypts files with the following extensions:

  • .123
  • .3dm
  • .3ds
  • .3g2
  • .3gp
  • .602
  • .7z
  • .accdb
  • .aes
  • .ai
  • .ARC
  • .asc
  • .asf
  • .asm
  • .asp
  • .avi
  • .backup
  • .bak
  • .bat
  • .bmp
  • .brd
  • .bz2
  • .cgm
  • .class
  • .cmd
  • .cpp
  • .crt
  • .cs
  • .csr
  • .csv
  • .db
  • .dbf
  • .dch
  • .der
  • .dif
  • .dip
  • .djvu
  • .doc
  • .docb
  • .docm
  • .docx
  • .dot
  • .dotm
  • .dotx
  • .dwg
  • .edb
  • .eml
  • .fla
  • .flv
  • .frm
  • .gif
  • .gpg
  • .gz
  • .hwp
  • .ibd
  • .iso
  • .jar
  • .java
  • .jpeg
  • .jpg
  • .js
  • .jsp
  • .key
  • .lay
  • .lay6
  • .ldf
  • .m3u
  • .m4u
  • .max
  • .mdb
  • .mdf
  • .mid
  • .mkv
  • .mml
  • .mov
  • .mp3
  • .mp4
  • .mpeg
  • .mpg
  • .msg
  • .myd
  • .myi
  • .nef
  • .odb
  • .odg
  • .odp
  • .ods
  • .odt
  • .onetoc2
  • .ost
  • .otg
  • .otp
  • .ots
  • .ott
  • .p12
  • .PAQ
  • .pas
  • .pdf
  • .pem
  • .pfx
  • .php
  • .pl
  • .png
  • .pot
  • .potm
  • .potx
  • .ppam
  • .pps
  • .ppsm
  • .ppsx
  • .ppt
  • .pptm
  • .pptx
  • .ps1
  • .psd
  • .pst
  • .rar
  • .raw
  • .rb
  • .rtf
  • .sch
  • .sh
  • .sldm
  • .sldx
  • .slk
  • .sln
  • .snt
  • .sql
  • .sqlite3
  • .sqlitedb
  • .stc
  • .std
  • .sti
  • .stw
  • .suo
  • .svg
  • .swf
  • .sxc
  • .sxd
  • .sxi
  • .sxm
  • .sxw
  • .tar
  • .tbk
  • .tgz
  • .tif
  • .tiff
  • .txt
  • .uop
  • .uot
  • .vb
  • .vbs
  • .vcd
  • .vdi
  • .vmdk
  • .vmx
  • .vob
  • .vsd
  • .vsdx
  • .wav
  • .wb2
  • .wk1
  • .wks
  • .wma
  • .wmv
  • .xlc
  • .xlm
  • .xls
  • .xlsb
  • .xlsm
  • .xlsx
  • .xlt
  • .xltm
  • .xltx
  • .xlw
  • .zip

It avoids encrypting files with the following strings in their file path:

  • Content.IE5
  • Temporary Internet Files
  • NVIDIA Corporation
  • Windows Photo Viewer
  • Windows Portable Devices
  • Windows Sidebar
  • Windows Mail
  • Mozilla Firefox
  • Internet Explorer
  • Microsoft Office
  • Microsoft Games
  • Microsoft.NET
  • \Python34
  • \Python27
  • \ProgramData
  • \Program Files (x86)
  • \Program Files
  • \WINDOWS

It appends the following extension to the file name of the encrypted files:

  • .WCRY

It drops the following file(s) as ransom note:

  • {malware path}\!Please Read Me!.txt
  • {folder of encrypted files}\!Please Read Me!.txt

It leaves text files that serve as ransom notes containing the following text:

NOTES:

It executes the following commands as part of its preparation for encrypting files:

  • taskkill.exe /f /im Microsoft.Exchange.*
  • taskkill.exe /f /im MSExchange*
  • taskkill.exe /f /im sqlserver.exe
  • taskkill.exe /f /im sqlwriter.exe

This ransomware displays the following ransom window.

  SOLUTION

Minimum Scan Engine: 9.850
FIRST VSAPI PATTERN FILE: 13.398.04
FIRST VSAPI PATTERN DATE: 11 May 2017
VSAPI OPR PATTERN File: 13.399.00
VSAPI OPR PATTERN Date: 12 May 2017

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

Remove the malware/grayware file that dropped/downloaded RANSOM_WCRY.H. (Note: Please skip this step if the threat(s) listed below have already been removed.)

    • WORM_WCRY.H

Step 4

Identify and terminate files detected as RANSOM_WCRY.H

[ Learn More ]
  1. Windows Task Manager may not display all running processes. In this case, please use a third-party process viewer, preferably Process Explorer, to terminate the malware/grayware/spyware file. You may download the said tool here.
  2. If the detected file is displayed in either Windows Task Manager or Process Explorer but you cannot delete it, restart your computer in safe mode. To do this, refer to this link for the complete steps.
  3. If the detected file is not displayed in either Windows Task Manager or Process Explorer, continue doing the next steps.

Step 5

Delete this registry key

[ Learn More ]

Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.

  • In HKEY_LOCAL_MACHINE\SOFTWARE
    • WannaCryptor

Step 6

Delete this registry value

[ Learn More ]

Important: Editing the Windows Registry incorrectly can lead to irreversible system malfunction. Please do this step only if you know how or you can ask assistance from your system administrator. Else, check this Microsoft article first before modifying your computer's registry.

  • In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
    • Microsoft Update Task Scheduler = "{malware path}\taskhcst.exe" /r

Step 7

Search and delete this folder

[ Learn More ]
Please make sure you check the Search Hidden Files and Folders checkbox in the More advanced options option to include all hidden folders in the search result.
  • {malware path}\TaskHost

Step 8

Search and delete these files

[ Learn More ]
There may be some files that are hidden. Please make sure you check the Search Hidden Files and Folders checkbox in the "More advanced options" option to include all hidden files and folders in the search result.  
  • {malware path}\!WannaDecryptor!.exe.lnk
  • {malware path}\!Please Read Me!.txt
  • {malware path}\c.wry
  • {malware path}\f.wry
  • {malware path}\m.wry
  • {malware path}\r.wcy
  • {malware path}\t.wry
  • {malware path}\{Random Numbers}.bat
  • {malware path}\c.vbs
  • {malware path}\TaskHost\{Random Characters}.tmp
  • {malware path}\00000000.eky
  • {malware path}\00000000.pky
  • {malware path}\00000000.res
  • {folder of encrypted files}\{random characters}.tmp
  • {folder of encrypted files}\!WannaDecryptor!.exe.lnk
  • {folder of encrypted files}\!Please Read Me!.txt

Step 9

Scan your computer with your Trend Micro product to delete files detected as RANSOM_WCRY.H. 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 this Knowledge Base page for more information.

Step 10

Restore encrypted files from backup.


Did this description help? Tell us how we did.