用大模型检测数据库异常SQL行为,区分内外攻击更精准。
Leveraging large language models for SQL behavior-based database intrusion detection
- 结合无监督与有监督学习,先找异常查询再识别内部攻击
- 在少量标注数据下仍能高精度识别内部攻击行为
- 适合需要低误报率的数据库安全防护场景
数据库系统广泛用于存储关键数据,但内部和外部攻击导致的异常访问行为持续增加。内部伪装者熟悉组织结构,易模仿正常员工行为;外部伪装者因缺乏了解,行为差异明显。现有方法难以在操作级别精细检测异常,常将整段操作误判为异常,且对看似正常的恶意行为识别能力不足。本文提出一种基于BERT的两层式SQL异常检测方法,采用更高效的DistilBERT模型。无监督部分通过集成异常检测器,识别偏离正常用户行为模式的嵌入向量(离群查询);有监督部分通过微调的Transformer模型,利用角色标签分类,在有限标注数据下高精度检测内部攻击(在范围查询)。实验表明该方法能有效防范复杂威胁,显著提升数据库安全性。
原文摘要 · Abstract (English)
Database systems are extensively used to store critical data across various domains. However, the frequency of abnormal database access behaviors, such as database intrusion by internal and external attacks, continues to rise. Internal masqueraders often have greater organizational knowledge, making it easier to mimic employee behavior effectively. In contrast, external masqueraders may behave differently due to their lack of familiarity with the organization. Current approaches lack the granularity needed to detect anomalies at the operational level, frequently misclassifying entire sequences of operations as anomalies, even though most operations are likely to represent normal behavior. On the other hand, some anomalous behaviors often resemble normal activities, making them difficult for existing detection methods to identify. This paper introduces a two-tiered anomaly detection approach for Structured Query Language (SQL) using the Bidirectional Encoder Representations from Transformers (BERT) model, specifically DistilBERT, a more efficient, pre-trained version. Our method combines both unsupervised and supervised machine learning techniques to accurately identify anomalous activities while minimizing the need for data labeling. First, the unsupervised method uses ensemble anomaly detectors that flag embedding vectors distant from learned normal patterns of typical user behavior across the database (out-of-scope queries). Second, the supervised method uses fine-tuned transformer-based models to detect internal attacks with high precision (in-scope queries), using role-labeled classification, even on limited labeled SQL data. Our findings make a significant contribution by providing an effective solution for safeguarding critical database systems from sophisticated threats.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。