RANSOM_RANPHP.A

 Analysis by: Johnlery Triunfante

 ALIASES:

Trojan-Ransom.PHP.Agent.p (KASPERSKY)

 PLATFORM:

Windows

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

  • Threat Type: Ransomware

  • Destructiveness: No

  • Encrypted: Yes

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Spammed via email, Dropped by other malware, Downloaded from the Internet


This Ransomware arrives as an attachment to email messages spammed by other malware/grayware or malicious users. It 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.

  TECHNICAL DETAILS

File Size:

78,193 bytes

File Type:

PHP

Memory Resident:

Yes

Initial Samples Received Date:

29 Jul 2017

Payload:

Displays graphics/image, Displays message/message boxes, Encrypts files

Arrival Details

This Ransomware arrives as an attachment to email messages spammed by other malware/grayware or malicious users.

It 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 files:

  • {malware path}\{malware name}.db - contains list of encrypted files and keys
  • {malware path}\{malware name}.bmp - used as wallpaper
  • {malware path}\{malware name}.hta - used as ransom note

Other System Modifications

This Ransomware changes the desktop wallpaper by modifying the following registry entries:

HKEY_CURRENT_USER\Control Panel\Desktop
Wallpaper = "{malware path}\{malware name}.bmp"

It sets the system's desktop wallpaper to the following image:

Other Details

This Ransomware does the following:

  • It executes the following commands:
    • cmd.exe /c "RUNDLL32.EXE user32.dll, UpdatePerUserSystemParameters"
    • cmd.exe /c "reg add "HKCU\Control Panel\Desktop" /v Wallpaper /f /t REG_SZ /d "{malware path}\{malware name}.bmp""
    • cmd.exe /c "mshta.exe "{malware path}\{malware name}.hta""

Ransomware Routine

This Ransomware encrypts files with the following extensions:

  • .123
  • .602
  • .dif
  • .docb
  • .docm
  • .dot
  • .dotm
  • .dotx
  • .hwp
  • .mml
  • .odg
  • .odp
  • .ods
  • .otg
  • .otp
  • .ots
  • .ott
  • .pot
  • .potm
  • .potx
  • .ppam
  • .ppsm
  • .ppsx
  • .pptm
  • .sldm
  • .sldx
  • .slk
  • .stc
  • .std
  • .sti
  • .stw
  • .sxc
  • .sxd
  • .sxm
  • .sxw
  • .txt
  • .uop
  • .uot
  • .wb2
  • .wk1
  • .wks
  • .xlc
  • .xlm
  • .xlsb
  • .xlsm
  • .xlt
  • .xltm
  • .xltx
  • .xlw
  • .xml
  • .asp
  • .bat
  • .brd
  • .c
  • .cmd
  • .dch
  • .dip
  • .jar
  • .js
  • .rb
  • .sch
  • .sh
  • .vbs
  • .3g2
  • .fla
  • .m4u
  • .swf
  • .bmp
  • .cgm
  • .djv
  • .gif
  • .nef
  • .png
  • .db
  • .dbf
  • .frm
  • .ibd
  • .ldf
  • .myd
  • .myi
  • .onenotec2
  • .sqlite3
  • .sqlitedb
  • .paq
  • .tbk
  • .tgz
  • .3dm
  • .asc
  • .lay
  • .lay6
  • .ms11
  • .ms11
  • .crt
  • .csr
  • .key
  • .p12
  • .pem
  • .qcow2
  • .vmx
  • .aes
  • .zip
  • .rar
  • .r00
  • .r01
  • .r02
  • .r03
  • .7z
  • .tar
  • .gz
  • .gzip
  • .arc
  • .arj
  • .bz
  • .bz2
  • .bza
  • .bzip
  • .bzip2
  • .ice
  • .xls
  • .xlsx
  • .doc
  • .docx
  • .pdf
  • .djvu
  • .fb2
  • .rtf
  • .ppt
  • .pptx
  • .pps
  • .sxi
  • .odm
  • .odt
  • .mpp
  • .ssh
  • .pub
  • .gpg
  • .pgp
  • .kdb
  • .kdbx
  • .als
  • .aup
  • .cpr
  • .npr
  • .cpp
  • .bas
  • .asm
  • .cs
  • .php
  • .pas
  • .class
  • .py
  • .pl
  • .h
  • .vb
  • .vcproj
  • .vbproj
  • .java
  • .bak
  • .backup
  • .mdb
  • .accdb
  • .mdf
  • .odb
  • .wdb
  • .csv
  • .tsv
  • .sql
  • .psd
  • .eps
  • .cdr
  • .cpt
  • .indd
  • .dwg
  • .ai
  • .svg
  • .max
  • .skp
  • .scad
  • .cad
  • .3ds
  • .blend
  • .lwo
  • .lws
  • .mb
  • .slddrw
  • .sldasm
  • .sldprt
  • .u3d
  • .jpg
  • .jpeg
  • .tiff
  • .tif
  • .raw
  • .avi
  • .mpg
  • .mp4
  • .m4v
  • .mpeg
  • .mpe
  • .wmf
  • .wmv
  • .veg
  • .mov
  • .3gp
  • .flv
  • .mkv
  • .vob
  • .rm
  • .mp3
  • .wav
  • .asf
  • .wma
  • .m3u
  • .midi
  • .ogg
  • .mid
  • .vdi
  • .vmdk
  • .vhd
  • .dsk
  • .img
  • .iso

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

  • winnt
  • boot
  • system
  • windows
  • tmp
  • temp
  • program
  • appdata
  • application
  • roaming
  • msoffice
  • temporary
  • cache
  • recycle

NOTES:

This ransomware displays the following window as its ransom note:

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

13.502.08

FIRST VSAPI PATTERN DATE:

29 Jun 2017

VSAPI OPR PATTERN File:

13.503.00

VSAPI OPR PATTERN Date:

30 Jun 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

Restart in Safe Mode

[ Learn More ]

Step 4

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_CURRENT_USER\Control Panel\Desktop
    • Wallpaper = "{malware path}\{malware name}.bmp"

Step 5

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}\{malware name}.db
  • {malware path}\{malware name}.bmp
  • {malware path}\{malware name}.hta

Step 6

Restart in normal mode and scan your computer with your Trend Micro product for files detected as RANSOM_RANPHP.A. 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 7

Restore encrypted files from backup.

Step 8

Reset your Desktop properties

[ Learn More ]


Did this description help? Tell us how we did.