[论文解读] Twins: BFT Systems Made Robust
Twins 引入了一种新颖且可扩展的框架,通过部署具有相同身份和凭证的诚实节点的孪生副本,系统性地生成拜占庭故障攻击。通过模拟equivocation(双重发言)、双次投票和状态遗忘,Twins 在数分钟内暴露了安全缺陷——在大规模环境中检测到DiemBFT中故意注入的错误,每日执行4400万种场景。
This paper presents Twins, an automated unit test generator of Byzantine attacks. Twins implements three types of Byzantine behaviors: (i) leader equivocation, (ii) double voting, and (iii) losing internal state such as forgetting 'locks' guarding voted values. To emulate interesting attacks by a Byzantine node, it instantiates twin copies of the node instead of one, giving both twins the same identities and network credentials. To the rest of the system, the twins appear indistinguishable from a single node behaving in a 'questionable' manner. Twins can systematically generate Byzantine attack scenarios at scale, execute them in a controlled manner, and examine their behavior. Twins scenarios iterate over protocol rounds and vary the communication patterns among nodes. Twins runs in a production setting within DiemBFT where it can execute 44M Twins-generated scenarios daily. Whereas the system at hand did not manifest errors, subtle safety bugs that were deliberately injected for the purpose of validating the implementation of Twins itself were exposed within minutes. Twins can prevent developers from regressing correctness when updating the codebase, introducing new features, or performing routine maintenance tasks. Twins only requires a thin wrapper over DiemBFT, we thus envision other systems using it. Building on this idea, one new attack and several known attacks against other BFT protocols were materialized as Twins scenarios. In all cases, the target protocols break within fewer than a dozen protocol rounds, hence it is realistic for the Twins approach to expose the problems.
研究动机与目标
- 为解决在难以手动构建的现实复杂攻击下,系统性地测试拜占庭容错(BFT)协议的挑战。
- 克服随机故障注入(如Chaos Monkey)和形式化验证(如模型检测)的局限性,后者存在覆盖不足或状态爆炸的问题。
- 提供一种实用且可投入生产的验证方法,可在开发早期甚至常规维护期间,检测出细微的安全错误。
- 通过利用孪生副本模拟拜占庭行为,无需修改原始协议代码,实现BFT系统的自动化、可重复且全面的测试。
提出的方法
- 部署单个节点的多个自治且完全相同的副本(孪生体),每个副本具有相同的密码学身份和网络凭证,以模拟拜占庭行为。
- 利用孪生体生成如领导者equivocation、双次投票和遗忘已投票值等攻击,其行为与单个恶意节点无异。
- 系统性地遍历协议轮次,并改变孪生体与其他节点之间的通信模式,以探索多样化的攻击面。
- 将Twins作为DiemBFT的轻量级封装,实现在生产环境中每日自动执行数百万个测试场景。
- 复用现有正确的协议逻辑来生成故障行为,避免手动编码拜占庭语义的需要。
- 通过向DiemBFT中注入已知和新型安全错误来验证该框架,Twins在数分钟内即检测到这些错误。
实验结果
研究问题
- RQ1是否能够通过系统化、自动化的手段检测出通过手动测试或随机故障注入难以发现的BFT共识协议中的细微安全错误?
- RQ2在不修改协议代码的前提下,诚实节点的孪生副本在多大程度上能够模拟复杂的拜占庭行为,如equivocation和状态遗忘?
- RQ3Twins框架是否能够扩展至在真实世界的BFT系统(如DiemBFT)中每日执行数百万个测试场景,同时保持低误报率?
- RQ4Twins方法是否能覆盖广泛的拜占庭攻击类型,特别是依赖于协议状态和因果依赖关系的攻击?
- RQ5Twins能否扩展用于验证BFT系统的辅助组件,如重新配置和智能合约执行,而不仅限于核心共识协议?
主要发现
- Twins在数分钟内成功检测到DiemBFT中故意注入的安全错误,证明其对逻辑缺陷具有高度敏感性。
- 该框架在生产环境中每日执行4400万个由Twins生成的场景,证明了其可扩展性和实用性。
- 所有已知和新型的BFT协议攻击均以Twins场景的形式出现,并在十余轮协议执行内导致协议失败。
- Twins揭示了传统测试或随机故障注入未能暴露的细微安全缺陷,凸显其更优的覆盖能力。
- 该方法通过仅建模正确执行并利用孪生副本生成故障行为,避免了状态爆炸,因此比形式化验证更高效。
- 该框架具有可扩展性,并已用于验证DiemBFT的核心共识协议之外的辅助组件,如重新配置和智能合约执行。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。