Searcharxiv⌕ Search

arXiv subjects

Mario Varlese

Publications and source records attributed to Mario Varlese.

2 recordsLinked to original sources

The Infinite Mutation Engine? Measuring Polymorphism in LLM-Generated Offensive Code

Malware authors traditionally rely on polymorphic techniques to produce variants within a malware family, complicating detection. Generative AI enables attackers to automatically synthesize structurally diverse payloads with identical behavior, raising the question of how much evasion Large Language Models (LLMs) actually provide. Recent work has assumed that LLMs can produce highly polymorphic payloads, leaving unquantified the variation that emerges when an attacker repeatedly generates a payload, or explicitly instructs the model to avoid prior implementations. In this work, we address this gap by measuring the polymorphic capacity of a commercial model (Claude Opus~4.6) acting as an automated malware generator. We build a dual-agent, four-stage pipeline that generates, tests, and refines a data-exfiltration payload comprising file traversal, encryption, exfiltration, and integration. We produce payloads under two settings: (a) functional prompting, and (b) explicit prompting injecting a structured history of prior variants. Evaluating structural (TEDs) and semantic (embeddings) variance, we find that explicit prompting fragments the structural space, creating variants that are hard to cluster for some ML classifiers. This structural diversity is operationally cheap, costing \$0.41--\$0.73 per validated payload. However, static n-gram analysis reveals that because the LLM treats inter-module boundaries as immutable, a single static signature targeting them achieves 100\% detection across all generations. Finally, a complementary evaluation of seven local small language models (SLMs) (20M--1.5B parameters) confirms that current open-weights architectures lack the generative stability required for reliable polymorphic synthesis.

cs.CR↗

From Billion-Scale to Million-Scale Language Models: Operational Capabilities for Embedded Post-Exploitation

Small Language Models (SLMs) are increasingly attractive for resource-constrained environments due to their low computational footprint. These characteristics also make them candidates for future autonomous malware, where connectivity, latency, privacy, or operational constraints may preclude cloud-based inference. Yet the ability of ultra-compact models to support malware during post-exploitation remains poorly understood. We systematically evaluate seven open-source SLMs (20M-1.5B parameters) on two post-exploitation code-generation tasks: Directory Enumeration and Backdoor Generation. We compare Python (high-resource) and Lua (low-resource) across prompting strategies, task formulations, iterative reasoning, grammar-constrained decoding, and execution-feedback loops. Results show that offensive code-generation capabilities do not increase linearly with model size. Successful execution depends on the interaction of model capacity, task formulation, and prompting strategy, with task formulation exerting a greater influence than prompt engineering alone. Algorithmic formulation combined with few-shot prompting enables Qwen2.5-Coder 1.5B to reach Pass@5 of 100% in both Python and Lua for Directory Enumeration, 100% in Python for Backdoor Generation, and 99.2% in Lua. Although the evaluated models remain too computationally demanding for widespread deployment in contemporary malware, rapid progress in compact models may reduce this barrier. These findings help anticipate AI-assisted malware and inform future countermeasures.

cs.CR↗