Analysis by: Arvin Roi Macaraeg
 Modified by: Maureen Reyes

ALIASES:

Trojan:Win32/Bluteal!rfn (Microsoft), HEUR:Trojan.PowerShell.Generic (Kaspersky)

 PLATFORM:

Windows

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

  • Threat Type: Trojan

  • Destructiveness: No

  • Encrypted:

  • In the wild: Yes

  OVERVIEW

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.

  TECHNICAL DETAILS

File Size: 2,997,721 bytes
File Type: PS1
Memory Resident: Yes
Initial Samples Received Date: 06 Mar 2019

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:

  • %User Temp%\{Random Numbers}.bat
  • %User Temp%\{Random}.log
  • %User Temp%\{Random}.exe
  • %User Temp%\{Random}.tmp
  • %User Startup%\{Random}.exe
  • %Windows%{Random}.exe
  • %Application Data%\{Random}.exe
  • %Application Data%\Microsoft\cred.ps1
  • %Temp%\appdatad.ini

(Note: %User Temp% is the current user's Temp folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Temp on Windows 2000, XP, and Server 2003, or C:\Users\{user name}\AppData\Local\Temp on Windows Vista, 7, and 8.. %User Startup% is the current user's Startup folder, which is usually C:\Windows\Profiles\{user name}\Start Menu\Programs\Startup on Windows 98 and ME, C:\WINNT\Profiles\{user name}\Start Menu\Programs\Startup on Windows NT, C:\Documents and Settings\{User name}\Start Menu\Programs\Startup on Windows XP, or C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup on Windows Vista, 7, and 8.. %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.. %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000, XP, and Server 2003, or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, and 8.. %Temp% is the Windows temporary folder, where it usually is C:\Windows\Temp on all Windows operating system versions.)

Other System Modifications

This Trojan adds the following registry keys:

HKEY_LOCAL_MACHINE\Software\Microsoft\
RFC1156Agent

HKEY_LOCAL_MACHINE\Software\Microsoft\
RFC1156Agent\CurrentVersion

HKEY_LOCAL_MACHINE\Software\Microsoft\
RFC1156Agent\CurrentVersion\Parameters

Other Details

This Trojan connects to the following possibly malicious URL:

  • http://p.{BLOCKED}h.com/upgrade.php?ver=3&mac={MAC Address}&av=&ver=6.1.7601&bit={32 or 64 BIT}
  • http://{BLOCKED}.{BLOCKED}.128.144/install.exe
  • http://ii.{BLOCKED}g.com/t.php?ID={Computer Name}&GUID={GUID}&MAC={MAC Address}&OS=W{OS Version}&CARD={Card Information}&_T=1553225127
  • http://info.{BLOCKED}y.com/e.png?id={Computer Name}&mac={MAC Address}&OS={OS Version}&BIT={32 or 64 BIT}&IT={Date and Time of Installation}&c=1&VER=8&d=0&from=&mpass=123456&size=6966528&num=0&sa=&dig=0&mdl=0
  • http://{BLOCKED}.{BLOCKED}.107.137/status.json?allv2&mac={MAC Address}&av=&ver=6.1.7601&bit=32-bit&flag2=True&domain={Domain}&user={Username}
  • http://ip.{BLOCKED}2.pl/raw
  • http://{BLOCKED}p.com/

It adds the following scheduled tasks:

  • Name: Credentials
    Trigger: At 7:00 AM on {date of Installation} - After triggered, repeat every 1 hour indefinitely
    Action: powershell –nop –w hidden –ep bypass –f %Application Data%\Microsoft\cred.ps1
  • Name: {Random Name}
    Trigger: At 7:00 AM on {date of Installation} - After triggered, repeat every 00:05:00 indefinitely
    Action: cmd.exe /c %Windows%\{Random}.exe
  • Name: {Random Name}
    Trigger: At 7:00 AM on {date of Installation} - After triggered, repeat every 00:05:00 indefinitely
    Action: cmd.exe /c %Windows%\{Random}.exe

(Note: %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000, XP, and Server 2003, or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, and 8.. %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.)

  SOLUTION

Minimum Scan Engine: 9.850
FIRST VSAPI PATTERN FILE: 14.856.01
FIRST VSAPI PATTERN DATE: 06 Mar 2019
VSAPI OPR PATTERN File: 14.851.00
VSAPI OPR PATTERN Date: 07 Mar 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.A

[ 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

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\Microsoft\RFC1156Agent\CurrentVersion
    • Parameters
  • In HKEY_LOCAL_MACHINE\Software\Microsoft\RFC1156Agent
    • CurrentVersion
  • In HKEY_LOCAL_MACHINE\Software\Microsoft
    • RFC1156Agent

Step 5

  1. Open a command prompt.
    • For Windows 2000, Windows XP, and Windows Server 2003 users, click Start>Run. In the Search box, type CMD then press Enter.
    • For Windows Vista, Windows 7, and Windows Server 2008 users, click Start, type CMD in the Search input field then press Enter.
    • For Windows 8, Windows 8.1, and Windows Server 2012 users, right-click on the lower-left corner of the screen, click Command Prompt.
  2. In the CMD console, type the following:

    ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [+I | -I] [drive:][path][file name] [/S [/D] [/L]]

    Where:
    + Sets an attribute.
    - Clears an attribute
    R Read-only file attribute
    A Archive file attribute
    S System file attribute
    H Hidden file attribute
    I Not content indexed file attribute
    [drive:][path][filename]
    Specifies a file or files for attrib to process
    /S Processes matching files in the current folder and all subfolders.
    /D Processes folders
    /L Work on the attributes of the Symbolic Link versus the target of the Symbolic Link
    Example:
    To unhide all files and folders (including subfolders) in drive D:
    ATTRIB –H D:\* /S /D
  3. Repeat Step 3 for folders and files in other drives or folders.

Step 6

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.  
  • %User Temp%\{Random Numbers}.bat
  • %User Temp%\{Random}.log
  • %User Temp%\{Random}.exe
  • %User Temp%\{Random}.tmp
  • %User Startup%\{Random}.exe
  • %Windows%{Random}.exe
  • %Application Data%\{Random}.exe
  • %Application Data%\Microsoft\cred.ps1
  • %Temp%\appdatad.ini

Step 7

Scan your computer with your Trend Micro product to delete files detected as Trojan.PS1.PCASTLE.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 the following Trend Micro Support pages for more information:


Did this description help? Tell us how we did.