Query-Efficient GAN Based Black-Box Attack Against Sequence Based Machine and Deep Learning Classifiers

Ishai Rosenberg, Asaf Shabtai, Yuval Elovici, Lior Rokach

Introduction

Adversarial attacks on machine learning models have predominantly focused on continuous data like images. However, attacking malware classifiers that analyze discrete API call sequences presents unique challenges. Specifically, such attacks must preserve the original functionality of the malware (functionality preservation) and handle discrete, variable-length data. Furthermore, existing black-box attacks often require thousands of queries, making them expensive and easily detectable. This research introduces a highly query-efficient, decision-based attack that bypasses state-of-the-art sequence-based classifiers using logarithmic backtracking and Generative Adversarial Networks (GANs).

Methodology

The proposed attack operates in a black-box setting, requiring only the final classification label (Malicious or Benign) rather than internal model weights or confidence scores.

Logarithmic Backtracking

Traditional attacks often add API calls linearly, checking the model's response after each insertion. The researchers developed a "logarithmic backtracking" algorithm that starts with a large perturbation. If the model is successfully fooled, the algorithm uses a binary-search-inspired approach to remove half of the added calls iteratively. This strategy identifies the minimal necessary perturbation with significantly fewer queries.

Benign Perturbation via SeqGAN

To enhance the effectiveness of the added API calls, the attack utilizes SeqGAN to generate sequences that mimic legitimate, benign software behavior. By weaving these "benign-looking" calls into the malware's execution trace, the attack creates a context that deceives the classifier into labeling the file as benign without altering the underlying malicious logic.

Experimental Setup

The study utilized a comprehensive dataset of 500,000 files (equally split between benign and malware). Samples were executed in a Cuckoo Sandbox to capture dynamic API call sequences. The attack was tested against various architectures, including Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, Gated Recurrent Units (GRUs), and traditional models like Random Forests and SVMs.

Key Results

The experimental results demonstrate a significant improvement in query efficiency and attack success rates.

Table 1: Comparison of query counts between the proposed logarithmic backtracking algorithms and the baseline (Rosenberg et al. 2018).

As shown in the table above, while previous state-of-the-art attacks required over 2,200 queries per sample, the proposed logarithmic approach achieved success with as few as 10 to 20 queries across most classifier types.

Table 2: Attack effectiveness and the percentage of additional API calls required across various classifier types.

The attack successfully deceived deep learning models (LSTMs, GRUs) with an effectiveness rate typically between 87% and 90%. Notably, this was achieved with minimal overhead, requiring only a small percentage of additional API calls to flip the classification.

Conclusion

This research highlights a critical vulnerability in sequence-based malware detection systems. By combining efficient search strategies with GAN-generated benign sequences, attackers can bypass sophisticated defenses with minimal interaction. Future work is needed to develop robust defenses that account for API call arguments and real-time sequence analysis, as current models remain highly susceptible to these query-efficient mimicry attacks.

Summary updated

BibTeX
@misc{rosenberg2018query,
  author = {Ishai Rosenberg and Asaf Shabtai and Yuval Elovici and Lior Rokach},
  title = {{Query-Efficient GAN Based Black-Box Attack Against Sequence Based Machine and Deep Learning Classifiers}},
  year = {2018},
  eprint = {1804.08778},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1804.08778},
}
Figure