Abstract
While Large Language Models (LLMs) are increasingly applied to security tasks, their ability to perform expert-level malware auditing—identifying malicious intent and providing verifiable evidence—remains a critical research gap. This paper presents MalEval, a framework designed to evaluate LLMs across four key auditing tasks: Function Prioritization, Evidence Attribution, Behavioral Synthesis, and Sample Discrimination. Using a novel Context-driven Intermediate Structural Representation and the Workload Reduction Score (WRS), we benchmark seven prominent LLMs. Our findings reveal that while leading models like Claude-3.7-Sonnet achieve a WRS of over 50%, significant hurdles remain in causal reasoning and the elimination of hallucinations.
Introduction
In cybersecurity, the primary focus has traditionally been on classification: distinguishing between benign and malicious software. However, the operational bottleneck in Security Operations Centers (SOCs) lies in auditing. Human analysts must move beyond binary labels to understand what a piece of malware does and how it executes those actions. This process requires identifying specific code segments as evidence, a task that is increasingly difficult as malicious logic is often buried within vast amounts of benign code.
The MalEval Framework
To rigorously assess LLM performance in this domain, the authors developed MalEval. This framework transitions evaluation from simple "pass/fail" metrics to a multi-faceted approach aligned with real-world analyst workflows.
Core Components
- Code Context Reduction: To handle the large scale of Android APKs, the framework reduces code to essential lifecycle methods and entry points.
- Context-driven Intermediate Structural Representation: Instead of raw code, LLMs are provided with functionality summaries of callers and callees, providing inter-procedural context that aids in understanding function roles.
- Expert-guided Evaluation Tasks: The framework defines four distinct tasks to measure auditing capability, moving from low-level attribution to high-level understanding.
Evaluation Tasks and Metrics
- Task 1: Function Prioritization: Evaluates the model's ability to locate highly sensitive functions. Performance is measured by the Fidelity Score (FS).
- Task 2: Evidence Attribution: Measures how well the LLM links sensitive API calls to their corresponding functions using the Coverage-of-Selected Rate (CSR).
- Task 3: Behavioral Synthesis: Assesses the quality of the generated narrative report, focusing on Report Quality (RQ) and Hallucination Evaluation (Evidence/Syntax Authenticity Scores).
- Task 4: Sample Discrimination: Tests the model's ability to correct false positives from other detection systems, measured by the False Positive Correction Rate (FPCR).
The final Workload Reduction Score (WRS) serves as a composite metric to estimate the percentage of manual effort an LLM can realistically save a human auditor.
Datasets and Experimental Setup
The evaluation utilized a diverse dataset designed to challenge models on both historical and contemporary threats:
- Archive Malware (2016–2021): 222 samples with established expert reports.
- Latest Malware (Post-July 2024): 33 samples to test reasoning on data likely outside the models' training sets.
- Simulated False Positives: 25 benign apps to evaluate discrimination capabilities. Ground truth was established through manual verification of sensitive APIs and behavior reports by security experts.
Key Findings
The study evaluated seven models, including GPT-4o-mini, Gemini-2.5-Flash, and Claude-3.7-Sonnet.
Performance Leaders
Claude-3.7-Sonnet and Gemini-2.5-Flash emerged as the top performers, with WRS scores of 50.67% and 50.58%, respectively. Claude demonstrated superior capability in refuting false alarms (92% FPCR), while Gemini excelled in report fluency and comprehensiveness.
The Reasoning Gap
Despite these scores, models often fell into a "surface-level" trap. While they could identify suspicious keywords (e.g., sendSMS), they frequently struggled with causal inference—understanding the multi-step chain of events required for complex malicious behaviors. Smaller models, such as Llama-3.1-8B, suffered from significant hallucinations, often inventing non-existent functions or behaviors, resulting in a low WRS of 27.06%.
Conclusion and Future Directions
MalEval demonstrates that while LLMs are becoming valuable assistants in malware auditing, they are not yet ready for full autonomy. The "logical blindness" regarding complex, multi-step exploits remains a significant hurdle. Future research should explore multi-agent architectures for cross-verification and the integration of dynamic analysis data to provide the causal links that static analysis currently lacks.
Summary updated