Skip to main content
QUICK REVIEW

[Paper Review] Harnessing the Power of LLM to Support Binary Taint Analysis

Puzhuo Liu, C. P. Sun|arXiv (Cornell University)|Oct 12, 2023
Web Application Security VulnerabilitiesComputer Science6 citations
TL;DR

This paper introduces LATTE, the first large language model (LLM)-powered static binary taint analysis framework that automates vulnerability detection without manual rule engineering. By combining dangerous flow slicing with LLM-based code understanding, LATTE achieves superior detection of taint-style vulnerabilities—identifying 37 previously undetected bugs in real firmware, 7 of which received CVE assignments—demonstrating a significant leap in automation, effectiveness, and scalability over prior state-of-the-art tools.

ABSTRACT

This paper proposes LATTE, the first static binary taint analysis that is powered by a large language model (LLM). LATTE is superior to the state of the art (e.g., Emtaint, Arbiter, Karonte) in three aspects. First, LATTE is fully automated while prior static binary taint analyzers need rely on human expertise to manually customize taint propagation rules and vulnerability inspection rules. Second, LATTE is significantly effective in vulnerability detection, demonstrated by our comprehensive evaluations. For example, LATTE has found 37 new bugs in real-world firmware which the baselines failed to find, and 7 of them have been assigned CVE numbers. Lastly, LATTE incurs remarkably low engineering cost, making it a cost-efficient and scalable solution for security researchers and practitioners. We strongly believe that LATTE opens up a new direction to harness the recent advance in LLMs to improve vulnerability analysis for binary programs.

Motivation & Objective

  • Address the high engineering cost and manual effort required in traditional static binary taint analysis, which relies on hand-crafted propagation and inspection rules.
  • Overcome the limitations of existing taint analysis tools that depend on expert knowledge and are prone to false positives/negatives due to rule inaccuracies.
  • Leverage the semantic understanding and contextual reasoning of large language models (LLMs) to automate vulnerability inspection in stripped, binary programs.
  • Enable scalable, cost-efficient, and fully automated binary vulnerability analysis by replacing manual rule creation with LLM-driven code analysis.
  • Demonstrate the feasibility and effectiveness of integrating LLMs with program analysis techniques for static binary security auditing.

Proposed method

  • Perform dangerous flow slicing to trace taint propagation from known security sinks back to external input sources in binary programs.
  • Extract relevant code snippets from the binary's control flow and data dependency paths to form coherent program fragments for LLM analysis.
  • Construct context-aware prompts using the sliced code fragments, enriched with metadata (e.g., function names, data types) to guide the LLM’s understanding.
  • Utilize GPT-4.0 as the LLM engine to analyze the prompt sequences and identify whether the data flow leads to exploitable vulnerabilities.
  • Apply a two-stage filtering mechanism: first, identify potential taint sources and sinks; second, use the LLM to validate if the data flow constitutes a real vulnerability.
  • Support flexible deployment by allowing pluggable LLM interfaces, enabling future migration to other LLMs as they evolve.
Figure 2. Workflow of LATTE .
Figure 2. Workflow of LATTE .

Experimental results

Research questions

  • RQ1Can LLMs effectively understand and analyze low-level binary code fragments to detect security vulnerabilities without source code?
  • RQ2To what extent can LLM-powered taint analysis outperform traditional rule-based static analyzers in detecting real-world vulnerabilities?
  • RQ3How effective is the combination of dangerous flow slicing and LLM-based reasoning in reducing false positives and negatives in binary taint analysis?
  • RQ4Can the LLM-based approach achieve full automation in vulnerability detection, eliminating the need for manual rule definition in taint propagation and sink inspection?
  • RQ5What are the limitations of LLM-based analysis in handling complex vulnerabilities such as logic bugs or time-window-dependent race conditions in binaries?

Key findings

  • LATTE discovered 37 previously undetected vulnerabilities in real-world firmware, with 7 assigned CVE identifiers, demonstrating its ability to find zero-day-like flaws.
  • The tool outperformed state-of-the-art baselines such as Emtaint, Arbiter, and Karonte across all taint-style vulnerability types, including buffer overflows and command injection.
  • LATTE achieved full automation in vulnerability detection, eliminating the need for manual rule creation for taint propagation and sink inspection.
  • The integration of dangerous flow slicing with LLM-based reasoning significantly improved analysis accuracy and reduced human intervention compared to prior methods.
  • Evaluations on standard datasets and real firmware confirmed that LATTE’s approach is both effective and scalable, with low engineering cost and high detection coverage.
  • Despite its strengths, LATTE faces challenges in analyzing logic vulnerabilities and complex mathematical operations due to the LLM’s limited understanding of deeply nested or time-sensitive code patterns.
Figure 3. The TP intersection among the five test rounds indicates the stability of LATTE . The intersection numbers of the four vulnerability types are 868, 1061, 1660, 198.
Figure 3. The TP intersection among the five test rounds indicates the stability of LATTE . The intersection numbers of the four vulnerability types are 868, 1061, 1660, 198.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.