Hacdef
Table of Contents
Overview
Rootkit:Win32/Hacdef (Hacker Defender) is a legendary, historically significant user-mode rootkit. Wide-spread in the mid-2000s, Hacdef was one of the first sophisticated, widely available tools designed specifically to hide the presence of an attacker, their files, and their backdoor connections from the system administrator and early antivirus software (`T1014`).
Understanding Hacdef (User-Mode Rootkits)
To an end-user or system administrator relying on standard Windows tools (like Task Manager or `netstat`), the system appears entirely normal. Hacdef intercepts the API calls made by these tools and actively filters the results. For example, if an attacker drops a file named `evil.exe`, Hacdef ensures that when Explorer asks for a list of files, `evil.exe` is removed from the list before it reaches the screen.
Execution and Hooking Mechanics
Hacdef is deployed *after* an attacker has achieved administrative access. It is a user-mode rootkit, meaning it does not typically load a kernel driver (`.sys`). Instead, it uses API Hooking (`T1056.004`), specifically injecting itself into all running processes and intercepting calls to fundamental Windows APIs (like `FindNextFile`, `EnumProcesses`, `RegEnumKey`). It uses an `.ini` configuration file that tells it exactly which file names, process names, registry keys, and network ports to hide from the OS.
Indicators of Compromise & Impact
The impact is total loss of system integrity and a deeply hidden attacker presence. Because Hacdef hooks user-mode APIs, host-based IoCs are difficult to find with standard tools. Advanced EDR tools detect Hacdef by identifying the inline hooks placed on the API functions in memory. Another classic detection method is cross-view validation (comparing the output of a clean, low-level disk read against the output of the hooked Windows API). Network IoCs involve looking for the hidden backdoors Hacdef is protecting.
MITRE ATT&CK Techniques
Observed techniques used by this family, mapped to our technical analysis hubs and the official MITRE ATT&CK framework:
| Technique | Name | Tactic | Official Spec |
|---|---|---|---|
T1014 | Rootkit (The core functionality of hiding the attacker's presence) | Defense Evasion | ATT&CK ↗ |
T1056.004 | Input Capture: Credential API Hooking (Intercepting system calls to filter output) | Credential Access | ATT&CK ↗ |
Tactical Mitigations
Based on the techniques used by this family, consider the following defensive strategies:
- T1056.004: Monitor for unauthorized keylogging, screen capturing, or web browser API hooking. Deploy EDR to detect API hooking.
MITRE D3FEND™ Defensive Countermeasures
Defensive techniques mapped to counter the offensive tradecraft observed in this family (via the MITRE D3FEND matrix):
| D3FEND ID | Countermeasure Name | Tactic | Countered ATT&CK | Defensive Guidance |
|---|---|---|---|---|
D3-KMC | Kernel Memory Integrity Checking | Harden | T1014 | Enable Hypervisor-Protected Code Integrity (HVCI) and UEFI Secure Boot to prevent unsigned kernel driver execution. |
D3-AHC | API Hook Detection | Detect | T1056.004 | Deploy kernel and userland EDR drivers to monitor SetWindowsHookEx and low-level keyboard hooks. |
Tiered Detection Rules (Cisco CAIRN Model)
Modern threat detection requires multi-layered rule engineering. We classify detections into three operational tiers based on signal fidelity:
Tier 1 Primitive Artifact Rule (Fast Triage)
Matches raw strings and file markers. Vulnerable to binary repacking and simple obfuscation.
rule MALWARE_WIN_HACDEF_T1_ARTIFACT {
meta:
description = "Tier 1 Primitive Artifact: Raw string matches for Hacdef"
tier = "T1 - Primitive Artifact"
confidence = "Low-Medium (Fast Triage)"
author = "SystemHelpdesk Threat Research Desk"
date = "2026-10-14"
strings:
$s1 = "hacdef" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}
Tier 2 Behavioral Context Rule (Process Chains & Sigma)
Tracks parent-child process anomalies and suspicious scripting telemetry. Resilient against file renames.
title: SystemHelpDesk Detection - Hacdef (Backdoor) Execution & Triage
id: 8011bd92-b23a-5883-b80f-78df101f2a61
status: production
description: Detects execution, defense evasion, and persistence behaviors associated
with the Hacdef malware family. Detects proxy execution, reflective DLL loading,
and remote command injection associated with modular enterprise backdoors.
references:
- https://malware-families-catalog.systemhelpdesk.com/families/hacdef
- https://malware-families-catalog.systemhelpdesk.com/defensive/backdoor-rat-protection
- https://malware-families-catalog.systemhelpdesk.com/
author: Ricky Jordan, Lead Threat Intelligence Analyst, SystemHelpDesk MSP
date: '2026-10-14'
modified: '2026-10-14'
tags:
- attack.backdoor
- author.ricky-jordan
- source.systemhelpdesk-mfc
- attack.t1014
- attack.t1056_004
logsource:
category: process_creation
product: windows
detection:
selection_process:
Image|endswith:
- \powershell.exe
- \cmd.exe
- \rundll32.exe
- \regsvr32.exe
CommandLine|contains:
- DownloadString
- IEX(
- '/s /n /u /i:'
- sc create
- start-process
condition: selection_process
falsepositives:
- Legitimate enterprise administrative scripts during approved change windows
- Authorized IT software deployment utilities and backup management agents
level: high
Tier 3 Attribution Fingerprint Rule (High Fidelity)
Deep signature matching distinctive operational fingerprints and payload characteristics.
rule MALWARE_WIN_HACDEF_T3_ATTRIBUTION {
meta:
description = "Tier 3 Attribution Fingerprint: Heuristic detection for Hacdef tradecraft"
tier = "T3 - Attribution Fingerprint"
confidence = "High (Confirmed Family Signature)"
author = "SystemHelpdesk Threat Research Desk"
date = "2026-10-14"
strings:
// Core family identifier & heuristic payload signatures
$attrib_str = "hacdef" ascii wide nocase
$pe_magic = "MZ" ascii
$net_marker = "http" ascii nocase
condition:
uint16(0) == 0x5a4d and ($attrib_str and $net_marker) and filesize < 15MB
}
Containment & Response Steps
Ordered checklist for responders. Adapt to your environment and engage professional support for active incidents.
- Do not attempt to clean a system infected with a rootkit using standard tools; the rootkit controls what those tools see.
- Boot the system from a clean, read-only environment (like an offline AV rescue disk or a Linux Live CD) to inspect the hard drive without the rootkit's interference.
- Analyze the `hxdef.ini` (or similarly named configuration file) to determine exactly what the attacker was hiding (e.g., hidden backdoor ports or dropped executables).
- The safest remediation for a confirmed rootkit infection is a complete wipe and reimage of the system from known-good media.
What to Avoid
Common mistakes during response to this family that can destroy evidence, spread the infection, or worsen recovery.
- Avoid relying on `netstat` or Task Manager to investigate a suspected Hacdef infection; they are actively lying to you.
- Do not connect the infected machine back to the network until it has been completely wiped, as the attacker has persistent, hidden access.
References & External Analysis
- Search "hacdef" on VirusTotal (External Analysis)
- Search "hacdef" on Any.Run (Sandbox Sandbox)
- Search "hacdef" on MalwareBazaar (Malware Samples)
Frequently Asked Questions
What is Hacdef and what threat category does it belong to?
Hacdef is classified as a Backdoor. Documented across security telemetry, it is engineered to execute unauthorized operations, establish persistent footholds on target endpoints, and facilitate malicious campaigns targeting enterprise and individual environments.
How does Hacdef establish persistence and evade defensive controls?
Hacdef typically establishes persistence through registry run keys, scheduled tasks, or service installations, while evading signature-based antivirus solutions through code obfuscation, memory injection, or anti-analysis sandbox checks.
What are the essential incident response steps for mitigating a Hacdef compromise?
Security teams responding to Hacdef should immediately isolate affected endpoints from the network, perform memory triage to capture volatile forensic artifacts, audit registry and startup persistence mechanisms, revoke exposed user credentials, and restore systems from verified, clean backups.
What remote administrative and surveillance capabilities does Hacdef provide to threat actors?
As an interactive backdoor and remote access tool, Hacdef grants operators comprehensive control over the victim host. Common surveillance and management modules include real-time keystroke logging, desktop screen capture, remote VNC streaming, webcam and audio recording, arbitrary shell command execution, reverse proxy pivoting, and bidirectional file transfer capabilities.
How does Hacdef traverse firewalls and sustain resilient command-and-control (C2) connections?
Hacdef establishes persistent outbound TCP or TLS connections back to threat actor infrastructure, effectively bypassing inbound firewall filtering. To maintain connection resilience against IP takedowns, variants frequently employ dynamic DNS services, fallback command servers, encrypted dead-drop resolvers on social platforms, or DNS over HTTPS (DoH) querying.
How do I remove the Hacdef Backdoor from Windows?
Manual removal of Hacdef is highly discouraged as it may leave persistence mechanisms intact. We recommend disconnecting the device from the internet and utilizing a professional incident response service or enterprise-grade EDR software to conduct a full forensic sweep.
Is Hacdef a virus or a Backdoor?
Hacdef is classified as a Backdoor. Unlike traditional viruses that infect files, modern malware like Hacdef typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
What are the main symptoms of a Hacdef infection?
Symptoms of Hacdef can include unexpected system slowness, unauthorized outbound network traffic to unknown IP addresses, disabled security software, and suspicious background processes running from AppData or Temp directories.
Protect Your Network Against Backdoors
Want to prevent Hacdef and similar threats from compromising your organization? Read our comprehensive defensive guide: Backdoor & RAT Protection for Businesses.
📣 Threat Intel Correction or Update?
Notice an outdated IOC, unlisted alias, or disputed attribution? Threat researchers are invited to propose an update on GitHub or contact the SystemHelpDesk research desk. All community revisions are credited in our public CHANGELOG.
Machine-readable
Get this profile as JSON: https://malware-families-catalog.systemhelpdesk.com/api/hacdef.json
Ecosystem & Interactive Environments
This profile is part of the Malware Families Catalog, a public dataset of 2,899 malware families. The catalog is also published across our ecosystem: Hugging Face, Kaggle, Zenodo, Replit, StackBlitz, CodeSandbox, and CodePen.