BKDR_APOLMY.C

 Analysis by: Anthony Joe Melgarejo

 ALIASES:

Trojan:Win64/Apolmy.A (Microsoft)

 PLATFORM:

Windows 7 and later

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

  • Threat Type: Backdoor

  • Destructiveness: No

  • Encrypted: No

  • In the wild: Yes

  OVERVIEW

This backdoor uses Windows Task Scheduler to create a scheduled task that executes the dropped copy.

It executes commands from a remote malicious user, effectively compromising the affected system.

It takes advantage of certain vulnerabilities.

  TECHNICAL DETAILS

File Size:

Varies

File Type:

EXE

Memory Resident:

No

Initial Samples Received Date:

26 Nov 2014

Arrival Details

This malware arrives via the following means:

Installation

This backdoor drops and executes the following files:

  • C:\Users\Public\doc.exe - also detected as BKDR_APOLMY.C in a 32-bit system and BKDR64_APOLMY.C in a 64-bit system
  • C:\Users\Public\test.exe - detected as TROJ64_APOLMY.C

It uses Windows Task Scheduler to create a scheduled task that executes the dropped copy.

Autostart Technique

The scheduled task executes the malware every:

  • log on of any user

Backdoor Routine

This backdoor executes the following commands from a remote malicious user:

  • 000 - save data received to C:\Users\{username}\AppData\Local\Temp\notepad1.exe
  • 001 - deletes C:\Users\{username}\AppData\Local\Temp\notepad.exe and C:\Users\{username}\AppData\Local\Temp\newnotepad.exe
  • 002 - exit
  • 003 - download from URL received and save to C:\Users\{username}\AppData\Local\Temp\notepad.exe
  • 004 - save data received to C:\Users\{username}\AppData\Local\Temp\notepad2.exe
  • 005 - join notepad1.exe and notepad2.exe and save to C:\Users\{username}\AppData\Local\Temp\newnotepad.exe, then execute.
  • 006 - upload C:\Users\{username}\AppData\Local\Temp\note.txt
  • 007 - execute data received using "cmd.exe /C "

It connects to the following URL(s) to send and receive commands from a remote malicious user:

  • {BLOCKED}2.{BLOCKED}7.198.103:1913
  • {BLOCKED}2.{BLOCKED}4.60.229:81

Other Details

This backdoor takes advantage of the following vulnerabilities:

NOTES:

The commands this backdoor receive has the following format:

  • {3-digit command ID}{data/command (optional)} e.g. 007 net user hacker y0ur0wn3d /add

The path this malware used are hardcoded. Therefore it only works in Windows 7 and later versions by default since C:\Users\Public and C:\Users\{username}\AppData\Local\Temp only existsi n the aforementioned versions.

The file C:\Users\Public\doc.exe is terminated and deleted after the execution of C:\Users\Public\test.exe.

  SOLUTION

Minimum Scan Engine:

9.700

Step 1

Before doing any scans, Windows XP, Windows Vista, and Windows 7 users must disable System Restore to allow full scanning of their computers.

Step 2

Remove malware/grayware files dropped/downloaded by BKDR_APOLMY.C. (Note: Please skip this step if the threats listed below have already been removed.)

Step 3

Identify and terminate files detected as BKDR_APOLMY.C

[ 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 the Scheduled Tasks added by this malware/grayware

[ Learn More ]

To delete the added Scheduled Task file:

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

  1. Open the Windows Scheduled Tasks. To do this, click Start>Programs>Accessories>System Tools>Scheduled Tasks.
  2. Double-click on a .JOB file.
  3. Check if the malware path and file name exists in the .JOB file. To do this, check the value in the Run field.
  4. If found, select the .JOB file then press SHIFT+DELETE to permanently delete the file.
  5. Repeat the steps above for the remaining .JOB files.

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 of the Task Scheduler Window, click Task Scheduler Library.
  3. In the upper-middle panel, click a Task.
  4. In the lower middle panel, click the Actions tab
  5. Check if the malware path and file name exists in the task. To do this, check the value in the Details column under the Actions tab.
  6. If found, select the task and press DELETE and click Yes to delete the task.
  7. Repeat the steps above for the remaining tasks.

Step 5

Search and delete this file

[ 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.
  • C:\Users\{username}\AppData\Local\Temp\notepad1.exe
  • C:\Users\{username}\AppData\Local\Temp\notepad2.exe
  • C:\Users\{username}\AppData\Local\Temp\newnotepad.exe
  • C:\Users\{username}\AppData\Local\Temp\note.txt

Step 6

Scan your computer with your Trend Micro product to delete files detected as BKDR_APOLMY.C. 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 7

Download and apply these security patches Refrain from using these products until the appropriate patches have been installed. Trend Micro advises users to download critical patches upon release by vendors.


Did this description help? Tell us how we did.