Skip to main content
QUICK REVIEW

[Paper Review] Deep Learning Based Cryptographic Primitive Classification

Gregory D. Hill, Xavier Bellekens|arXiv (Cornell University)|Sep 25, 2017
Advanced Malware Detection TechniquesComputer Science14 references11 citations
TL;DR

This paper proposes CryptoKnight, a deep learning framework using a Dynamic Convolutional Neural Network (DCNN) to classify cryptographic primitives in compiled binaries by analyzing dynamic control flow traces. Trained on synthetically generated binaries using OpenSSL primitives with multivariate obfuscation, the model achieves 91% accuracy in identifying AES, RC4, Blowfish, MD5, and RSA variants with minimal hyperparameter tuning.

ABSTRACT

Cryptovirological augmentations present an immediate, incomparable threat. Over the last decade, the substantial proliferation of crypto-ransomware has had widespread consequences for consumers and organisations alike. Established preventive measures perform well, however, the problem has not ceased. Reverse engineering potentially malicious software is a cumbersome task due to platform eccentricities and obfuscated transmutation mechanisms, hence requiring smarter, more efficient detection strategies. The following manuscript presents a novel approach for the classification of cryptographic primitives in compiled binary executables using deep learning. The model blueprint, a DCNN, is fittingly configured to learn from variable-length control flow diagnostics output from a dynamic trace. To rival the size and variability of contemporary data compendiums, hence feeding the model cognition, a methodology for the procedural generation of synthetic cryptographic binaries is defined, utilising core primitives from OpenSSL with multivariate obfuscation, to draw a vastly scalable distribution. The library, CryptoKnight, rendered an algorithmic pool of AES, RC4, Blowfish, MD5 and RSA to synthesis combinable variants which are automatically fed in its core model. Converging at 91% accuracy, CryptoKnight is successfully able to classify the sample algorithms with minimal loss.

Motivation & Objective

  • Address the growing threat of crypto-ransomware by enabling automated detection of cryptographic primitives in malicious binaries.
  • Overcome limitations of static and dynamic analysis by using deep learning to detect obfuscated cryptographic behavior in compiled executables.
  • Develop a scalable, automated system capable of classifying both standard and custom cryptographic implementations without manual reverse engineering.
  • Minimize human error and reduce analysis time by replacing manual feature engineering with end-to-end learning from dynamic traces.
  • Enable rapid classification of unknown cryptographic functions by training on procedurally generated, diverse binary variants.

Proposed method

  • Employ a Dynamic Convolutional Neural Network (DCNN) to process variable-length control flow diagnostics extracted from dynamic binary tracing.
  • Generate synthetic cryptographic binaries using the CryptoKnight library, which composites core OpenSSL primitives (AES, RC4, Blowfish, MD5, RSA) with multivariate obfuscation techniques.
  • Use procedural generation to create a vast, scalable dataset of labeled binary samples with diverse obfuscation patterns to train the DCNN.
  • Represent control flow traces as sequential data with embedded operations, enabling the DCNN to learn time-invariant patterns despite obfuscation.
  • Train the model in a supervised manner on pre-combined function sequences, focusing on distinguishing cryptographic behavior from non-cryptographic computation.
  • Optimize the model using a loss function that minimizes classification error while maintaining generalization across obfuscated variants.

Experimental results

Research questions

  • RQ1Can a deep learning model accurately classify cryptographic primitives in compiled binaries using dynamic control flow traces?
  • RQ2How effective is a procedurally generated synthetic dataset in training a model to generalize across diverse obfuscation techniques?
  • RQ3To what extent can a DCNN detect cryptographic behavior despite control flow and data flow obfuscation in compiled executables?
  • RQ4How does the model perform on both standard and custom cryptographic implementations, including natively written variants?
  • RQ5Can the framework detect cryptographic functions with minimal hyperparameter tuning and low analysis overhead?

Key findings

  • The DCNN model achieved 91% classification accuracy on a diverse set of cryptographic primitives, including AES, RC4, Blowfish, MD5, and RSA.
  • The model successfully detected all implementations of RC4 and Blowfish, including externally sourced and natively written versions.
  • Analysis time per binary was at most one minute, significantly faster than manual reverse engineering and more efficient than prior dynamic instrumentation methods.
  • The model maintained high accuracy even without relying on entropy-based features, as shown by a 83.3% accuracy rate when entropy was excluded.
  • The synthetic data generation pipeline enabled robust generalization across obfuscated variants without overfitting, demonstrating scalability and model stability.
  • The framework outperformed prior approaches in terms of automation and reduced human intervention, particularly in handling obfuscated and custom cryptographic implementations.

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.