Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering

Hamed Jelodar, Samita Bai, Parisa Hamedi, Hesamodin Mohammadian, Roozbeh Razavi-Far, Ali Ghorbani · 2025

Read Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering by Hamed Jelodar, Samita Bai, Parisa Hamedi, Hesamodin Mohammadian, Roozbeh Razavi-Far, Ali Ghorbani (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-07137.txt.

Introduction

Hamed Jelodar and co-authors wrote a 2025 review of language models in software security. The review centers on malware: spotting it, reading its code, and pulling apart how it works. Models of this kind read code with both meaning and structure in view, which helps them catch fresh variants.

The authors map the recent wave of studies and sort their methods and trends. They give weight to static analysis, where code is read without being run. Notable data sets and special purpose models built for malware work are also covered. The review aims to serve as a guide for researchers and defense teams who want a clear view of this fast field.

Catalog record

CREATORHamed Jelodar, Samita Bai, Parisa Hamedi, Hesamodin Mohammadian, Roozbeh Razavi-Far, Ali Ghorbani
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE121 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-07137

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Large Language Model (LLM) for Software Security: Code Analysis, Malware Analysis, Reverse Engineering Hamed Jelodar, Samita Bai, Parisa Hamedi, Hesamodin Mohammadian, Roozbeh Razavi-Far, Ali Ghorbani Abstract Large Language Models (LLMs) have recently emerged as powerful tools in cybersecurity, offering advanced capabilities in malware detection, generation, and real-time monitoring. Numerous studies have explored their application in cybersecurity, demonstrating their effectiveness in identifying novel malware variants, analyzing malicious code structures, and enhancing automated threat analysis. Several transformer-based architectures and LLM-driven models have been proposed to improve malware analysis, leveraging semantic and structural insights to recognize malicious intent more accurately. This study presents a comprehensive review of LLM-based approaches in malware code analysis, summarizing recent advancements, trends, and methodologies. We examine notable scholarly works to map the research landscape, identify key challenges, and highlight emerging innovations in LLM-driven cybersecurity. Additionally, we emphasize the role of static analysis in malware detection, introduce notable datasets and specialized LLM models, and discuss essential datasets supporting automated malware research. This study serves as a valuable resource for researchers and cybersecurity professionals, offering insights into LLM-powered malware detection and defence strategies while outlining future directions for strengthening cybersecurity resilience. [ orcid=0000-0002-0713-3143] † † highlights: A review of recent works on LLM applications in malware code analysis, summarizing current research trends. First work exploring malware code analysis using LLMs, covering detection, generation, monitoring, reverse-engineering, and family analysis. Investigation of how LLMs interpret source code semantics and structure to identify malicious behavior. Insights into the role of LLMs in improving malware detection by recognizing and predicting code patterns. Exploring the potential of LLMs to improve malware code analysis based on reverse-engineering process. keywords Large Language Model ,Malware Detection ,Source Code Analysis,Large Concept Model ,Knowledge-Enhanced Pretrained ,Revere Engendering † † corresponding: Corresponding author 1 Introduction In recent times, the growth of large language models (LLMs) has brought substantial changes to software security. These smart language models are now being used to improve how we check code, find harmful software, and break down programs. With the extensive knowledge embedded within LLMs, security professionals can automate and refine the process of identifying vulnerabilities, understanding malicious behaviors, and deconstructing complex software systems. This integration not only accelerates analysis but also offers nuanced insights that were previously challenging to obtain through traditional methods. Malicious code detection is a critical aspect of cybersecurity, as it helps protect computer systems and networks from various types of attacks. With malware’s increasing sophistication and complexity, traditional detection methods often struggle to keep pace. The advent of LLMs has opened up new possibilities for enhancing malicious code detection by leveraging the power of artificial intelligence (AI) and natural language processing (NLP) [ 1 ] . Several notable papers explore the application of transformers and LLMs across various fields, including malicious code detection and analysis of Portable Executable (PE) files [ 2 , 3 , 4 ] , code classification [ 5 , 6 ] , code monitoring and inspection [ 7 , 8 , 9 , 10 ] , and code generation [ 11 , 7 , 8 ] . For example, in [ 12 ] , the authors focused on evaluating LLMs for zero-shot learning in detecting malicious code, comparing code-specific models ( Code-llama [ 13 ] ) with general-purpose models (Llama3 [ 14 ] , GPT-3.5 [ 15 ] , and Claude [ 16 ] ). The study emphasized the effectiveness of prompts highlighting experience and maliciousness indicators over role-playing and noted that repeated questioning reduced LLM confidence. Moreover, in [ 11 ] , the authors explored the risks of LLMs being exploited for malicious code generation, such as advanced phishing malware. They created MCGTEST, a dataset with 406 tasks, and developed MCGMARK, a robust watermarking method for tracing LLM-generated code. This approach, validated on the DeepSeek-Coder model [ 17 ] , achieved a success rate for embeddings while maintaining the code quality. In [ 18 ] , the authors focused on developing LAMD, a framework for Android malware detection and classification using LLMs. Their primary goal was to improve detection accuracy by analyzing malware behavior at multiple levels, ranging from low-level instructions to high-level semantics. This approach allowed for context-driven predictions and explanations, enhancing the understanding of the malware’s operation. The researchers utilized JADX3 [ 19 ] to decompile the malware, concatenating all the pseudo source codes for input. This step was essential for ensuring a comprehensive analysis. In addition to GPT-4o-mini, they selected Gemini 1.5 Pro as another comparison model, praised for its ability to handle the longest context windows and its proven malware detection capabilities, making it a strong contender for effective malware classification. Figure 1 : An overview of various malware code aspects explored in this research Recent research highlights the remarkable potential of LLMs in analyzing malware code, building on their proven success in understanding and interpreting such as. LLM models leverage advanced natural language processing techniques to interpret and analyze code patterns, enabling enhanced detection of vulnerabilities and malicious behaviors. LLMs can identify subtle nuances in malware coding techniques by utilizing pre-trained knowledge from vast datasets, facilitating improved threat detection and remediation strategies. As research in this area progresses, the integration of LLMs into cybersecurity frameworks promises to revolutionize how analysts approach malware analysis and response. In this paper, we aim to explore recent studies on how LLMs analyze the semantics and logic of source code to identify malicious behaviors. We highlight their capabilities in recognizing malware patterns and discerning logical flows indicative of malicious intent. We aim to provide an overview of advancements in LLM applications for malware detection and future research directions in cybersecurity. Research Motivation and Contributions: Given the proven effectiveness of LLMs in various analytical domains, particularly natural language processing, and cybersecurity, we are motivated to explore their potential applications in malware code analysis. This study aims to examine how LLMs can be leveraged for detecting, analyzing, and understanding malware code through different models, datasets, and techniques. As illustrated in Figure 1 , we investigate multiple aspects of malware code analysis using LLMs. The primary objective of this work is to provide a comprehensive overview of LLM-based approaches in malware code analysis. In summary, this paper makes four key contributions: • A review of recent works on LLM applications in malware code analysis is presented, synthesizing current research findings and trends in the field. • To the best of our knowledge, this is the first work that investigates recent aspects of malware code analysis using LLMs, such as malware code detection, generation, monitoring, reverse-engineering, and family-code analysis. • We explore how LLMs interpret the semantics and structure of source code to effectively identify malicious behaviors. • We investigate and present different future works and datasets that can be helpful for malware code analysis using LLMs. Evaluate and Analyze Relevant Research: This study consider a comprehensive methodology for identifying pertinent research, encompassing the selection of data sources, search criteria, and the development of classification frameworks. The analysis is built upon an in-depth review of academic literature focused on malware detection in software code, with particular attention given to the most recent and widely cited papers that represent the forefront of research in the field. By critically examining these studies,

Read the complete text