TrojanSpy.Win32.AVEMARIA.E

 Analysis by: Earle Maui Earnshaw

 ALIASES:

Trojan.Win32.Crypt (Ikarus); Trojan:Win32/Casdet!rfn(Microsoft); Trojan-Spy.Win32.AveMaria.we(Kaspersky)

 PLATFORM:

Windows

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

  • Threat Type: Trojan Spy

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

Infection Channel:

Downloaded from the Internet, Dropped by other malware


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

It connects to a website to send and receive information.

It logs a user's keystrokes to steal information.

  TECHNICAL DETAILS

File Size:

307,200 bytes

File Type:

EXE

Memory Resident:

No

Initial Samples Received Date:

24 Apr 2019

Payload:

Connects to URLs/IPs, Steals information, Elevate privileges

Arrival Details

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

  • %User Temp%\ellocnak.xml
  • %Application Data%{9 Random Characters}.exe -> detected as Trojan.Win32.MIMIKATZ.ADY
  • %System%\dismcore.dll -> detected as Trojan.Win32.ANTIAV.AB

It drops the following non-malicious file:

  • %User Temp%\nss3.dll
  • %User Temp%\mozglue.dll
  • %User Temp%\softokn3.dll
  • %User Temp%\msvcp140.dll
  • %User Temp%\vcruntime140.dll
  • %User Temp%\freebl3.dll

(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.)

It adds the following processes:

  • %System%\cmd.exe
  • powershell add-MpPreference -executionPath C:\
  • "%System%\dism.exe" /online /norestart /apply-unattend:"%User Temp%\ellocnak.xml" -> executed via DISM Dll hijacking vulnerability for UAC bypass

(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.. %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.)

It injects codes into the following process(es):

  • %System%\cmd.exe

(Note: %System% is the Windows system folder, where it usually is C:\Windows\System32 on all Windows operating system versions.)

Other System Modifications

This Trojan Spy adds the following registry entries as part of its installation routine:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\
Windows NT\CurrentVersion\Winlogon
AllowMultipleTSSessions = 0

It modifies the following registry entries:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Terminal Server
fDenyTSConnections = 0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Terminal Server\Licensing Core
EnableConcurrentSessions = 0

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Terminal Server\AddIns\
Clip Redirector
Name = RDPCLip

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\
Control\Terminal Server\AddIns\
Clip Redirector
Type = 3

Backdoor Routine

This Trojan Spy connects to the following websites to send and receive information:

  • {BLOCKED}eys.{BLOCKED}dns.com
  • {BLOCKED}.{BLOCKED}.123.196

Download Routine

This Trojan Spy accesses the following websites to download files:

  • http://{BLOCKED}.{BLOCKED}.225.104/dll/upnp.exe

It connects to the following URL(s) to download its component file(s):

  • http://{BLOCKED}.{BLOCKED}.225.104/dll/sogtokn3.dll
  • http://{BLOCKED}.{BLOCKED}.225.104/dll/msvcp140.dll
  • http://{BLOCKED}.{BLOCKED}.225.104/dll/mozglue.dll
  • http://{BLOCKED}.{BLOCKED}.225.104/dll/vcruntime140.dll
  • http://{BLOCKED}.{BLOCKED}.225.104/dll/freebl3.dll
  • http://{BLOCKED}.{BLOCKED}.225.104/dll/nss3.dll

Information Theft

This Trojan Spy logs a user's keystrokes to steal information.

Other Details

This Trojan Spy connects to the following URL(s) to check for an Internet connection:

  • https://google.com

It does the following:

  • Steals user credentials such as user name and passwords, which are related to the following application:
    • Microsoft Outlook
    • HTTP
    • IMAP
    • POP3
    • SMTP
    • Windows Messaging
    • Firefox Browser -> steal all credentials stored
    • Thunderbird
  • It can elevate its privilege via the following:
    • UAC bypass via DLL hijacking

  SOLUTION

Minimum Scan Engine:

9.850

FIRST VSAPI PATTERN FILE:

14.958.08

FIRST VSAPI PATTERN DATE:

24 Apr 2019

VSAPI OPR PATTERN File:

14.959.00

VSAPI OPR PATTERN Date:

25 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

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_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon
    • AllowMultipleTSSessions = "0"

Step 4

Restore this modified 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_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
    • From: fDenyTSConnections = "0"
  • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server
    • To: fDenyTSConnections = "1"
  • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core
    • From: EnableConcurrentSessions = "0"
  • In HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\Licensing Core
    • To: EnableConcurrentSessions = "1"

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.
  • %User Temp%\nss3.dll
  • %User Temp%\mozglue.dll
  • %User Temp%\softokn3.dll
  • %User Temp%\msvcp140.dll
  • %User Temp%\vcruntime140.dll
  • %User Temp%\freebl3.dll
  • %User Temp%\ellocnak.xml
  • %Application Data%\{9 Random Characters}.exe
  • %System%\dismcore.dll

Step 6

Scan your computer with your Trend Micro product to delete files detected as TrojanSpy.Win32.AVEMARIA.E. 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.