Natural Code Transformation Confuses Agents in Vulnerability Analysis
cs.CR, cs.AI, cs.LG
Submitted: 2026-10-09
Updated: 2026-10-14
Code: https://github.com/cesanta/mon
License: http://creativecommons.org/licenses/by-sa/4.0/
The gist: Having demonstrated a strong potential for automating vulnerability discovery, AI agents can also be used to attack software systems at scale.
Abstract
Having demonstrated a strong potential for automating vulnerability discovery, AI agents can also be used to attack software systems at scale. Today's software systems need mechanisms to level the playing field by slowing down potential attacks, giving them time to patch vulnerabilities and strengthen software. Along this line, our study of agent trajectories in vulnerability analysis shows a surprising finding: agents produce dramatically different results across real-world code commits that carry the same functionality and the same vulnerability. This phenomenon appears consistently in multiple code domains and vulnerability categories. It motivates us to study natural and functionality-preserving code transformations derived from real-world software development, and their potential as a defense against attacker agents. We build a corpus of natural transformations by mining recurring development patterns from real-world code commits, and apply them to evaluate impact on agentic vulnerability analysis. Our results show that even a single form of transformation can effectively "confuse" frontier agents, e.g., Codex with GPT-6 Sol, reducing successes in vulnerability discovery. We also study different agent failures, whether transformations can be composed to provide stronger protection, and adaptive attackers who seek to reverse them. Overall, our study of natural code transformation significantly expands the research space of using code transformations to defend against malicious agents.
Sources
- DeepSeek-V4.1-Flash: Pushing the Limits of KV Cache Compression
- Program Analysis Guided LLM Agent for Proof-of-Concept Generation
- GLM-5: from Vibe Coding to Agentic Engineering
- RepoAudit: An Autonomous LLM-Agent for Repository-Level Code Auditing
- Capture the Flags: Family-Based Evaluation of Agentic LLMs via Semantics-Preserving Transformations
- Auto-SPT: Automating Semantic Preserving Transformations for Code
- On the Adversarial Robustness of Instruction-Tuned Large Language Models for Code
- SoK: Agentic Skills -- Beyond Tool Use in LLM Agents
- ExploitBench: A Capability Ladder Benchmark for LLM Cybersecurity Agents
- SkillsBench: Benchmarking How Well Agent Skills Work Across Diverse Tasks
- A Systematic Study of Code Obfuscation Against LLM-based Vulnerability Detection
- Exploiting Code Symmetries for Learning Program Semantics
- PatchBench: Evaluating AI Agents for Vulnerability Patching
- Intriguing properties of neural networks
- ExploitGym: Can AI Agents Turn Security Vulnerabilities into Real Attacks?
- Symbolon: Symbolic Execution by Learning Code Transformation
Related papers
- SoK: AI-Augmented Binary Reversing
- Relaxed Sender Anonymity for CBDC Interbank Settlement: A Zero-Knowledge Approach on Permissioned EVM
- Calibration-Family Overfit: Why Trusted Sabotage Monitors Don't Transfer Across Lineages
- Efficient Fuzzy PSI under One-Sided Assumptions
- Sealing the Audit-Runtime Gap for LLM Skills
- Token Composition: A Graph Based on EVM Logs