一句话:提出 Pythia,利用 ARM 指针认证对程序变量切片做完整性检查,防御非控制数据攻击,平均开销 13.07%。
现代 C/C++ 程序易受非控制数据攻击,其中控制流弯曲通过篡改程序数据翻转分支结果,将控制流导向攻击者路径;CFI 对此类分支谓词翻转无效。Pythia 是性能感知的编译器引导防御方案,利用 ARM 指针认证硬件,对可能受输入影响的变量前向切片和可能被滥用的分支变量(含指针)后向切片做动态完整性检查。为避免全局保护的高开销(朴素方案平均 47.88%),Pythia 选择性地为静态变量添加 ARM PA 金丝雀,为动态变量创建安全区以防输入溢出。实验显示平均开销降至 13.07%,安全性优于最先进的 DFI,在指针密集与 C++ 应用中平均保护 92% 分支,3 个应用达 100%。
Modern C/C++ applications are susceptible to Non-Control Data Attacks, where an adversary attempts to exploit memory corruption vulnerabilities for security breaches such as privilege escalation, control-flow manipulation, etc. One such popular class of non-control data attacks is Control-flow Bending, where the attacker manipulates the program data to flip branch outcomes, and divert the program control flow into alternative paths to gain privileges. Unfortunately, despite tremendous advancements in software security, state-of-art defense mechanisms such as Control-flow Integrity (CFI), are ineffective against control-flow bending attacks especially those involving flipping of branch predicates. In this work, we propose a performance-aware defensive scheme, Pythia, which utilizes ARM's pointer authentication (PA) hardware support for dynamic integrity checking of forward slices of vulnerable program variables that can be affected by input channels, and backward slices of branch variables (including pointers) that may be misused by the attacker. We first show that a naive scheme of protecting all vulnerabilities can suffer from an average runtime overhead of 47.88%. We then demonstrate how overheads can be minimized by selectively adding ARM PA-based canaries for statically-allocated program variables and creating secure sections for dynamically-allocated variables to avoid overflows by input channels. Our experiments show that employing this hybrid approach results in an average overhead to 13.07%. We empirically show that Pythia offers better security than state-of-the-art data flow integrity (DFI) technique, especially in pointer-intensive code and C++ applications with 92% branches secured on an average and 100 % secured in case of 3 applications.