arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2405.19954cs.CRcs.CLcs.DCcs.LG
收藏

GenKubeSec:基于 LLM 的 Kubernetes 错误配置检测、定位、推理与修复

GenKubeSec: LLM-Based Kubernetes Misconfiguration Detection, Localization, Reasoning, and Remediation

Ben-Gurion University of The Negev(内盖夫本-古里安大学)

Ehud Malul, Yair Meidan, Dudu Mimran, Yuval Elovici, Asaf Shabtai

AI总结:

本文提出基于LLM的GenKubeSec方法,用于检测、定位、推理和修复Kubernetes配置错误,克服了规则工具和商业模型的局限,在精确率(0.990)和召回率(0.999)上表现优异,并开源了数据集与工具。

摘要:

与 Kubernetes 配置文件(KCFs)相关的一个关键挑战是,它们通常高度复杂且容易出错,从而导致安全漏洞和运营挫折。用于 KCF 错误配置检测的基于规则(RB)的工具依赖于静态规则集,这使得它们具有固有的局限性,无法检测新发现的错误配置。RB 工具还存在误检问题,因为在编写检测规则时很可能出现错误。近期用于检测和修复 KCF 错误配置的方法在可扩展性和检测覆盖率方面存在局限,或者由于它们具有很高的专业知识要求,并且不提供伴随错误配置检测的自动化修复而受到限制。在其流程中采用 LLM 的新方法依赖于基于 API 的、通用的且主要是商业的模型。因此,它们带来了安全挑战,分类性能不一致,并且可能成本高昂。在本文中,我们提出了 GenKubeSec,这是一种全面且自适应的、基于 LLM 的方法,除了检测各种 KCF 错误配置外,它还能识别错误配置的确切位置,提供关于它们的详细推理,以及建议的修复措施。当与三种行业标准 RB 工具进行实证比较时,GenKubeSec 取得了同等的精确率(0.990)和更优的召回率(0.999)。当由 Kubernetes 安全专家检查随机抽样的 KCF 时,GenKubeSec 关于错误配置定位、推理和修复的解释 100% 正确、信息丰富且有用。为了促进该领域的进一步发展,我们共享了我们收集的独特数据集、我们为标签标准化而开发的统一错误配置索引、我们的实验代码,以及 GenKubeSec 本身作为一个开源工具。

英文摘要:

A key challenge associated with Kubernetes configuration files (KCFs) is that they are often highly complex and error-prone, leading to security vulnerabilities and operational setbacks. Rule-based (RB) tools for KCF misconfiguration detection rely on static rule sets, making them inherently limited and unable to detect newly-discovered misconfigurations. RB tools also suffer from misdetection, since mistakes are likely when coding the detection rules. Recent methods for detecting and remediating KCF misconfigurations are limited in terms of their scalability and detection coverage, or due to the fact that they have high expertise requirements and do not offer automated remediation along with misconfiguration detection. Novel approaches that employ LLMs in their pipeline rely on API-based, general-purpose, and mainly commercial models. Thus, they pose security challenges, have inconsistent classification performance, and can be costly. In this paper, we propose GenKubeSec, a comprehensive and adaptive, LLM-based method, which, in addition to detecting a wide variety of KCF misconfigurations, also identifies the exact location of the misconfigurations and provides detailed reasoning about them, along with suggested remediation. When empirically compared with three industry-standard RB tools, GenKubeSec achieved equivalent precision (0.990) and superior recall (0.999). When a random sample of KCFs was examined by a Kubernetes security expert, GenKubeSec's explanations as to misconfiguration localization, reasoning and remediation were 100% correct, informative and useful. To facilitate further advancements in this domain, we share the unique dataset we collected, a unified misconfiguration index we developed for label standardization, our experimentation code, and GenKubeSec itself as an open-source tool.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑