The generation and simplification of dynamic flow graphs enable us to understand obfuscated machine code. Dynamic flow graphs are used to mitigate the effects of obfuscation using information from concrete executions. In this research, two types of dynamic flow graphs are used: dynamic data flow graphs and dynamic control flow graphs. Dynamic data flow graphs are constructed to capture the relationship between the input and output. They have both symbolic expressions and concrete values of the computation results. The effects of the obfuscation can be removed by simplifying the graphs using algebraic identities and the general properties of well-behaved programs. Dynamic control flow graphs represent the intrinsic control flow information. Their nodes have dynamic data flow graphs that correspond to the computations between variable-dependent jumps. Their edges connect the nodes, annotating the directions of the jumps with branch conditions. Before constructing dynamic control flow graphs, a dependence analysis is conducted on all jumps in the obfuscated execution to find jumps that correspond to the jumps in the original code. That is, input-dependent jumps and variable-dependent jumps are identified using dynamic data flow graphs for jump target addresses. Solvers are applied to the graphs to synthesize the branch conditions of the jumps. Input values for possible execution paths that can improve the code coverage can be identified based on an analysis of the branch conditions. The efficacy of the proposed approach is evaluated against various obfuscators. The experimental results show that the complexity of the simplified flow graphs from obfuscated executables is comparable to that from the original executables. With dynamic flow graphs, obfuscated malicious software becomes analyzable, allowing us to respond to cyberattacks more effectively.
동적 흐름 그래프를 바탕으로 난독화된 기계 코드를 분석하면 원본 코드의 의미를 이해할 수 있다. 동적 자료 흐름 그래프에는 계산의 기호 표현과 구체적인 값을 담을 수 있으며, 그래프를 정리하여 난독화의 영향을 줄일 수 있다. 동적 제어 흐름 그래프에는 프로그램의 제어 흐름이 담기는데, 변수의 영향을 받는 점프를 기준으로 만들어서 제어 구조에 적용된 난독화를 해제한다. 동적 제어 흐름 그래프의 각 노드에는 동적 자료 흐름 그래프가 있어서 어떠한 계산을 하는지 이해할 수 있으며, 각 에지에는 합성으로 정리한 분기 조건이 들어 있다. 제안한 방법이 효과적인지 확인하기 위해 다양한 난독화 도구를 대상으로 실험을 수행하였다. 제안한 방법으로 난독화가 적용된 코드로부터 생성한 그래프의 복잡도는 난독화를 적용하기 전 코드로부터 생성한 그래프와 크게 다르지 않았다. 난독화된 악성 소프트웨어가 어떤 일을 하는지 동적 흐름 그래프를 이용하여 정리하면 효과적으로 대응 전략을 수립할 수 있다.