Automatically Mitigating Vulnerabilities in x86 Binary Programs via Partially Recompilable Decompilation

02/24/2022
by   Pemma Reiter, et al.
0

When vulnerabilities are discovered after software is deployed, source code is often unavailable, and binary patching may be required to mitigate the vulnerability. However, manually patching binaries is time-consuming, requires significant expertise, and does not scale to the rate at which new vulnerabilities are discovered. To address these problems, we introduce Partially Recompilable Decompilation (PRD), which extracts and decompiles suspect binary functions to source where they can be patched or analyzed, applies transformations to enable recompilation of these functions (partial recompilation), then employs binary rewriting techniques to create a patched binary. Although decompilation and recompilation do not universally apply, PRD's fault localization identifies a function subset that is small enough to admit decompilation and large enough to address many vulnerabilities. Our approach succeeds because decompilation is limited to a few functions and lifting facilitates analysis and repair. To demonstrate the scalability of PRD, we evaluate it in the context of a fully automated end-to-end scenario that relies on source-level Automated Program Repair (APR) methods to mitigate the vulnerabilities. We also evaluate PRD in the context of human-generated source-level repairs. In the end-to-end experiment, PRD produced test-equivalent binaries in 84 patched binaries incur no significant run-time overhead. When combined with APR tools and evaluated on the DARPA Cyber Grand Challenge (CGC) benchmarks, PRD achieved similar success rates as the winning CGC entries, while presenting repairs as source-level patches which can be reviewed by humans; In some cases, PRD finds higher-quality mitigations than those produced by top CGC teams. We also demonstrate that PRD successfully extends to real-world binaries and binaries that are produced from languages other than C.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/10/2017

Practical Integer Overflow Prevention

Integer overflows in commodity software are a main source for software b...
research
05/29/2023

How Effective Are Neural Networks for Fixing Security Vulnerabilities

Security vulnerability repair is a difficult task that is in dire need o...
research
04/16/2021

High-Quality Automated Program Repair

Automatic program repair (APR) has recently gained attention because it ...
research
07/13/2023

SecureFalcon: The Next Cyber Reasoning System for Cyber Security

Software vulnerabilities leading to various detriments such as crashes, ...
research
09/15/2023

REEF: A Framework for Collecting Real-World Vulnerabilities and Fixes

Software plays a crucial role in our daily lives, and therefore the qual...
research
12/04/2019

Using Sequence-to-Sequence Learning for Repairing C Vulnerabilities

Software vulnerabilities affect all businesses and research is being don...
research
03/25/2022

C to Checked C by 3C

Owing to the continued use of C (and C++), spatial safety violations (e....

Please sign up or login with your details

Forgot password? Click here to reset