[논문 리뷰] LLbezpeky: Leveraging Large Language Models for Vulnerability Detection
본 논문은 GPT-4를 프롬프트 엔지니어링과 검색 보강으로 사용해 Ghera 벤치마크의 Android 취약점을 탐지하고, 오픈 소스 LLB 도구를 개발하며, Vuldroid를 포함한 사례 연구를 분석한다.
Despite the continued research and progress in building secure systems, Android applications continue to be ridden with vulnerabilities, necessitating effective detection methods. Current strategies involving static and dynamic analysis tools come with limitations like overwhelming number of false positives and limited scope of analysis which make either difficult to adopt. Over the past years, machine learning based approaches have been extensively explored for vulnerability detection, but its real-world applicability is constrained by data requirements and feature engineering challenges. Large Language Models (LLMs), with their vast parameters, have shown tremendous potential in understanding semnatics in human as well as programming languages. We dive into the efficacy of LLMs for detecting vulnerabilities in the context of Android security. We focus on building an AI-driven workflow to assist developers in identifying and rectifying vulnerabilities. Our experiments show that LLMs outperform our expectations in finding issues within applications correctly flagging insecure apps in 91.67% of cases in the Ghera benchmark. We use inferences from our experiments towards building a robust and actionable vulnerability detection system and demonstrate its effectiveness. Our experiments also shed light on how different various simple configurations can affect the True Positive (TP) and False Positive (FP) rates.
연구 동기 및 목표
- 정적/동적 분석의 한계 속에서 Android 앱에 대한 효과적인 취약점 탐지의 필요성을 제고한다.
- 기본 프롬프트와 추가 컨텍스트를 사용했을 때 LLM이 Android 취약점을 탐지할 수 있는지 조사한다.
- Android 앱의 취약점을 식별하고 설명하며 시정하는 AI 기반 워크플로를 설계한다.
제안 방법
- Ghera 벤치마크의 Android 앱을 분석하기 위해 프롬프트 엔지니어링과 Retrieval Augmented Generation (RAG)을 사용하는 GPT-4를 활용한다.
- 프롬프트를 반복적으로 다듬어 기본 프롬프트와 취약점 요약을 비교한다.
- 여러 스캐너(GHERA, VULDROID)로 스캔을 실행하고 전문가 해설을 첨부하기 위한 CLI가 있는 Python 패키지(LLB)를 구현한다.
- WebView 정보 노출 시나리오와 Vuldroid의 다중 취약점 앱에 대한 사례 연구를 수행하여 탐지 및 시정 지침을 평가한다.
실험 결과
연구 질문
- RQ1RQ1: LLM이 기본 프롬프트 기법으로 Android 취약점을 탐지할 수 있으며, 기존 도구와 어떻게 비교되는가?
- RQ2RQ2: 어떤 입력과 맥락(지식 베이스, API 사용, 권한, 엔드포인트, 다언어 구성요소)이 LLM이 버그를 발견하는 데 도움이 되는가?
- RQ3RQ3: 검색 보강 생성(RAG)이 탐지 정확도와 효율성에 어떤 영향을 미치는가?
- RQ4RQ4: AI 주도 워크플로가 개발자에게 실행 가능한 시정 지침 및 지원을 어떻게 제공할 수 있는가?
주요 결과
- LLMs는 최소한의 프롬프트 맥락으로도 불안정한 앱을 플래그할 수 있지만 초기 설정에서 보안 앱에 대한 오분류가 두드러진다.
- 간단한 취약점 요약을 제공하면 실제 양성(true positives)을 개선하고 추론 시간을 단축하여 실험 2에서 66.38%의 TP 비율을 달성한다.
- 선별된 파일 요청과 함께 Retrieval-Augmented 접근은 효율성을 높일 수 있지만 요약이 과도하게 사용되면 허상(hallucinations)이 발생할 수 있다.
- LLB 도구 모음은 다중 스캐너로 스캐닝을 가능하게 하고 사후 분석을 위한 전문가 해설을 지원하며 예시 보고서를 생성한다.
- Vuldroid 사례 연구에서 LLB는 8개에 대해 6개 시드 취약점을 정확히 식별했고, 두 건은 파일 기반 분석에 필요한 관련 스니펫이 누락되어 발생했다.
- 사례 연구 예시들은 LLB가 취약점을 설명하고 수정안을 제시할 수 있음을 보여주며, 예를 들어 WebView를 통한 정보 노출 취약점에 대한 시정 메모를 포함한다.
이 논문 읽기
누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.
누빈트에서 이 논문 읽기이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.