ctf-solver

ctf-solver is an agent for Claude Code from 0xSteph/pentest-ai-agents. It costs 63 tokens per session (2,263 once invoked), scanned B, original, MIT.

An agent for solving capture-the-flag security challenges, competitions where participants find hidden answers by exploiting intentionally vulnerable systems. It covers web, binary, cryptography, forensics, reverse engineering, and privilege-escalation problems.

In plain words
What is it for?
Use it for CTFs, HackTheBox machines, TryHackMe rooms, or guidance on web exploitation, binary bugs, cryptography, digital forensics, reverse engineering, and privilege escalation.
Why use it?
It provides a structured way to investigate difficult challenges while teaching the underlying methods instead of simply handing over the answer.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Part of the pentest-ai-agents plugin — 3 commands, 53 agents shipped together

About the project

0xSteph/pentest-ai-agents is a collection of Claude Code specialist agents for authorized penetration testing and security research, covering areas such as reconnaissance, web systems, cloud, reverse engineering and detection. Security researchers and penetration testers use it to plan engagements, investigate findings, build detections and write reports. The catalogue entries are the project's own agents, commands and plugin components.

0xSteph/pentest-ai-agents · 2,198 stars · on GitHub · pentestai.xyz

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/0xsteph/pentest-ai-agents/ctf-solver
Clone the repo
git clone --depth 1 https://github.com/0xSteph/pentest-ai-agents

Made for: Claude Code.

Or install pentest-ai-agents, the plugin that ships this one along with the rest of its 3 commands, 53 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ctf-solver

README.md
[![agentmods](https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/ctf-solver.svg)](https://agentmods.dev/agents/0xsteph/pentest-ai-agents/ctf-solver)
Your own site
<a href="https://agentmods.dev/agents/0xsteph/pentest-ai-agents/ctf-solver"><img src="https://agentmods.dev/badge/agents/0xsteph/pentest-ai-agents/ctf-solver.svg" alt="Measured on agentmods" height="20"></a>
Per session 63 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,263 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00063 $0.02263
Opus 5 $0.00032 $0.01131
Sonnet 5 $0.00013 $0.00453
Haiku 4.5 $0.00006 $0.00226

Measured 6d ago against content hash e41bd9fe9660, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

ctf-solver scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Linux: SUID, capabilities, cron, PATH hijacking, kernel exploits, sudo misconfigs, NFS, Docker escape
agents/ctf-solver.md · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are an expert CTF competitor and challenge solver with deep experience across all major CTF platforms including HackTheBox, TryHackMe, PicoCTF, OverTheWire, VulnHub, and competitive jeopardy and attack-defense CTFs.

You operate as a methodical problem-solving partner, guiding users through challenges without simply giving away flags. Your role is to teach methodology while helping users progress when they're stuck.

Core Categories

Web Exploitation

  • SQL injection (blind, error-based, time-based, UNION, second-order)
  • XSS (reflected, stored, DOM, CSP bypass, filter evasion)
  • Server-Side Template Injection (Jinja2, Twig, Freemarker, Velocity)
  • Server-Side Request Forgery (SSRF) including cloud metadata, internal service access
  • Insecure deserialization (PHP, Java, Python pickle, .NET)
  • Authentication bypass (JWT attacks, session manipulation, logic flaws)
  • File inclusion (LFI/RFI, log poisoning, PHP wrappers, filter chains)
  • Command injection and OS command execution
  • XXE (XML External Entity) injection
  • Race conditions and business logic flaws

Binary Exploitation (Pwn)

  • Buffer overflows (stack, heap, format string)
  • Return-Oriented Programming (ROP) chain construction
  • ret2libc, ret2plt, GOT overwrite
  • Shellcode development and encoding
  • Heap exploitation (use-after-free, double free, heap spraying, house techniques)
  • Bypassing protections: ASLR, NX/DEP, stack canaries, PIE, RELRO
  • Kernel exploitation basics

Reverse Engineering

  • Static analysis with Ghidra, IDA, Binary Ninja, radare2
  • Dynamic analysis with GDB, x64dbg, WinDbg
  • Anti-debugging and obfuscation techniques
  • Malware analysis methodology
  • .NET/Java decompilation (dnSpy, JD-GUI)
  • Android APK reverse engineering (jadx, apktool, frida)

Cryptography

  • Classical ciphers (Caesar, Vigenere, substitution, transposition)
  • Block cipher attacks (ECB detection, CBC bit-flipping, padding oracle)
  • RSA attacks (small e, common modulus, Wiener, Hastad, factoring)
  • Hash attacks (length extension, collision, rainbow tables)
  • Elliptic curve weaknesses
  • Custom crypto analysis and implementation flaws

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 174 lines · 63 tokens per session scan B e41bd9fe9660

Subscribe to this mod's changes

ctf-solver is an agent published in the GitHub repository 0xSteph/pentest-ai-agents (2,198 stars, last pushed 20d ago), licensed MIT. It adds 63 tokens to every session and 2,263 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

web3-auditor

Smart contract security auditor. Checks 10 bug classes in order of frequency (accounting desync 28%, access control 19%, incomplete path 17%, off-by-one 22% of Highs, oracle errors, ERC4626 attacks, reentrancy, flash loan oracle manipulation, signature replay, proxy/upgrade issues). Applies pre-dive kill signals…

Awarexone/Agentic-Bug-Hunter · 101 tokens

debugger

Bug investigation, root cause analysis using 5 Whys methodology, and systematic troubleshooting. Use for complex debugging sessions and production issue investigation.

davidmatousek/tachi · 30 tokens

ux-ui-designer

UX/UI design, design systems, user flows, and accessibility compliance. Use for creating design specifications, component libraries, and WCAG-compliant interfaces.

davidmatousek/tachi · 35 tokens

web-researcher

Technical research, library evaluation, and best practices investigation. Use for comparing technologies, researching APIs, and finding documentation.

davidmatousek/tachi · 28 tokens

active-directory

Active Directory and Windows domain attack specialist. Use for Kerberoasting, AS-REP roasting, DCSync, BloodHound enumeration, ADCS ESC attacks, Golden/Silver Ticket, and domain privilege escalation. Triggers on: kerberoast, AS-REP, bloodhound, DCSync, golden ticket, ADCS, ESC, domain controller, LDAP, GPO, AD, domain…

mukul975/Threatswarm · 86 tokens

crypto-attacker

Cryptography and TLS security specialist. Handles TLS configuration auditing, JWT algorithm confusion, padding oracle attacks, hash cracking mode selection, RSA weak key analysis, ECB mode detection, certificate inspection, and crypto protocol attacks. Triggers on: TLS, SSL, cipher, JWT, padding oracle, RSA, hash…

mukul975/Threatswarm · 86 tokens