Binary Control Flow Trimming
A new method of automatically reducing the attack surfaces of binary software is introduced, affording code consumers the power to remove features that are unwanted or unused in a particular deployment context. The approach targets stripped binary native code with no source derived metadata or symbols, can remove semantic features irrespective of whether they were intended and/or known to code developers, and anticipates consumers who can demonstrate desired features (e.g. via unit testing) but who may not know the existence of specific unwanted features, and who lack any formal specifications of the code's semantics. Through a combination of runtime tracing, machine learning, in lined reference monitoring, and contextual control flow integrity enforcement, it is demonstrated that automated code feature removal is nevertheless feasible under these constraints, even for complex programs such as compilers and servers. The approach additionally accommodates consumers whose demonstration of desired features is incomplete; a tunable entropy based metric detects coverage lapses and conservatively preserves unexercised but probably desired flows. A prototype implementation for Intel x86 64 exhibits low runtime overhead for trimmed binaries (about 1.87% and case studies show that consumer side control flow trimming can successfully eliminate zero day vulnerabilities.
CCS