arXiv:2412.01655cs.AI2024-12被引 2

用Transformer模型精准识别命令行风险,提升安全防护能力

Command-line Risk Classification using Transformer-based Neural Architectures

  • 基于Transformer和大语言模型的端到端风险分类方法
  • 在真实生产数据上实现高准确率,尤其擅长识别罕见危险命令
  • 适合云安全团队、运维审计人员及安全系统开发者使用

为应对日益增长的计算需求,云服务商需保护大规模计算环境免受数据丢失和服务中断。命令拦截系统用于在命令执行前检测并阻止危险的命令行接口(CLI)指令。传统方案依赖规则库,需专家维护且难以覆盖新出现的命令。现有学习型系统多采用通用文本分类器,未能适配Bash、PowerShell等脚本语言特性,且在类别不平衡时表现不佳。本文提出一种基于Transformer的命令风险分类系统,利用大语言模型的泛化能力与迁移学习,显著提升对罕见危险命令的识别效果。我们在真实生产命令数据集上验证了该方法的有效性,并展示了其在危险命令拦截与规则系统审计中的扩展应用。

原文摘要 · Abstract (English)

To protect large-scale computing environments necessary to meet increasing computing demand, cloud providers have implemented security measures to monitor Operations and Maintenance (O&M) activities and therefore prevent data loss and service interruption. Command interception systems are used to intercept, assess, and block dangerous Command-line Interface (CLI) commands before they can cause damage. Traditional solutions for command risk assessment include rule-based systems, which require expert knowledge and constant human revision to account for unseen commands. To overcome these limitations, several end-to-end learning systems have been proposed to classify CLI commands. These systems, however, have several other limitations, including the adoption of general-purpose text classifiers, which may not adapt to the language characteristics of scripting languages such as Bash or PowerShell, and may not recognize dangerous commands in the presence of an unbalanced class distribution. In this paper, we propose a transformer-based command risk classification system, which leverages the generalization power of Large Language Models (LLM) to provide accurate classification and the ability to identify rare dangerous commands effectively, by exploiting the power of transfer learning. We verify the effectiveness of our approach on a realistic dataset of production commands and show how to apply our model for other security-related tasks, such as dangerous command interception and auditing of existing rule-based systems.

命令行安全Transformer风险分类LLM应用

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。