Skip to main content
QUICK REVIEW

[Paper Review] RansomAI: AI-powered Ransomware for Stealthy Encryption

Jan von der Assen, Alberto Huertas Celdrán|arXiv (Cornell University)|Jun 27, 2023
Advanced Malware Detection TechniquesComputer Science6 citations
TL;DR

RansomAI is a reinforcement learning-based framework that enables ransomware to dynamically adapt its encryption behavior—selecting optimal algorithms, rates, and durations—to evade detection by AI-powered anomaly detection systems. Evaluated on a Raspberry Pi 4 using Deep Q-Learning and Isolation Forest, RansomAI evaded detection with over 90% accuracy in under 2 minutes, demonstrating the feasibility of AI-powered stealth in ransomware attacks.

ABSTRACT

Cybersecurity solutions have shown promising performance when detecting ransomware samples that use fixed algorithms and encryption rates. However, due to the current explosion of Artificial Intelligence (AI), sooner than later, ransomware (and malware in general) will incorporate AI techniques to intelligently and dynamically adapt its encryption behavior to be undetected. It might result in ineffective and obsolete cybersecurity solutions, but the literature lacks AI-powered ransomware to verify it. Thus, this work proposes RansomAI, a Reinforcement Learning-based framework that can be integrated into existing ransomware samples to adapt their encryption behavior and stay stealthy while encrypting files. RansomAI presents an agent that learns the best encryption algorithm, rate, and duration that minimizes its detection (using a reward mechanism and a fingerprinting intelligent detection system) while maximizing its damage function. The proposed framework was validated in a ransomware, Ransomware-PoC, that infected a Raspberry Pi 4, acting as a crowdsensor. A pool of experiments with Deep Q-Learning and Isolation Forest (deployed on the agent and detection system, respectively) has demonstrated that RansomAI evades the detection of Ransomware-PoC affecting the Raspberry Pi 4 in a few minutes with >90% accuracy.

Motivation & Objective

  • To address the growing threat of AI-powered ransomware that can evade traditional dynamic detection systems by adapting encryption behavior in real time.
  • To investigate whether reinforcement learning can be used to optimize ransomware behavior for maximum damage while minimizing detection risk.
  • To validate the effectiveness of an RL-based agent in evading a fingerprinting and ML-based anomaly detection system in a real-world, resource-constrained environment.
  • To demonstrate that current cybersecurity defenses may become obsolete if ransomware evolves to use adaptive, intelligent encryption strategies.

Proposed method

  • The framework employs a reinforcement learning agent that learns optimal ransomware configurations (encryption algorithm, rate, duration) through a reward mechanism.
  • The reward function balances encryption speed and stealth, where stealth is measured by the output of an Isolation Forest-based anomaly detection system.
  • The agent uses Deep Q-Learning (DQN) to explore and exploit different configurations, updating its Q-values based on observed rewards.
  • A fingerprinting mechanism captures device-specific behavioral patterns to train the anomaly detection system, which evaluates the stealthiness of each ransomware configuration.
  • The system was integrated into a real-world PoC ransomware (Ransomware-PoC) running on a Raspberry Pi 4 to simulate a crowdsensor environment.
  • Hyperparameter tuning was performed across activation functions, network depth, and weight initialization to optimize learning speed and accuracy.

Experimental results

Research questions

  • RQ1Can a reinforcement learning agent learn to dynamically adapt ransomware encryption behavior to minimize detection while maximizing encryption speed in real time?
  • RQ2How effective is an RL-based agent in evading a fingerprinting and machine learning-based anomaly detection system in a real, constrained device environment?
  • RQ3What hyperparameter configurations (e.g., network depth, activation functions, learning rates) yield the fastest and most accurate evasion behavior in the RansomAI framework?
  • RQ4To what extent does the choice of detection model (e.g., Isolation Forest) influence the agent’s ability to learn stealthy configurations?
  • RQ5Can the framework be generalized to other malware types beyond ransomware, such as data-leaking backdoors?

Key findings

  • RansomAI achieved over 90% detection evasion accuracy in less than 2 minutes when deployed on a Raspberry Pi 4.
  • The agent reached 96.32% accuracy in selecting optimal configurations within 6.5 minutes of training.
  • The Log-SiLU activation function combination yielded the best balance between learning speed and accuracy, with a training time of 139.4 minutes and 99.24% accuracy.
  • Xavier weight initialization produced the fastest convergence (105.4 minutes) and highest accuracy (99.31%) among the tested initialization methods.
  • The agent achieved 99.71% accuracy after 5,000 episodes, indicating strong long-term learning stability and robustness.
  • The framework demonstrated that AI-powered ransomware can effectively evade modern, behavior-based detection systems by learning adaptive encryption strategies.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.