[논문 리뷰] Automated software vulnerability detection with machine learning
데이터 기반 ML 접근법은 소스 기반 및 빌드 기반 특징을 사용하여 C/C++ 함수의 취약점을 탐지합니다; 최상의 모델(TextCNN 특징을 Extra-Trees 분류기에 입력)은 PR AUC 0.49 및 ROC AUC 0.87를 달성합니다.
Thousands of security vulnerabilities are discovered in production software each year, either reported publicly to the Common Vulnerabilities and Exposures database or discovered internally in proprietary code. Vulnerabilities often manifest themselves in subtle ways that are not obvious to code reviewers or the developers themselves. With the wealth of open source code available for analysis, there is an opportunity to learn the patterns of bugs that can lead to security vulnerabilities directly from data. In this paper, we present a data-driven approach to vulnerability detection using machine learning, specifically applied to C and C++ programs. We first compile a large dataset of hundreds of thousands of open-source functions labeled with the outputs of a static analyzer. We then compare methods applied directly to source code with methods applied to artifacts extracted from the build process, finding that source-based models perform better. We also compare the application of deep neural network models with more traditional models such as random forests and find the best performance comes from combining features learned by deep models with tree-based models. Ultimately, our highest performing model achieves an area under the precision-recall curve of 0.49 and an area under the ROC curve of 0.87.
연구 동기 및 목표
- 소프트웨어에서 확장 가능한 취약점 탐지의 필요성을 동기 부여하고 해결한다.
- 정적 분석기로 라벨링된 대규모 오픈소스 코드 데이터세트를 활용하여 ML 모델을 학습한다.
- 취약점 탐지를 위한 소스 기반 특징과 빌드 기반 특징을 비교한다.
- 전통적 모델과 딥러닝 모델을 평가하고 성능 향상을 위한 모델 융합을 탐구한다.
제안 방법
- 두 개의 특징 파이프라인을 구성한다: (1) 컴파일 시 추출된 CFG, use-def, 및 op-vec로부터의 빌드 기반 특징; (2) 커스텀 C/C++ 렉서, Bag-of-Words, 및 word2vec 임베딩을 사용한 소스 기반 토큰 특징.
- Clang 정적 분석기 출력으로 파생된 함수 수준 레이블에 대해 여러 분류기를 학습시키고, buggy 대 good를 지상 진실로 취급한다.
- 소스 기반 모델 3종을 평가한다: BoW 특징을 가진 Extra Trees, word2vec 초기화를 가진 TextCNN, TextCNN 특징을 Extra Trees에 입력하는 모델; 또한 고정 크기 빌드 특징 벡터에 대한 빌드 기반 Random Forest와 비교한다.
- 빌드 기반 특징과 소스 기반 BoW 특징을 연결(concatenate)하여 결합 모델을 조사한다.
- 두 데이터셋(Debian 및 GitHub)을 사용하고 평가 타당성을 보장하기 위해 엄격한 중복 제거를 수행한다.
실험 결과
연구 질문
- RQ1취약점 탐지를 소스 코드 패턴만으로 효과적으로 학습할 수 있는가, 아니면 빌드 파생 특징이 보완 정보를 제공하는가?
- RQ2딥러닝 표현(word2vec, TextCNN)이 이 작업에서 전통적인 모델보다 성능을 초과하는가, 그리고 모델 융합이 성능을 향상시키는가?
- RQ3특성상 다른 두 데이터셋(Debian vs. GitHub)에서 소스 기반과 빌드 기반 접근 방식의 차이는 어떠한가?
주요 결과
- 소스 기반 모델이 데이터셋 전반에서 ROC AUC에서 빌드 기반 모델보다 우수하다.
- 가장 우수한 소스 기반 모델(TextCNN 특징을 Extra Trees에 입력)은 Debian+Github 결합 데이터셋에서 ROC AUC 0.87 및 PR AUC 0.49를 달성한다.
- BoW+ET는 동일 데이터셋에서 ROC AUC 0.85 및 PR AUC 0.44를 달성; word2vec+CNN은 ROC AUC 0.87 및 PR AUC 0.45; CNN 특징+ET는 ROC AUC 0.87 및 PR AUC 0.49.
- 빌드 기반 탐지에서 Debian은 ROC AUC 0.76 및 PR AUC 0.21를, Github는 ROC AUC 0.74 및 PR AUC 0.22를 보인다.
- 복합 모델(빌드+소스)은 일반적으로 개별 소스보다 더 나은 성능을 보이며, 예를 들어 Github에서: Build 0.74/0.22, Source 0.81/0.29, Combined 0.82/0.32.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.