LLM4Fuzz: Guided Fuzzing of Smart Contracts with Large Language Models

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Shou, Chaofan, Liu, Jing, Lu, Doudou, Sen, Koushik
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929217966440448
author Shou, Chaofan
Liu, Jing
Lu, Doudou
Sen, Koushik
author_facet Shou, Chaofan
Liu, Jing
Lu, Doudou
Sen, Koushik
contents As blockchain platforms grow exponentially, millions of lines of smart contract code are being deployed to manage extensive digital assets. However, vulnerabilities in this mission-critical code have led to significant exploitations and asset losses. Thorough automated security analysis of smart contracts is thus imperative. This paper introduces LLM4Fuzz to optimize automated smart contract security analysis by leveraging large language models (LLMs) to intelligently guide and prioritize fuzzing campaigns. While traditional fuzzing suffers from low efficiency in exploring the vast state space, LLM4Fuzz employs LLMs to direct fuzzers towards high-value code regions and input sequences more likely to trigger vulnerabilities. Additionally, LLM4Fuzz can leverage LLMs to guide fuzzers based on user-defined invariants, reducing blind exploration overhead. Evaluations of LLM4Fuzz on real-world DeFi projects show substantial gains in efficiency, coverage, and vulnerability detection compared to baseline fuzzing. LLM4Fuzz also uncovered five critical vulnerabilities that can lead to a loss of more than $247k.
format Preprint
id arxiv_https___arxiv_org_abs_2401_11108
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle LLM4Fuzz: Guided Fuzzing of Smart Contracts with Large Language Models
Shou, Chaofan
Liu, Jing
Lu, Doudou
Sen, Koushik
Cryptography and Security
Software Engineering
As blockchain platforms grow exponentially, millions of lines of smart contract code are being deployed to manage extensive digital assets. However, vulnerabilities in this mission-critical code have led to significant exploitations and asset losses. Thorough automated security analysis of smart contracts is thus imperative. This paper introduces LLM4Fuzz to optimize automated smart contract security analysis by leveraging large language models (LLMs) to intelligently guide and prioritize fuzzing campaigns. While traditional fuzzing suffers from low efficiency in exploring the vast state space, LLM4Fuzz employs LLMs to direct fuzzers towards high-value code regions and input sequences more likely to trigger vulnerabilities. Additionally, LLM4Fuzz can leverage LLMs to guide fuzzers based on user-defined invariants, reducing blind exploration overhead. Evaluations of LLM4Fuzz on real-world DeFi projects show substantial gains in efficiency, coverage, and vulnerability detection compared to baseline fuzzing. LLM4Fuzz also uncovered five critical vulnerabilities that can lead to a loss of more than $247k.
title LLM4Fuzz: Guided Fuzzing of Smart Contracts with Large Language Models
topic Cryptography and Security
Software Engineering
url https://arxiv.org/abs/2401.11108