Extracting Protocol Format as State Machine via Controlled Static Loop Analysis

05/22/2023
by   Qingkai Shi, et al.
0

Reverse engineering of protocol message formats is critical for many security applications. Mainstream techniques use dynamic analysis and inherit its low-coverage problem – the inferred message formats only reflect the features of their inputs. To achieve high coverage, we choose to use static analysis to infer message formats from the implementation of protocol parsers. In this work, we focus on a class of extremely challenging protocols whose formats are described via constraint-enhanced regular expressions and parsed using finite-state machines. Such state machines are often implemented as complicated parsing loops, which are inherently difficult to analyze via conventional static analysis. Our new technique extracts a state machine by regarding each loop iteration as a state and the dependency between loop iterations as state transitions. To achieve high, i.e., path-sensitive, precision but avoid path explosion, the analysis is controlled to merge as many paths as possible based on carefully-designed rules. The evaluation results show that we can infer a state machine and, thus, the message formats, in five minutes with over 90 precision and recall, far better than state of the art. We also applied the state machines to enhance protocol fuzzers, which are improved by 20 in terms of coverage and detect ten more zero-days compared to baselines.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
05/19/2023

Lifting Network Protocol Implementation to Precise Format Specification with Security Applications

Inferring protocol formats is critical for many security applications. H...
research
02/08/2022

SNPSFuzzer: A Fast Greybox Fuzzer for Stateful Network Protocols using Snapshots

Greybox fuzzing has been widely used in stateless programs and has achie...
research
07/23/2020

On Manually Reverse Engineering Communication Protocols of Linux Based IoT Systems

IoT security and privacy has raised grave concerns. Efforts have been ma...
research
02/18/2022

Automated Attack Synthesis by Extracting Finite State Machines from Protocol Specification Documents

Automated attack discovery techniques, such as attacker synthesis or mod...
research
09/10/2023

Bicoptor 2.0: Addressing Challenges in Probabilistic Truncation for Enhanced Privacy-Preserving Machine Learning

This paper primarily focuses on analyzing the problems and proposing sol...
research
07/25/2018

Specification-Based Protocol Obfuscation

This paper proposes a new obfuscation technique of a communication proto...
research
08/18/2019

StreamNet: A DAG System with Streaming Graph Computing

To achieve high throughput in the POW based blockchain systems, a series...

Please sign up or login with your details

Forgot password? Click here to reset