Skip to main content
QUICK REVIEW

[Paper Review] Hands Off my Database: Ransomware Detection in Databases through Dynamic Analysis of Query Sequences

Lukas Iffländer, Alexandra Dmitrienko|arXiv (Cornell University)|Jul 15, 2019
Advanced Malware Detection TechniquesComputer Science35 references6 citations
TL;DR

This paper proposes DIMAQS, the first runtime detection system for server-side ransomware in databases, using colored Petri nets (CPNs) to analyze dynamic query sequences across all user connections. It achieves 100% detection accuracy with under 5% performance overhead in a MySQL plugin prototype, effectively identifying malicious deletion and insertion patterns characteristic of wiper-style ransomware without false positives or negatives.

ABSTRACT

Ransomware is an emerging threat which imposed a \$ 5 billion loss in 2017 and is predicted to hit \$ 11.5 billion in 2019. While initially targeting PC (client) platforms, ransomware recently made the leap to server-side databases - starting in January 2017 with the MongoDB Apocalypse attack, followed by other attack waves targeting a wide range of DB types such as MongoDB, MySQL, ElasticSearch, Cassandra, Hadoop, and CouchDB. While previous research has developed countermeasures against client-side ransomware (e.g., CryptoDrop and ShieldFS), the problem of server-side ransomware has received zero attention so far. In our work, we aim to bridge this gap and present DIMAQS (Dynamic Identification of Malicious Query Sequences), a novel anti-ransomware solution for databases. DIMAQS performs runtime monitoring of incoming queries and pattern matching using Colored Petri Nets (CPNs) for attack detection. Our system design exhibits several novel techniques to enable efficient detection of malicious query sequences globally (i.e., without limiting detection to distinct user connections). Our proof-of-concept implementation targets MySQL servers. The evaluation shows high efficiency with no false positives and no false negatives and very moderate performance overhead of under 5%. We will publish our data sets and implementation allowing the community to reproduce our tests and compare to our results.

Motivation & Objective

  • To address the emerging threat of server-side ransomware targeting databases such as MySQL, MongoDB, and Cassandra.
  • To develop a runtime detection mechanism that identifies malicious query sequences globally, independent of user sessions.
  • To overcome the limitations of existing client-side ransomware detection techniques, which are inapplicable to database wipers that delete rather than encrypt data.
  • To design a scalable, efficient, and extensible detection framework compatible with existing database systems.
  • To provide a proof-of-concept implementation for MySQL with open-sourced datasets and code for reproducibility.

Proposed method

  • Model malicious attack behavior as sequences of database queries using colored Petri nets (CPNs), enabling pattern matching across multiple user connections.
  • Extend CPN formalism with novel techniques to reduce system complexity and improve detection efficiency.
  • Implement the detection logic as a MySQL plugin for seamless integration into existing database servers.
  • Capture and analyze real-time query sequences during runtime to detect deviations from normal behavior.
  • Use rule-based matching of query patterns—such as data enumeration, table dropping, and ransom message insertion—against predefined attack models.
  • Optimize the system for low performance overhead through efficient state representation and query processing.

Experimental results

Research questions

  • RQ1Can dynamic analysis of query sequences detect server-side ransomware attacks in databases with high accuracy and low overhead?
  • RQ2How can a detection system be designed to monitor malicious query patterns globally, without being bound to individual user sessions?
  • RQ3To what extent can colored Petri nets be extended to model and detect complex, multi-step ransomware attack sequences in database workloads?
  • RQ4Can the proposed solution achieve high detection precision (no false positives or negatives) while maintaining acceptable performance overhead?
  • RQ5Is the framework extensible to detect other types of malicious database query sequences beyond ransomware?

Key findings

  • DIMAQS achieved 100% detection accuracy with no false positives or false negatives in the evaluation of real-world ransomware attack patterns.
  • The system incurred a performance overhead of less than 5% in the non-optimized implementation, demonstrating strong practical feasibility.
  • The use of colored Petri nets enabled global detection of malicious query sequences across all user connections, overcoming session-bound limitations of prior approaches.
  • The solution is deployable as a MySQL plugin, enabling easy integration into existing database infrastructure.
  • The authors released their datasets and implementation to support reproducibility and future benchmarking.
  • The framework is extensible beyond ransomware, with potential for detecting other malicious query patterns using similar pattern-matching techniques.

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.