Litcius/Paper detail

Lifting Network Protocol Implementation to Precise Format Specification with Security Applications

Qingkai Shi, J. X. Shao, Yapeng Ye, Mingwei Zheng, Xiangyu Zhang

202316 citationsDOIOpen Access PDF

Abstract

While inferring protocol formats is critical for many security applications, existing techniques often fall short of coverage, inasmuch as almost all of them are in a fashion of dynamic analysis and driven by a limited number of network packets. If a feature is not present in the input packets, the feature will be missed in the resulting formats. To tackle this problem, we develop a novel static program analysis that infers protocol message formats from the implementation of common top-down protocol parsers. However, to achieve the trifecta of coverage, precision, and efficiency, we have to address two challenges, namely path explosion and disordered path constraints. To this end, our approach uses abstract interpretation to produce a novel data structure called the abstract format graph. The graph structure delimits precise but costly operations to only small regions, thus ensuring precision and efficiency at the same time. Our inferred formats are of high coverage and precisely specify both field boundaries and semantic constraints among packet fields. Our evaluation shows that we can infer formats for a protocol in one minute with over 95% precision and recall, much better than four baselines. Our inferred formats can substantially enhance existing protocol fuzzers, improving the coverage by 20% to 260% and discovering 53 zero-days with 47 assigned CVEs. We also provide case studies of adopting our inferred formats in network traffic auditing and network intrusion detection.

Topics & Concepts

Computer scienceNetwork packetProtocol (science)GraphField (mathematics)Network securityComputer networkPath (computing)Distributed computingData miningTheoretical computer sciencePure mathematicsMedicineMathematicsPathologyAlternative medicineAdvanced Malware Detection TechniquesNetwork Security and Intrusion DetectionSoftware Testing and Debugging Techniques
Lifting Network Protocol Implementation to Precise Format Specification with Security Applications | Litcius