Rakhni
Overview
Executive Summary
Rakhni is a notorious and highly versatile malware family that originally emerged as Ransomware but evolved into a multifaceted threat capable of acting as both a crypto-locker and a persistent Cryptocurrency Miner. Developed in Delphi, Rakhni is particularly dangerous because it dynamically assesses the infected environment, choosing whether to deploy ransomware or a stealthy cryptominer based on the target's perceived value and processing power.Infection Vector and Dynamic Execution
Rakhni is predominantly distributed via massive spam campaigns containing malicious attachments (often disguised as PDFs or Office documents containing macro exploits) or via exploit kits. Upon execution, Rakhni performs a series of environmental checks that dictate its behavior:- The Decision Matrix: The malware checks for the presence of a specific folder (often related to Bitcoin Core). If it finds evidence of high-value cryptocurrency activity, it will likely deploy the Ransomware module. If the machine appears to be a standard workstation with sufficient CPU power, it will deploy the Cryptominer (typically XMRig for mining Monero) to generate long-term, stealthy income.
- Ransomware Operations: If triggered, the ransomware module encrypts a wide range of files using strong cryptography, appending specific extensions (like `.locked` or `.rakhni`) to the files, and drops a ransom note demanding payment.
- Cryptomining Operations: If the miner is deployed, Rakhni establishes persistence, often utilizing process hollowing to inject the XMRig mining payload into legitimate Windows processes (like `svchost.exe`) to hide its CPU usage from casual inspection.
Threat Assessment
A Rakhni infection is a severe incident with dual implications. The ransomware payload causes immediate, catastrophic data loss and operational downtime. The cryptomining payload, while stealthier, severely degrades system performance, increases hardware wear, and indicates a critical failure in endpoint security controls.Remediation and Eradication
- Endpoint Isolation: Isolate the infected endpoint immediately to sever communication with the attacker's C2 infrastructure (halting both encryption key exchange and cryptomining pool communication).
- Decryption Tools: Rakhni is one of the older ransomware families, and significant flaws were found in its cryptography. Free decryption tools (often provided by Kaspersky or the "No More Ransom" project) are available for many variants of Rakhni. Do not pay the ransom.
- Complete System Re-image: Whether acting as ransomware or a miner, Rakhni establishes deep persistence and often drops secondary malware. A complete wipe and re-image of the system is the recommended remediation strategy.
Known aliases
Threat reports may refer to this family under multiple names:
MITRE ATT&CK Techniques
This family has been observed using the following ATT&CK techniques: T1486 T1496 T1055.012
Generated Detections (Boilerplate)
These YARA and Sigma rules are auto-generated based on the family name and aliases. They must be heavily tuned before deployment in a production environment.
YARA Rule
rule MALWARE_WIN_RAKHNI {
meta:
description = "Detects Rakhni (ransomware)"
author = "SystemHelpdesk Boilerplate Generator"
date = "2026-07-06"
strings:
$s1 = "rakhni" ascii wide nocase
$s2 = "trojan-ransom.win32.rakhni" ascii wide nocase
$s3 = "coinminer.rakhni" ascii wide nocase
$s4 = "win32/rakhni" ascii wide nocase
condition:
uint16(0) == 0x5a4d and any of them
}Sigma Rule
title: Suspicious Rakhni Activity
id: 23ede83249dad813c74024ed83f71018
status: experimental
description: Detects generic indicators of the rakhni malware family.
logsource:
category: process_creation
product: windows
detection:
selection:
Image|endswith:
- '\cmd.exe'
- '\powershell.exe'
CommandLine|contains:
- "*rakhni*"
- "*trojan-ransom.win32.rakhni*"
- "*coinminer.rakhni*"
- "*win32/rakhni*"
condition: selection
level: mediumReferences & External Analysis
- Search "rakhni" on VirusTotal (External Analysis)
Frequently Asked Questions
How do I remove the Rakhni Ransomware from Windows?
Manual removal of Rakhni 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 Rakhni a virus or a Ransomware?
Rakhni is classified as a Ransomware. Unlike traditional viruses that infect files, modern malware like Rakhni typically operates as a standalone payload designed to compromise systems, steal data, or deploy secondary stage implants.
What are the main symptoms of a Rakhni infection?
Symptoms of Rakhni 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.
Related Families (Category: ransomware)
Explore other malware families in the same category:
Protect Your Network Against Ransomwares
Want to prevent Rakhni and similar threats from compromising your organization? Read our comprehensive defensive guide: Ransomware Protection Guide.
Machine-readable
Get this profile as JSON: https://jordan123234-malware-families-explorer.static.hf.space/api/rakhni.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.