Tuesday, April 22, 2025
HomeCyber Security NewsDecrypting Akira Ransomware on Linux/ESXi Without Paying Hackers

Decrypting Akira Ransomware on Linux/ESXi Without Paying Hackers

Published on

SIEM as a Service

Follow Us on Google News

A team successfully decrypted an instance of the Akira ransomware on Linux/ESXi systems without succumbing to the hackers’ demands.

This achievement not only underscores the ingenuity of cybersecurity experts but also serves as a powerful message to those who rely on extorting from vulnerable businesses and individuals.

The Akira ransomware, known for its complex encryption mechanisms, has evolved over time, with newer variants posing significant challenges to cybersecurity professionals.

- Advertisement - Google News

The variant discussed here, active since late 2023, required innovative approaches to bypass its encryption.

Background on Akira Ransomware

Akira ransomware has been a notable threat, with multiple versions surfacing over the years.

An earlier version, which contained a bug allowing Avast to develop a decryptor tool, was effectively patched by the attackers once exposed. This pattern suggests that the malware continues to evolve in response to security efforts, as per a report by Security Researchers.

The existence of error strings really helps
The existence of error strings really helps

To combat the latest iteration, researchers focused on understanding its encryption process. The ransomware uses nanosecond-resolution timestamps to seed its Yarrow256 algorithm, generating unique encryption keys for each file.

This process involves multiple rounds of SHA-256 hashing, making brute-force attacks seem daunting.

Decrypting Process: Understanding the Encryption

The encryption process can be outlined as follows:

  1. Random Key Generation: The ransomware generates random keys using the current time in nanoseconds as a seed. This seed is used in conjunction with the Yarrow256 algorithm, which is seeded and reseeded multiple times.
void generate_random(char *buffer, int size) {
    uint64_t t = get_current_time_nanosecond();
    char seed[32];
    snprintf(seed, sizeof(seed), "%lld", t);
    struct yarrow256_ctx ctx;
    yarrow256_init(&ctx, 0, NULL);
    yarrow256_seed(&ctx, strlen(seed), seed);
    yarrow256_random(&ctx, size, buffer);
}
Four unique timestamps that need to be identified. The ransomware generates different keys for each file.
Four unique timestamps that need to be identified. The ransomware generates different keys for each file.
  1. Encryption Process: Each file is divided into blocks. The first part of each block is encrypted using KCipher2, while the rest is encrypted with Chacha8. The keys generated are then encrypted using RSA-4096 and saved at the end of the file.
Shows how a file is split
Shows how a file is split
  1. Brute-Force Approach: Given the complexity of the encryption, a brute-force method was adopted. This involved guessing possible nanosecond timestamps when the encryption occurred, generating keys based on these timestamps, and testing them against known plaintexts from files like flat-VMDKs.

VMware File Types: Identifying Plaintext

To perform brute-force attacks efficiently, plaintext samples are necessary. For VMware files, the following strategies were employed:

  • Flat-VMDKs: These files can provide the initial 8 bytes needed for brute-forcing KCipher2 encryption. Identifying them requires knowing the original VM’s OS, which can be deduced from VMX files.
  • Sesparse: These files have a unique header and, at offset 65,535, contain zeros, providing additional plaintext for Chacha8 encryption.

Feasibility and Optimization

While brute-forcing seemed unfeasible at first, optimizations made it more practical.

Initial estimates suggested a processing time of about 100,000 timestamp-to-random bytes conversions per second on a single CPU. This was significantly improved using GPUs, reducing conversion times from hours to minutes.

In Linux (using most filesystems), timestamp accuracy is nanosecond
In Linux (using most filesystems), timestamp accuracy is nanosecond

To further refine the search, log files from ESXi hosts were used to estimate when the encryption occurred. Although these logs may only offer second-level precision, they help narrow down the search space.

To optimize brute-forcing, the following steps were taken:

  1. Enumeration: Given the complexity of directly guessing four timestamps, a strategy was developed to estimate ranges based on the malware’s execution time and system variability.
  2. GPU Acceleration: With GPU acceleration, the processing speed increased dramatically, allowing for faster enumeration of possible timestamp pairs.
  3. Known Plaintext: The first 8 bytes of files like flat-VMDKs served as critical plaintext. For larger files, additional plaintext at offset 65,535 was used.

The full source code for the brute-force tool used in this recovery effort is available on GitHub, providing a comprehensive framework for those facing similar challenges:

https://github.com/yohanes/akira-bruteforce

This achievement serves as a beacon of hope for organizations hit by ransomware. By understanding and exploiting vulnerabilities in the encryption process, cybersecurity experts can develop effective countermeasures, often without needing to engage with hackers.

However, it’s crucial to note that with each success, these threats evolve, emphasizing the ongoing need for vigilance and innovation in digital security.

The approach outlined here applies to specific versions of Akira ransomware. As malware evolves, new methods may be needed to address updated encryption techniques.

By leveraging technological advancements and collaborative efforts, the fight against ransomware continues to gain momentum. In the battle against cyber threats, resilience and innovation will remain paramount.

Are you from SOC/DFIR Teams? – Analyse Malware Incidents & get live Access with ANY.RUN -> Start Now for Free. 

Divya
Divya
Divya is a Senior Journalist at GBhackers covering Cyber Attacks, Threats, Breaches, Vulnerabilities and other happenings in the cyber world.

Latest articles

Infostealer Attacks Surge 84% Weekly Through Phishing Emails

The volume of infostealer malware distributed through phishing emails has surged by 84% week-on-week...

North Korean IT Workers Use Real-Time Deepfakes to Infiltrate Organizations Through Remote Jobs

A division of Palo Alto Networks, have revealed a sophisticated scheme by North Korean...

New Phishing Technique Hides Weaponized HTML Files Within SVG Images

Cybersecurity experts have observed an alarming increase in the use of SVG (Scalable Vector...

Detecting And Blocking DNS Tunneling Techniques Using Network Analytics

DNS tunneling is a covert technique that cybercriminals use to bypass traditional network security...

Resilience at Scale

Why Application Security is Non-Negotiable

The resilience of your digital infrastructure directly impacts your ability to scale. And yet, application security remains a critical weak link for most organizations.

Application Security is no longer just a defensive play—it’s the cornerstone of cyber resilience and sustainable growth. In this webinar, Karthik Krishnamoorthy (CTO of Indusface) and Phani Deepak Akella (VP of Marketing – Indusface), will share how AI-powered application security can help organizations build resilience by

Discussion points


Protecting at internet scale using AI and behavioral-based DDoS & bot mitigation.
Autonomously discovering external assets and remediating vulnerabilities within 72 hours, enabling secure, confident scaling.
Ensuring 100% application availability through platforms architected for failure resilience.
Eliminating silos with real-time correlation between attack surface and active threats for rapid, accurate mitigation

More like this

Infostealer Attacks Surge 84% Weekly Through Phishing Emails

The volume of infostealer malware distributed through phishing emails has surged by 84% week-on-week...

North Korean IT Workers Use Real-Time Deepfakes to Infiltrate Organizations Through Remote Jobs

A division of Palo Alto Networks, have revealed a sophisticated scheme by North Korean...

New Phishing Technique Hides Weaponized HTML Files Within SVG Images

Cybersecurity experts have observed an alarming increase in the use of SVG (Scalable Vector...