The Binary Speaks: Fine-Tuning a Vision-Language Model to Identify and Describe Malware from its Bytes
Saraga Sakthidharan, Naveen P J, Nandakrishna Giri, Vinod P, Antonino Nocera
Abstract
Malware volumes demand analysis tools that scale beyond manual triage. We present an agentic pipeline in which two LLM agents analyse VirusTotal and FLARE CAPA data and a gemini-3.1-flash-lite based judge agent merges their outputs into a forensic report. The resulting 4000 reports over ten malware families, each paired with a grayscale byte image, are used to fine-tune OpenFlamingo-3B with LoRA to identify the family of a sample and describe its behaviour from the image alone. On 800 held-out samples, the model identifies the family in of cases, is well calibrated (ECE 0.019) and writes a report for each sample, whereas current VLMs without fine-tuning are at chance level. Image-ablation and occlusion analyses show that its outputs are grounded in the image, mostly in PE headers, read-only data and resources. Image-only CNNs classify slightly better (93.0\%) but provide no report, and template and retrieval baselines score higher on text metrics because they copy stored expert reports of other files; these conclusions hold on test samples without near-duplicates in the training data. Appending random bytes amounting to 1\% of the file size reduces the VLM's accuracy by 11 points, revealing where it needs robustness before deployment.
Create a lesson
Related papers
Assessing Data Leakage Risk in Fine-Tuned LLMs via Membership Inference Attacks
Shared title terminologycs.CRMohamed-Jalal Baim, Léa Deleris, Myriam Tami et al.
From Binary to Source Code: Measuring LLMs Reverse Engineering Capabilities on Obfuscated Binaries
Shared title terminologycs.CRDavid Schmidt, Patrick Felbauer, Gabriel Gegenhuber et al.
Partial Parameter Recovery from Gemma-Style Architectures via Black-Box Queries: Identifiability and Limits
Shared title terminologycs.CRRuijie Ma, Yi Chen, Hongbo Yu et al.
Bounds on the Binary Addition Sequence Length of Block MDS Matrices
Shared title terminologycs.CRJianhua Wang, Chunhuan Zhao, Zhen Liu et al.
A Language for Composing Multi-Agent Protocols
Shared title terminologycs.CRHugo O'Connor