구형준 교수 (SecAI 연구실), ACM Asia Conference on Computer and Communications Security, 2024 (ASIACCS ’24) 논문 게재 승인
- 융합보안대학원
- 조회수240
- 2024-01-26
SecAI 연구실 (지도교수 구형준, https://secai.skku.edu)의 Nozima (석사과정) 학생의 "BinAdapter: Leveraging Continual Learning for Inferring Function Symbol Names in a Binary" 논문이 보안분야 우수학회인 ACM Asia Conference on Computer and Communications Security 2024 (ASIACCS ’24)에 게재 승인되어 2024년 7월에 발표될 예정입니다.
실행 바이너리 리버싱을 인공지능을 활용해 도와줄 수 있는 여러 방식 중에 프로그래머가 직접 label한 함수명을 바이너리 상의 어셈블리어로부터 학습하고 예측하는 생성형 인공지능 모델 기법이 있습니다. 하지만 바이너리는 컴파일러 도구나 최적화 수준 등 변형 뿐 아니라 다양한 프로그램 문맥을 계속 작성해 만들어 낼 수 있습니다. 기존의 생성형 인공지능 모델은 주어진 데이터셋 (pre-defined dataset)으로 훈련한 정적 모델 (static model)이라 지속적으로 생성되는 데이터셋을 반영하는 데 어려움이 있습니다. 이에 최근 인공지능은 평생학습 (lifelong learning) 또는 계속학습 (continual learning; CL)으로 불리는 기법을 통해 마치 인간이 새로운 지식을 학습할 수 있는 형태로 agent를 강화하려 하는 노력을 하고 있습니다.
본 논문에서는 함수명 예측 인공지능 모델에 계속학습 중 adapter라는 기법을 transformer 기반의 모델에 삽입해 기존에 학습했던 기억을 잊어버리지 않고 (catastrophic forgetting) 신규 데이터셋에서 학습할 수 있는 BinAdapter라는 방식을 제시합니다. 특히 소스(기계 명령어)나 타겟(함수 이름)에서 추가적인 명령어 토큰(instruction token)이 CL을 사용한 모델의 전체 성능에 큰 영향을 미친다는 사실을 실험적으로 확인했습니다. BinAdapter는 내부적으로 다음 세 가지 접근 방식을 채택합니다. 첫째, 소스와 타겟 모두에 추가 토큰이 거의 없는 경우 일반적인 댑터를 삽입합니다. 둘째, 소스에 추가 토큰이 있는 경우 멀티 신경 기계 번역 (M-NMT; Multi-Neural Machine Translation)을 활용하고 소스 임베딩을 미세 조정(fine-tuning)합니다. 셋째, 소스와 타겟 모두 추가 토큰이 있는 경우 소스와 타겟 임베딩 모두 미세 조정 (fine-tuning)합니다.
Abstract.
Binary reverse engineering is crucial to gain insights into the inner workings of a stripped binary. Yet, it is challenging to read the original semantics from a binary code snippet because of the unavailability of high-level information in the source, such as function names, variable names, and types. Recent advancements in deep learning show the possibility of recovering such vanished information with a well-trained model from a pre-defined dataset. Albeit a static model’s notable performance, it can hardly cope with an ever-increasing data stream (e.g., compiled binaries) by nature. The two viable approaches for ceaseless learning are retraining the whole dataset from scratch and fine-tuning a pre-trained model; however, retraining suffers from large computational overheads and fine-tuning from performance degradation (i.e., catastrophic forgetting). Lately, continual learning (CL) tackles the problem of handling incremental data in security domains (e.g., network intrusion detection, malware detection) using reasonable resources while maintaining performance in practice. In this paper, we focus on how CL assists the improvement of a generative model that predicts a function symbol name from a series of machine instructions. To this end, we introduce BinAdapter, a system that can infer function names from an incremental dataset without performance degradation from an original dataset by leveraging CL techniques. Our major finding shows that incremental tokens in the source (i.e., machine instructions) or the target (i.e., function names) largely affect the overall performance of a CL-enabled model. Accordingly, BinAdapter adopts three built-in approaches: i) inserting adapters in case of no incremental tokens in both the source and target, ii) harnessing multilingual neural machine translation (M-NMT) and fine-tuning the source embeddings with i) in case of incremental tokens in the source, and iii) fine-tuning target embeddings with ii) in case of incremental tokens in both. To demonstrate the effectiveness of BinAdapter, we evaluate the above three scenarios using incremental datasets with or without a set of new tokens (e.g., unseen machine instructions or function names), spanning across different architectures and optimization levels. Our empirical results show that BinAdapter outperforms the state-of-the-art CL techniques for an F1 of up to 24.3% or a Rouge-l of 21.5% in performance.