Daily Blog #121: Sunday Funday 10/20/13 Winner!

Sunday Funday by David Cowen - Hacking Exposed Computer Forensics Blog

Hello Reader,
           It was very much worth extending the contest for another day, I received several good submissions this time and the anonymous winner below was the best of those. 
         
The Challenge:
List and explain all of the methods of persistence for malware available in Windows 7 that is written to the file system/registry.

The Winning Answer:
Anonymous

The goal of many malware programs is to remain on an infected host and run silently in the background without intervention from outside sources. In order to do this the malware installs configuration settings in the following areas of the Windows operating system:

The Registry

The registry is used to store system wide configuration information and the operating system will use it as a guide to run various system services and drivers. The registry is consulted at start up by the boot loader who will use the values it finds in various keys to load a range of services and executables.  The following keys are often used by malware to achieve persistence:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce
HKLM\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\TerminalServer\Install\Software\Microsoft\Windows\CurrentVersion\Run

These keys contain a list of programs that will execute automatically when a user logs.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows
This key can contain a value named “AppInit_DLLs” which stores a list of dlls or Dynamic link libraries that will be automatically loaded with any process that runs in the user context.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost
This registry key contains a list of processes that should be run as services under the svchost.exe program.  These will be automatically loaded by the operating system so this is a prime target for malware executables.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services
This key is often used by malware to ensure that it is executed when the system starts. It contains a list of drivers and services that will be executed by the boot loader. Values under this key contain a start field which can have the following settings:
0x0 To be started by the boot loader
0x1 To be loaded by the kernel
0x2 To be started automatically by the Service Control Manager
0x3 To be started by the user
0x4 Disabled
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\Start Menu
The start-up menu location is contained in this key and some malware has been known to change this value to point to a new malware defined location. This results in the contents of the new location being executed.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Shell
Values under this registry key will be loaded as the shell and by changing this value the malware can ensure that it is executed automatically.
--------------------------------------------------------------------------------------------------------------------------------------
Some registry entries can be altered to ensure the malware remains hidden from view as follows:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced   
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\HideFileExt   
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\Hidden\SHOWALL HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\Folder\SuperHidden\UncheckedValue
These keys are set so that a user cannot select to view hidden files in “organise\folder and search options\ view\” and therefore suspicious malware files are hidden.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\OpenOffice.Doc(any file type)\Default
This value can be changed to associate the file type with a malware executable which will be executed every time the specific file type is run. The values of several of these keys can be changed to ensure the malware is executed.
--------------------------------------------------------------------------------------------------------------------------------------
This key associates a handler for certain file types and malware can add itself which ensures that it is executed each time the particular file is executed.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.mobi (or any file type\OpenWithList
Malware can alter values in these keys to associate as the executable that should open files with the specific extentions eg txt or doc.  The malware is therefore executed whenever the file is opened.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_CURRENT_USER\Software\Mirabilis\ICQ\Agent\Apps\test
This registry key is used by Mirabilis ICQ chat and any programs stored as values in this key will be executed when the Mirabilis program detects an Internet connection. Therefore any malware values stored here will be executed.
--------------------------------------------------------------------------------------------------------------------------------------
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Userinit
Any values stored in this key will be executed when a user logs-in and therefore can provide persistence for malware.
--------------------------------------------------------------------------------------------------------------------------------------

Thanks for sharing anonymous! Good listing with good descriptions, a worthy winner!

Also Read: Daily Blog #120

Post a Comment