arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2411.11567cs.CRcs.LG
收藏

基于GNN的代码标注逻辑:在C代码中建立安全边界

GNN-Based Code Annotation Logic for Establishing Security Boundaries in C Code

University of Würzburg(维尔茨堡大学);Huawei Technologies(华为技术有限公司)

Varun Gadey, Raphael Goetz, Christoph Sendner, Sampo Sovio, Alexandra Dmitrienko

AI总结:

本文提出代码标注逻辑CAL,利用图神经网络自动识别C代码中需隔离到可信执行环境的安全敏感组件,以优化可信计算基并减少攻击向量。

摘要:

在当今互联的软件环境中,保护敏感操作至关重要但也极具挑战性。现代平台依赖可信执行环境(TEE),如Intel SGX和ARM TrustZone,将安全敏感代码与主系统隔离,从而缩小可信计算基(TCB)并提供更强的安全保障。然而,确定哪些代码应驻留在TEE中十分复杂,需要专门的专业知识,而当前的自动化工具并不支持这一点。现有解决方案通常将整个应用程序迁移到TEE中,导致使用效率低下并增大TCB。为弥补这一不足,我们提出了代码标注逻辑(Code Annotation Logic,CAL),这是一种开创性的工具,能够自动识别用于TEE隔离的安全敏感组件。CAL分析代码库,利用基于图的方法进行新颖的特征构建,并采用定制的图神经网络模型来准确判断代码的哪些部分应当被隔离。CAL有效优化了TCB,减轻了人工分析的负担并增强了整体安全性。我们的贡献包括:定义了安全敏感代码,构建并标注了一个全面的源文件数据集,设计了一个特征丰富的基于图的数据准备流水线,以及用于TEE集成的CAL模型。评估结果表明,CAL在识别敏感代码方面具有显著效果,召回率为86.05%,F1分数为81.56%,对安全敏感函数的识别率达到91.59%。通过实现高效的代码隔离,CAL推动了使用TEE的应用程序安全开发,为开发者提供了一种减少攻击向量的实用解决方案。

英文摘要:

Securing sensitive operations in today's interconnected software landscape is crucial yet challenging. Modern platforms rely on Trusted Execution Environments (TEEs), such as Intel SGX and ARM TrustZone, to isolate security sensitive code from the main system, reducing the Trusted Computing Base (TCB) and providing stronger assurances. However, identifying which code should reside in TEEs is complex and requires specialized expertise, which is not supported by current automated tools. Existing solutions often migrate entire applications to TEEs, leading to suboptimal use and an increased TCB. To address this gap, we propose Code Annotation Logic (CAL), a pioneering tool that automatically identifies security sensitive components for TEE isolation. CAL analyzes codebases, leveraging a graph-based approach with novel feature construction and employing a custom graph neural network model to accurately determine which parts of the code should be isolated. CAL effectively optimizes TCB, reducing the burden of manual analysis and enhancing overall security. Our contributions include the definition of security sensitive code, the construction and labeling of a comprehensive dataset of source files, a feature rich graph based data preparation pipeline, and the CAL model for TEE integration. Evaluation results demonstrate CAL's efficacy in identifying sensitive code with a recall of 86.05%, an F1 score of 81.56%, and an identification rate of 91.59% for security sensitive functions. By enabling efficient code isolation, CAL advances the secure development of applications using TEEs, offering a practical solution for developers to reduce attack vectors.

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

↑