Reverse Engineering of Software Using the Smart Brute Force Method: Step-by-Step Scheme
Израилов Константин Евгеньевич, Mikhail Buinevich · Proceedings of Telecommunication Universities · 2025
Introduction: software vulnerabilities is one of the leading causes of threats to information security. Such vulnerabilities can be countered by directly searching for them in the program code and correcting it. This requires converting the executable code to a higher-level representation that's more suitable for searching and fixes; however, for a number of reasons, existing solutions cannot be considered satisfactory. One of these solutions – an exhaustive search of all possible variants of the source code, converted to a given machine code – is extremely costly in every way. Purpose: developing a less costly and more efficient method of exhaustive searching through source code variants. Methods: quantitative and qualitative comparison of different source code generators, as well as the formalization of this method by writing it in an analytical form. Results: a 7-step scheme for selecting an instance of the source code according to a given machine code is proposed; the authors refer to this method as «smart» because of its optimal combinations of syntactic constructions of the programming language. This method of code generation is based on iterating through paths along the graph of syntactic rules that represent the formal syntax of a programming language in a given space. The syntax is presented as a parameter, which makes its steps completely invariant from the programming language of the source code. After multiple instances of the source code are generated, they are compiled into machine code and compared with the specified instance; if they match, the task of decompilation by smart exhaustive search is considered solved. Practical significance: despite the time cost of using exhaustive searching in solving such tasks, the smart iteration method has shown expert efficiency in a number of application scenarios; thus, it can be directly applied to reverse engineering. Discussion: the qualitative optimization of the "smart" exhaustive search can significantly improve it by genetic algorithms used.