Threat Description

Rootkit:​W32/HacDef

Details

Aliases:Troj/HacDef, Backdoor.HackDefender, W32/Hacdef
Category:Malware
Type:Rootkit
Platform:W32

Summary



A program or set of programs which hides itself by subverting or evading the computer's security mechanisms, then allows remote users to secretly control the computer's operating system.



Removal



Automatic Disinfection

Allow F-Secure Anti-Virus to disinfect the relevant files.

For more general information on disinfection, please see Removal Instructions.

Manual Actions

If a suspicious hidden file is detected and FSAV does not immediately remove the file, there are several actions you can perform by manually selecting one of the displayed option:

  • If you don't want to do anything about the hidden item, select "None" as the action
  • If you don't want to be notified about the file in the future, select "Exclude" as the action
  • If you are sure the item is not part of a normal program, you can rename it by selecting "Rename" as the action. This will prevent the hidden program from starting in the future. You should use the "Rename" action very carefully, because renaming important files may break the computer.


Technical Details



Rootkit:W232/HacDef is the detection name for Hacker Defender, a user-mode rootkit that modifies several Windows and Native API functions to allow it to hide information from other applications.

Hacker Defender also implements a backdoor and port redirector that operates through TCP ports opened by existing services. This means it is not possible to find the hidden backdoor through traditional means, like launching a remote port scan against the compromised machine.

Hacker Defender is one of the most widely deployed rootkits in the wild. it is publicly available in both in binary and source code format. There also exist private versions which have been customized the attacker's demands. These private rootkits might include features such as:

  • Logoner for collecting user logon credentials
  • Internal inifile for embedding the inifile into the executable
  • Antidetection engine for circumventing modern rootkit detectors

The technical information below is based on the public versions.

Installation

Hacker Defender consists of two files: one executable file (.exe) and one configuration file (.ini). The configuration file is used to define the criteria for hiding items and to specify how certain rootkit components will be named when they are installed into the system.

The rootkit requires administrative privileges to install. To do so, it installs itself as a service, which will start automatically during system startup.

In addition, Hacker Defender installs and loads a kernel-mode driver that implements two support functions utilized by the user-mode components. First, it adds system privileges into every process defined as a root process in the configuration file. Second, it helps the rootkit’s user-mode components identify any handle pointing to a hidden object.

Infection

On execution, Hacker Defender infects every running process by allocating memory from the remote process and writing the payload directly into it. It then installs the inline hooks by patching function entry points with relative jumps pointing to the payload. When the infected process dynamically loads any of the above-mentioned DLLs or creates a new process, the payload makes sure they will also get infected.

To successfully infect a system, the rootkit has to be executed with administrative privileges.

Stealth

Hacker Defender allows the intruder to hide the following items to conceal information from other user-mode applications:

  • Files
  • Processes
  • Registry keys and values
  • System services and drivers
  • Allocated memory
  • Handles
  • Inbound and outbound TCP connections

Criteria for the hidden items are defined in the configuration file.

Hacker Defender hides information by modifying the execution path of the following hooked Windows and Native API functions :

Ntdll.dll:

  • NtQuerySystemInformation
  • NtOpenProcess
  • NtQueryDirectoryFile
  • NtVdmControl
  • NtCreateFile
  • NtOpenFile
  • NtQueryVolumeInformationFile
  • NtEnumerateKey
  • NtEnumerateValueKey
  • NtReadVirtualMemory
  • NtDeviceIoControlFile
  • NtResumeThread
  • LdrInitializeThunk
  • LdrLoadDll

Kernel32.dll:

  • ReadFile

AdvApi32.dll:

  • EnumServiceGroupW
  • EnumServicesStatusExW
  • EnumServicesStatusExA
  • EnumServicesStatusA

Ws2_32.dll:

  • Recv
  • WSARecv

This technique allows the rootkit to alter data passing to and from the hooked function

Registry

During installation the rootkit drops a driver (.sys) to the same directory, loads it and creates two registry keys:

  • HKLM\SYSTEM\CurrentControlSet\Services\[service_name]
  • HKLM\SYSTEM\CurrentControlSet\Services\[driver_name]

In addition, Hacker Defender makes sure it will be executed also in safe mode by adding the following registry keys:

  • HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Minimal\[service_name]
  • HKLM\SYSTEM\CurrentControlSet\Control\SafeBoot\Network\[service_name]

It should be noted that strings [service_name] and [driver_name] can be defined by the intruder in the configuration file. In addition, common tools will not be able to show the registry keys if the rootkit is active.






SUBMIT A SAMPLE

Suspect a file or URL was wrongly detected? Submit a sample to our Labs for analysis

Submit Now

Give And Get Advice

Give advice. Get advice. Share the knowledge on our free discussion forum.

Learn More