Dharma
- Type
- Ransomware
- Capabilities
- PersistenceDefense evasionReconnaissanceExtortion
- Delivery
- PhishingMalspam
- Platforms
- Windows
Dharma is a Windows file-encrypting ransomware family that emerged in 2016 as an offshoot of CrySiS and operates through a ransomware-as-a-service affiliate model. Associated with Russian-speaking cybercriminal affiliates, it has affected organizations worldwide, commonly small and medium-sized businesses, with documented victims in healthcare and other industries.
Affiliates commonly compromise exposed Remote Desktop Protocol services using weak, stolen, or leaked credentials, brute force, and password spraying, then manually deploy the ransomware through interactive sessions. Phishing and spam campaigns also distribute Dharma, including campaigns bundling a legitimate, unmodified ESET AV Remover installer as a distraction while encryption runs independently. During network intrusions, operators use external utilities to harvest credentials, discover systems and shares, interfere with security products, and move laterally through RDP. These operator activities are distinct from the ransomware's own functionality.
Dharma encrypts documents, databases, archives, media, source code, and other files on local drives and accessible network shares. Analyzed variants enumerate shares and encrypt newly available drives, but lack autonomous lateral-movement capabilities. Encryption combines AES for file contents with RSA protection of encryption keys. Variants append identifying information and an extension to encrypted filenames and display ransom instructions directing victims to contact attackers for decryption.
The malware establishes persistence through Windows autorun entries and Startup folders, deletes Volume Shadow Copies, and repeatedly terminates selected database and email processes or services to release files for encryption. Analyzed variants also conceal embedded API names using RC4 encryption and resolve them at runtime. Operators additionally disable backups and security controls before deployment to hinder detection and recovery.
Associated vulnerabilities
1 CVE Mallory has correlated with this family across public research and vendor advisories. Each card links to the full Mallory page for that vulnerability.
Techniques & procedures
25 distinct techniques documented for this family, organized by ATT&CK tactic.
Initial Access
4 techniques
Initial Access
Dharma is typically deployed manually through RDP using weak or leaked credentials.
“Dharma, Phobos, and GlobeImposter commonly target small and mid-sized organizations, often through exposed remote desktop services.”
Some of these criminals were dealing with the penetration effort, using multiple mechanisms to compromise IT networks, including brute force attacks, SQL injections, stolen credentials and phishing emails with malicious attachments.
According to the sample that we encountered, the variant arrives through a phishing email, as seen in Figure 1.
Execution
1 technique
Execution
During these sessions, the actors both pass instructions to the CLI and use the graphical user interfaces (GUIs) built into the aforementioned utilities.
Persistence
5 techniques
Persistence
Dharma is typically deployed manually through RDP using weak or leaked credentials.
It then copies itself to the %System% directory using the original filename and creates autorun registry entries under HKLM and HKCU.
“Dharma, Phobos, and GlobeImposter commonly target small and mid-sized organizations, often through exposed remote desktop services.”
Finally, the ransomware will configure itself to automatically start when you login to Windows. This allows it to encrypt new files that are created since it was last executed.
The malware also copies itself into both Start Menu Startup folders.
Privilege Escalation
3 techniques
Privilege Escalation
Dharma is typically deployed manually through RDP using weak or leaked credentials.
Finally, the ransomware will configure itself to automatically start when you login to Windows. This allows it to encrypt new files that are created since it was last executed.
The malware also copies itself into both Start Menu Startup folders.
Stealth
6 techniques
Stealth
Dharma uses the RC4 stream cipher to decrypt embedded strings that contain Windows API function names.
When executed, Dharma uses the RC4 stream cipher to decrypt embedded strings that contain Windows API function names. It resolves these function addresses at runtime.
Fileless delivery also adds a further challenge in removing this threat, as it leaves no trace after execution.
First was the execution of a bat file called shadow.bat, which deletes shadow files vssadmin delete shadows /all
Dharma is typically deployed manually through RDP using weak or leaked credentials.
If the Windows version is older than Windows Vista, or if the mutexes already exist, Dharma exits.
Defense Impairment
2 techniques
Defense Impairment
It then copies itself to the %System% directory using the original filename and creates autorun registry entries under HKLM and HKCU.
Adversaries may modify and/or disable security tools to avoid possible detection of their malware/tools and activities. This may take many forms, such as killing security software processes or services, modifying / deleting Registry keys or configuration files so that tools do not operate properly, or other methods to interfere with security tools scanning or reporting information.
Credential Access
1 technique
Credential Access
Some of these criminals were dealing with the penetration effort, using multiple mechanisms to compromise IT networks, including brute force attacks, SQL injections, stolen credentials and phishing emails with malicious attachments.
Discovery
3 techniques
Discovery
It stops database services such as Firebird and MSSQL, terminates processes including postgres.exe, mysqld.exe, sqlservr.exe, and Outlook.
Атакующие используют консольную утилиту NS ... для сканирования общих ресурсов сети и подключения их как сетевых дисков.
If the Windows version is older than Windows Vista, or if the mutexes already exist, Dharma exits.
Lateral Movement
2 techniques
Lateral Movement
Many Dharma intrusions begin when threat actors gain access to a Windows system through Remote Desktop Protocol (RDP).
The first attack that we have record was on 24th May 2019, in this case the infection vector was through RDP attack. This kind of infection vector execute a brute force on credentials
Collection
1 technique
Collection
Many of the hospital's records were encrypted due to the attack, and these included files containing patient information such as names, home addresses, dates of birth, social security numbers, driver license numbers, credit card information, phone numbers, and medical data.
Command and Control
1 technique
Command and Control
Eventually, the loader will connect to “hastebin[.]com” and decode the binary (Crysis) from the command-and-control (C&C) server
Exfiltration
1 technique
Exfiltration
It would be unusual for ransomware to encrypt and then exfiltrate information should the malware's purpose be simply to secure a blackmail payment. However, as the threat actor was present on ABH servers and details are thin on the ground, it is possible this data has made its way into the wrong hands.
Impact
3 techniques
Impact
Dharma affiliates seek to map and authenticate to network shares in order to encrypt them.
May attempt to stop services running on servers in order to be able to encrypt files accessed by those services.
Prior to attempting to execute Dharma, threat actors will typically attempt to delete shadow copies or disable host file backups
Observables
25 indicators attributed across vendor reports, sandbox runs, and researcher write-ups. Values are masked here and available in full in Mallory.
Recent activity
49 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.