컨트롤 플로우 코드 난독화 작업에서의 Chain of Thought (CoT) 접근 방식 분석
Analyzing Chain of Thought (CoT) Approaches in Control Flow Code Deobfuscation Tasks
코드 난독화는 프로그램의 원래 동작을 유지하면서 사람이 읽을 수 있는 형태로 복원하는 작업입니다. 실제로 이 작업은 복잡하고 비용이 많이 드는 분석 도구를 사용한 수일에서 수개월에 이르는 수동 작업이 필요합니다. 본 논문에서는 Chain-of-Thought (CoT) 프롬프팅 기반의 대안적인 접근 방식을 탐구합니다. CoT 프롬프팅은 대규모 언어 모델이 코드 분석에 적합한 명시적이고 단계적인 추론을 통해 안내되도록 하는 방법입니다. 우리는 컨트롤 플로우 난독화, 특히 컨트롤 플로우 플래트닝 (CFF), 불투명한 조건문 및 이들의 조합에 초점을 맞추고, 컨트롤 플로우 그래프의 구조적 복원과 프로그램 의미의 보존을 측정합니다. 우리는 최첨단 대규모 언어 모델 5개를 평가하고, CoT 프롬프팅이 단순 프롬프팅에 비해 난독화 해제 품질을 크게 향상시키는 것을 보여줍니다. 우리는 다양한 표준 C 벤치마크 세트에 대한 접근 방식을 검증하고, 컨트롤 플로우 그래프에 대한 구조적 지표와 출력 유사성을 기반으로 한 의미적 지표를 사용하여 결과를 보고합니다. 테스트된 모델 중 CoT를 적용한 GPT5는 평균적으로 벤치마크에서 제로-샷 프롬프팅에 비해 컨트롤 플로우 그래프 재구성에서 약 16%, 의미 보존에서 약 20.5%의 성능 향상을 보여주며, 가장 뛰어난 전반적인 성능을 보였습니다. 또한, 모델의 성능은 난독화 수준과 선택된 난독화 도구뿐만 아니라, 원래 컨트롤 플로우 그래프의 고유한 복잡성에 따라 달라지는 것을 확인했습니다. 종합적으로, 이러한 결과는 CoT 기반 대규모 언어 모델이 코드 난독화 작업에 효과적인 도구가 될 수 있으며, 코드 설명력을 향상시키고, 더욱 정확한 컨트롤 플로우 그래프 재구성을 제공하며, 프로그램 동작을 더 잘 보존하고, 역공학에 필요한 수동 노력을 줄일 수 있음을 시사합니다.
Code deobfuscation is the task of recovering a readable version of a program while preserving its original behavior. In practice, this often requires days or even months of manual work with complex and expensive analysis tools. In this paper, we explore an alternative approach based on Chain-of-Thought (CoT) prompting, where a large language model is guided through explicit, step-by-step reasoning tailored for code analysis. We focus on control flow obfuscation, including Control Flow Flattening (CFF), Opaque Predicates, and their combination, and we measure both structural recovery of the control flow graph and preservation of program semantics. We evaluate five state-of-the-art large language models and show that CoT prompting significantly improves deobfuscation quality compared with simple prompting. We validate our approach on a diverse set of standard C benchmarks and report results using both structural metrics for control flow graphs and semantic metrics based on output similarity. Among the tested models and by applying CoT, GPT5 achieves the strongest overall performance, with an average gain of about 16% in control-flow graph reconstruction and about 20.5% in semantic preservation across our benchmarks compared to zero-shot prompting. Our results also show that model performance depends not only on the obfuscation level and the chosen obfuscator but also on the intrinsic complexity of the original control flow graph. Collectively, these findings suggest that CoT-guided large language models can serve as effective assistants for code deobfuscation, providing improved code explainability, more faithful control flow graph reconstruction, and better preservation of program behavior while potentially reducing the manual effort needed for reverse engineering.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.