Skip to main content
Mallory
Malware

HeadCrab

Tracked since Nov 25, 2025 · Updated 3 months ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
Vulns0Associated
Actors0Associated
ATT&CK12Techniques
IOCs5Tracked
Type
Cryptominer
Capabilities
PersistencePost exploitationDefense evasionProcess injection
Delivery
Landing page
Platforms
Linux

HeadCrab is a custom Redis-targeting malware family used to compromise internet-exposed Redis servers and conscript them into a botnet primarily associated with illicit cryptocurrency mining. Activity attributed to HeadCrab has been observed since at least 2021, and the malware has been linked to large-scale server compromise campaigns affecting well over a thousand Redis instances.

The malware is implemented as a malicious Redis module and is notable for its emphasis on stealth, in-memory execution, and abuse of legitimate Redis functionality. Early variants compromised exposed Redis servers by abusing Redis replication, using master-replica synchronization to deliver and load a malicious module. Once active, HeadCrab operated largely filelessly, minimized disk artifacts, tampered with or truncated Redis logs, and used memory-backed execution mechanisms to hinder forensic recovery and signature-based detection.

HeadCrab exposes attacker-controlled functionality through malicious Redis command handling. Earlier variants introduced custom Redis commands to support remote command execution, encrypted command-and-control, configuration manipulation, and other post-compromise operations. The malware also overrode selected native Redis commands to obstruct inspection and interfere with defensive analysis. Reported capabilities include execution of shell commands, encrypted communications, persistence-oriented configuration changes, and memory-only loading of additional components.

A later evolution, commonly referred to as HeadCrab 2.0, increased stealth by replacing direct on-disk deployment of the main payload with a loader-based approach that receives malware content over the Redis communication channel and stores it in a fileless location on the host. It also abandoned easily detectable custom command names in favor of abusing the legitimate Redis MGET command for covert command-and-control, while preserving normal behavior for benign users. This version additionally manipulated lower-level Redis internals to redirect command processing, making detection more difficult.

HeadCrab is associated with a threat actor of the same name and is focused on Linux-based Redis server environments. Its operational objective has been characterized primarily as resource hijacking for cryptomining, but its command execution and remote-control features make it a broader post-exploitation platform for compromised Redis infrastructure.

Is this in your environment?See whether this family's indicators match your telemetry and which of your assets are exposed to the CVEs associated with it.
Check your exposure
MITRE ATT&CK

Techniques & procedures

12 distinct techniques documented for this family, organized by ATT&CK tactic.

Execution

1 technique
T1059Command and Scripting InterpreterEvidence1

“rdss Executes a command with popen… 0x4/0xD: execute a shell command with HISTFILE… /dev/null.”

Persistence

3 techniques
T1543.002Systemd ServiceEvidence1

“install systemd service or initd service to /etc/ice9j or /etc/init.d/ice9j respectively… masquerade as an sshd service”

T1547.006Kernel Modules and ExtensionsEvidence1

“load a kernel module from memory using init_module syscall”

T1556.006Multi-Factor AuthenticationEvidence1

“adds an LD_PRELOAD entry for each new connection, allowing the threat actor to steal ssh keys.”

Privilege Escalation

2 techniques
T1543.002Systemd ServiceEvidence1

“install systemd service or initd service to /etc/ice9j or /etc/init.d/ice9j respectively… masquerade as an sshd service”

T1547.006Kernel Modules and ExtensionsEvidence1

“load a kernel module from memory using init_module syscall”

Stealth

3 techniques
T1036MasqueradingEvidence1

“The dynamic loader can be used to execute process under its name… bypass security solution… Since the dynamic loader is a legitimate binary…”

T1070.006TimestompEvidence1

“perform a timestomping attack, which modifies the last change time to that of a legitimate file.”

T1620Reflective Code LoadingEvidence1

“Payloads are loaded through memfd, memory-only files… avoiding disk writes.”

Defense Impairment

3 techniques
T1556.006Multi-Factor AuthenticationEvidence1

“adds an LD_PRELOAD entry for each new connection, allowing the threat actor to steal ssh keys.”

T1685Disable or Modify ToolsEvidence1

“some of the Redis default commands… are being overridden… This is done to avoid the malware detection.”

T1685.006Clear Linux or Mac System LogsEvidence1

“logs are deleted using the Redis module framework and API… deletes the Redis log file and empties it… truncating it to size 0.”

Credential Access

1 technique
T1556.006Multi-Factor AuthenticationEvidence1

“adds an LD_PRELOAD entry for each new connection, allowing the threat actor to steal ssh keys.”

Command and Control

2 techniques
T1071Application Layer ProtocolEvidence1

“rdsc… enables to establish an encrypted communication channel with a C2 server… [and] tunnel network to another IP address and port pair…”

T1572Protocol TunnelingEvidence1

“tunnel network to another IP address and port pair… listen to a new connection and tunnel communication back to C2 connection.”

Impact

1 technique
T1496Resource HijackingEvidence1

“main impact… resource hijacking for cryptocurrency mining… XMRIG malware written and executed in-memory.”

Indicators of compromise

Observables

5 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.

View all in app →
Indicator values are available in Mallory. Pivot on every hash, domain, URL, and IP, or pipe them straight into your SIEM.View all in Mallory
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets match these IOCs, which detections are missing, which campaigns to expect next, and what to do in the next 30 minutes.
IOC matching5Match every observed IP, domain, and hash against your live telemetry.
Associated threat actorsGroups linked to this family, with evidence pinned to each claim.
Associated vulnerabilitiesCVEs linked to this family, with the reporting behind each link.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
MITRE ATT&CK mapping12Every documented technique, ranked by evidence weight.
Researcher chatterReddit, Mastodon, and CTI community discussion around this family.