CryptoLLM: Harnessing the Power of LLMs to Detect Cryptographic API Misuse

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

1 Scopus citations

Abstract

We propose CryptoLLM, a novel static analysis tool leveraging large language models (LLMs) to detect cryptographic API misuse vulnerabilities. Integrating optimized code slicing with fine-tuned LLMs, CryptoLLM achieves superior detection capabilities. After evaluating four models, we recommend CodeT5. CryptoLLM outperforms existing rule-based tools such as CryptoGuard, CogniCrypt, and SpotBugs on the CryptoAPI-Bench dataset (F1 score: 0.935). For unseen real-world Android apps, with a 20-minute analysis limit, CryptoLLM achieved the highest F1 score of 0.898, analyzing all apps without errors, while other tools failed to analyze a significant proportion, with CryptoGuard’s highest F1 score at 0.645. Although CryptoLLM ’s performance initially dropped to 0.749 F1 score on mutated code, retraining with augmented data improved it to 0.988, demonstrating adaptability across diverse datasets.

Original languageEnglish
Title of host publicationComputer Security – ESORICS 2024 - 29th European Symposium on Research in Computer Security, Proceedings
EditorsJoaquin Garcia-Alfaro, Rafał Kozik, Michał Choraś, Sokratis Katsikas
PublisherSpringer Science and Business Media Deutschland GmbH
Pages353-373
Number of pages21
ISBN (Print)9783031708787
DOIs
StatePublished - 2024
Event29th European Symposium on Research in Computer Security, ESORICS 2024 - Bydgoszcz, Poland
Duration: 16 Sep 202420 Sep 2024

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
Volume14982 LNCS
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference29th European Symposium on Research in Computer Security, ESORICS 2024
Country/TerritoryPoland
CityBydgoszcz
Period16/09/2420/09/24

Fingerprint

Dive into the research topics of 'CryptoLLM: Harnessing the Power of LLMs to Detect Cryptographic API Misuse'. Together they form a unique fingerprint.

Cite this