论文标题

使用自动模型提取在C中验证C中的加密安全实现

Verifying Cryptographic Security Implementations in C Using Automated Model Extraction

论文作者

Aizatulin, Mihhail

论文摘要

本文提出了一种自动化方法,用于验证用C语言编写的协议实现的安全属性。我们假设协议的每个成功运行都遵循相同的路径穿过C代码,这是典型的安全协议具有线性结构的事实。然后,我们执行该路径的象征性执行,以提取在过程演算中表达的模型,类似于Cryptoverif工具使用的模型。符号执行使用一种新颖的算法,该算法允许符号变量代表潜在未知长度的斑点来建模传入协议消息。 提取的模型不使用指针添加的内存,但是它们仍然可能包含有关消息格式的低级详细信息。在下一步中,我们将消息格式化表达式替换为抽象的裁判和投影操作员。这些运算符的属性,例如投影操作是脱衣舞操作的倒数,通常仅对正确类型的输入感到满意。因此,我们打字模型以确保满足所有类型安全约束。然后,可以用隐窝验证所得模型,以直接获得计算安全结果或使用proverif,以通过调用计算声音定理来获得计算安全结果。 我们的方法实现了高自动化,并且不需要用户输入超出指定加密原语的属性和所需的安全目标所需的内容。我们评估了几种协议实现的方法,总计超过3000行代码。最大的案例研究是一个1000线实施,该实施是独立编写的,没有考虑到验证。我们发现了作者认可和确定的几个缺陷,并能够验证固定代码而无需对其进行任何进一步的修改。

This thesis presents an automated method for verifying security properties of protocol implementations written in the C language. We assume that each successful run of a protocol follows the same path through the C code, justified by the fact that typical security protocols have linear structure. We then perform symbolic execution of that path to extract a model expressed in a process calculus similar to the one used by the CryptoVerif tool. The symbolic execution uses a novel algorithm that allows symbolic variables to represent bitstrings of potentially unknown length to model incoming protocol messages. The extracted models do not use pointer-addressed memory, but they may still contain low-level details concerning message formats. In the next step we replace the message formatting expressions by abstract tupling and projection operators. The properties of these operators, such as the projection operation being the inverse of the tupling operation, are typically only satisfied with respect to inputs of correct types. Therefore we typecheck the model to ensure that all type-safety constraints are satisfied. The resulting model can then be verified with CryptoVerif to obtain a computational security result directly, or with ProVerif, to obtain a computational security result by invoking a computational soundness theorem. Our method achieves high automation and does not require user input beyond what is necessary to specify the properties of the cryptographic primitives and the desired security goals. We evaluated the method on several protocol implementations, totalling over 3000 lines of code. The biggest case study was a 1000-line implementation that was independently written without verification in mind. We found several flaws that were acknowledged and fixed by the authors, and were able to verify the fixed code without any further modifications to it.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源