mlsanityData to 14 Oct 2026

Improving LLM Agents with Reinforcement Learning on Cryptographic CTF Challenges

arXiv 2506.02048 ↗First posted 1 Jun 2025cs.CR cs.AIcited by 4

On the map: LLM agents and tool use → Agent threats, guardrails and governance

Abstract (arXiv)

We present 'Random-Crypto', a procedurally generated cryptographic Capture The Flag (CTF) dataset designed to unlock the potential of Reinforcement Learning (RL) for LLM-based agents in security-sensitive domains. Cryptographic reasoning offers an ideal RL testbed: it combines precise validation, structured multi-step inference, and reliance on reliable computational tool use. Leveraging these properties, we fine-tune a Python tool-augmented Llama-3.1-8B via Group Relative Policy Optimization (GRPO) in a secure execution environment. The resulting agent achieves a significant improvement in Pass@8 on previously unseen challenges. Moreover, the improvements generalize to two external benchmarks: 'picoCTF', spanning both crypto and non-crypto tasks, and 'AICrypto MCQ', a multiple-choice benchmark of 135 cryptography questions. Ablation studies attribute the gains to enhanced tool usage and procedural reasoning. These findings position 'Random-Crypto' as a rich training ground for building intelligent, adaptable LLM agents capable of handling complex cybersecurity tasks.

Key facts. Cited by 4 papers in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 19 of its 29 references that are in the map. First posted on arXiv 1 Jun 2025.

Builds on

19 of 29 references.

Closest ancestors · 4

Same direction, newest first

  1. 2024HackSynth: LLM Agent and Evaluation Framework for Autonomous Penetration Testing2 Dec
  2. 2024Teams of LLM Agents can Exploit Zero-Day Vulnerabilities2 Jun
  3. 2024LLM Agents can Autonomously Exploit One-day Vulnerabilities11 Apr
  4. 2024LLM Agents can Autonomously Hack Websites6 Feb

Other references · 15

  1. 2022Training language models to follow instructions with human feedbackcited by 15,971
  2. 2017Proximal Policy Optimization Algorithmscited by 15,215
  3. 2024DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Modelscited by 9,379
  4. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  5. 2025DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learningcited by 6,330
  6. 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
  7. 2023QLoRA: Efficient Finetuning of Quantized LLMscited by 3,418
  8. 2023A Survey on Large Language Model based Autonomous Agentscited by 2,242
  9. 2023Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injectioncited by 1,443
  10. 2025Model Context Protocol (MCP): Landscape, Security Threats, and Future Research Directionscited by 265
  11. 2023InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedbackcited by 238
  12. 2024Survey on Large Language Model-Enhanced Reinforcement Learning: Concept, Taxonomy, and Methodscited by 116
3 more
  1. 2023PentestGPT: An LLM-empowered Automatic Penetration Testing Toolcited by 97
  2. 2024NYU CTF Bench: A Scalable Open-Source Benchmark Dataset for Evaluating LLMs in Offensive Securitycited by 93
  3. 2023Using Large Language Models for Cybersecurity Capture-The-Flag Challenges and Certification Questionscited by 23

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2025: 2; 2026: 2.

4 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026KryptoPilot: An Open-World Knowledge-Augmented LLM Agent for Automated Cryptographic Exploitation
  2. 2025Towards Effective Offensive Security LLM Agents: Hyperparameter Tuning, LLM as a Judge, and a Lightweight CTF Benchmark
  3. 2025D-CIPHER: Dynamic Collaborative Intelligent Multi-Agent System with Planner and Heterogeneous Executors for Offensive Security
  4. 2025Pentest-R1: Towards Autonomous Penetration Testing Reasoning Optimized via Two-Stage Reinforcement Learning
  5. 2026Autonomous LLM Agents & CTFs: A Second Look
  6. 2026Towards Reliable Local Security Agents: Verifiable Post-Training for Linux Privilege Escalation
  7. 2025AegisLLM: Scaling Agentic Systems for Self-Reflective Defense in LLM Security
  8. 2025Automated Penetration Testing with LLM Agents and Classical Planning