Web applications and APIs face constant threats from malicious actors seeking to exploit vulnerabilities for illicit gains. These threats necessitate robust anomaly detection systems capable of identifying malicious API traffic efficiently despite limited and diverse datasets. This paper proposes a novel few-shot detection approach motivated by Natural Language Processing (NLP) and advanced Generative Adversarial Network (GAN)-inspired techniques. Leveraging state-of-the-art Transformer architectures, particularly RoBERTa, our method enhances the contextual understanding of API requests, leading to improved anomaly detection compared to traditional methods. We showcase the technique's versatility by demonstrating its effectiveness with both Out-of-Distribution (OOD) and Transformer-based binary classification methods on two distinct datasets: CSIC 2010 and ATRDF 2023. Our evaluations reveal consistently enhanced or, at worst, equivalent detection rates across various metrics in most vectors, highlighting the promise of our approach for improving API security.
翻译:Web应用程序和API面临来自恶意攻击者的持续威胁,他们试图利用漏洞获取非法利益。这些威胁要求鲁棒的异常检测系统能够高效识别恶意API流量,尽管数据有限且多样。本文提出了一种新颖的少样本检测方法,该方法受自然语言处理(NLP)和先进生成对抗网络(GAN)启发技术驱动。利用最先进的Transformer架构,特别是RoBERTa,我们的方法增强了API请求的上下文理解,与传统方法相比实现了改进的异常检测。通过在两个不同数据集(CSIC 2010和ATRDF 2023)上展示其在分布外(OOD)和基于Transformer的二分类方法中的有效性,我们展示了该技术的多用途性。我们的评估显示,在大多数向量上的各项指标中,检测率持续提升或至少持平,突显了该方法在增强API安全性方面的前景。