Skip to main content
QUICK REVIEW

[論文レビュー] LLbezpeky: Leveraging Large Language Models for Vulnerability Detection

Noble Saji Mathews, Yelizaveta Brus|arXiv (Cornell University)|Jan 2, 2024
Advanced Malware Detection TechniquesComputer Science被引用数 10
ひとこと要約

本論文は、GPT-4を用いたプロンプト設計と取得拡張を用いてGheraベンチマークのAndroidの脆弱性を検出し、オープンソースのLLBツールを開発、Vuldroidを含むケーススタディを分析している。

ABSTRACT

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の脆弱性を検出できるかを調査する。
  • LLMsを用いてAndroidアプリの脆弱性を特定・説明・修正するAI主導のワークフローを設計する。

提案手法

  • GheraベンチマークからのAndroidアプリを分析するために、プロンプト設計とRetrieval Augmented Generation(RAG)を用いてGPT-4を使用する。
  • 基本プロンプトと脆弱性の要約を比較するために、プロンプトを反復的に洗練する。
  • 複数のスキャナー(GHERA、VULDROID)を用いたスキャンを実行し、専門家のコメントを付けるCLIを備えるPythonパッケージ(LLB)を実装する。
  • WebViewの情報露出シナリオとVuldroidの複数脆弱性アプリのケーススタディを実施して、検出と修正ガイダンスを評価する。

実験結果

リサーチクエスチョン

  • RQ1RQ1: 基本的なプロンプト技法でLLMsはAndroidの脆弱性を検出できるか、既存ツールとどう比較されるか?
  • RQ2RQ2: どの入力とコンテキスト(知識ベース、APIの使用、権限、エンドポイント、クロス言語コンポーネント)がLLMsのバグ検出を支援するか?
  • RQ3RQ3: Retrieval-augmented generation(RAG)は検出精度と効率にどのような影響を与えるか?
  • RQ4RQ4: AI主導のワークフローは開発者に実行可能な修正ガイダンスとサポートをどのようにもたらすか?

主な発見

  • LLMsは最小限のプロンプト文脈でも安全でないアプリを検出できるが、初期設定では安全アプリの誤分類が顕著である。
  • 簡潔な脆弱性要約を提供すると真陽性が向上し推論時間が短縮され、実験2で66.38%のTP率を達成した。
  • 選択的ファイル要求を伴うRetrieval-augmentedアプローチは効率向上をもたらす可能性があるが、要約を過剰に使用すると幻聴(誤情報)が生じる場合がある。
  • LLBツールキットは複数のスキャナーでのスキャンを可能にし、スキャン後の分析のための専門家コメントをサポートし、例示レポートを作成する。
  • Vuldroidのケーススタディでは、LLBは8件のシード脆弱性のうち6件を正しく識別した。2件の見逃しはファイルベースの分析に関連する適切な断片が不足していたためである。
  • ケーススタディの例は、LLBが脆弱性を説明し修正案を提案できることを示しており、例としてWebViewを介した情報露出の脆弱性とその修正ノートが挙げられる。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。