ctf-crypto

ctf-crypto is a skill for Claude Code from 26zl/cybersec-toolkit. It costs 78 tokens per session (1,598 once invoked), scanned A, original, MIT.

A guide to solving capture-the-flag, or CTF, cryptography challenges involving systems such as RSA, AES, elliptic-curve cryptography, hashes, random-number generators, and classical ciphers. It uses the clues in the input to select an attack or decoding method.

In plain words
What is it for?
Use it to identify encoded or encrypted data, inspect public keys, test RSA weaknesses, analyze cipher patterns, and choose specialized tools for decryption.
Why use it?
It helps turn an unknown ciphertext or key file into a set of concrete checks and possible approaches. This makes cryptography challenges easier to investigate systematically.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the cybersec-toolkit plugin — 197 skills, 2 hooks, 1 MCP server shipped together

Good fit Use it to identify encoded or encrypted data, inspect public keys, test RSA weaknesses, analyze cipher patterns, and choose specialized tools for decryption.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/26zl/cybersec-toolkit/ctf-crypto
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.

Any agent
npx skills add 26zl/cybersec-toolkit --skill ctf-crypto
Clone the repo
git clone --depth 1 https://github.com/26zl/cybersec-toolkit

Made for: Claude Code.

Or install cybersec-toolkit, the plugin that ships this one along with the rest of its 197 skills, 2 hooks, 1 MCP server.

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-crypto

README.md
[![agentmods](https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-crypto/github.svg)](https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-crypto)
Your own site
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-crypto"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-crypto/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ctf-crypto

Your own site · 80×15
<a href="https://agentmods.dev/skills/26zl/cybersec-toolkit/ctf-crypto"><img src="https://agentmods.dev/badge/skills/26zl/cybersec-toolkit/ctf-crypto.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,598 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00078 $0.01598
Opus 5.5 $0.00031 $0.00639
Sonnet 5.5 $0.00016 $0.00320
Haiku 4.5 $0.00008 $0.00160

Measured 1mo ago against content hash 0ea064f3abac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ctf-crypto scanned grade A 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 1mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

Default first move: throw `n` at FactorDB (`run_tool("curl", "http://factordb.com/api?query=<n>")`) and at `RsaCtfTool` with all attacks enabled.
.claude/skills/ctf-crypto/SKILL.md · 138 lines

How it starts

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

CTF crypto methodology

Tool-first: use suggest_for_ctf("crypto") first, then this checklist for depth.

0. Where the libraries live

Crypto work runs out of tools and into arithmetic fast. The installer puts the Python side in a venv the server can hand to scripts:

run_script(code, venv="crypto")   # ~/.ctf-venvs/crypto

Contents: pycryptodome (from Crypto...), sympy, gmpy2, numpy, z3, fpylll (+cysignals), cypari2. Install with ./install.sh --module crypto; check with check_installed("ctf-crypto-venv").

run_script is gated behind CYBERSEC_MCP_ALLOW_SCRIPTS=1 and is off by default. If a challenge needs solver code, say so and let the user enable it and restart the server — do not route around the gate with a shell.

SageMath is not installed by default — it is packaged on Debian and Arch but not in current Ubuntu, Fedora or openSUSE, and the image is 1.4 GB. --enable-docker pulls sagemath/sagemath:latest. Reach for it only for what the venv cannot do: Coppersmith with small_roots, Groebner bases, generic curve arithmetic.

1. Identify what you have

file <input>
xxd <input> | head -50
strings <input> | head -50
  • .pem, .pub → public key crypto (RSA/ECC)
  • BEGIN CERTIFICATE → x509 — extract pubkey with openssl x509 -in cert -pubkey -noout
  • High entropy ~7.99 bits/byte → encrypted/compressed
  • Repeating block patterns → ECB
  • Base64/hex prefix → decode first

2. RSA — the decision tree

Extract n, e, c:

openssl rsa -in pubkey.pem -pubin -text -noout

Then route by what n and e look like:

Symptom Attack Tool
Small e (3, 5), small message Cube root attack RsaCtfTool, python3 -c "from gmpy2 import iroot..."
n factorable on FactorDB Factor + decrypt RsaCtfTool --uncipher c -n n -e e
Two ciphertexts, same n, coprime e Common modulus RsaCtfTool --attack commonmodulus
Multiple users, small e=k, k pubkeys Håstad broadcast RsaCtfTool --attack hastads
Close p and q Fermat factorization RsaCtfTool --attack fermat
Wiener-applicable (d small) Wiener's RsaCtfTool --attack wiener
Partial p known Coppersmith sage / RsaCtfTool --attack boneh_durfee
Same m, two keys Common plaintext manual gcd

Read the full file on GitHub · 138 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. 1mo ago Changed · +45 lines 0ea064f3abac
  2. 1mo ago First seen · 93 lines · 78 tokens per session scan A ddc74700b13a

Subscribe to this mod's changes

ctf-crypto is a skill published in the GitHub repository 26zl/cybersec-toolkit (84 stars, last pushed 2d ago), licensed MIT. It adds 78 tokens to every session and 1,598 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

fable-learning

Convert sessions and trajectories into durable project engineering knowledge and failure lessons under Failure-lessons/, agent-kernel, and gbrain. Use when extracting session learnings, synthesizing knowledge from conversations, capturing root causes, documenting failure lessons, or recording durable engineering…

imMamdouhaboammar/get-fable · 123 tokens

security-awareness

../../../governance/security-awareness/SKILL.md.

jaskaranhundal/usap-skills · 0 tokens

feynman

Press a decision you just made until you can explain it to a skeptic in your own words, or surface the gap where you can't. The Feynman test aimed at a choice: understanding is cheapest to fake the moment after you decide, so a fresh critic presses for what you can't actually explain. Use right after picking an…

imMamdouhaboammar/get-fable · 81 tokens

performing-api-inventory-and-discovery

Performs API inventory and discovery to identify all API endpoints in an organization's environment including documented, undocumented, shadow, zombie, and deprecated APIs. The tester uses passive traffic analysis, active scanning, DNS enumeration, JavaScript analysis, and cloud resource inventory to build a…

xalgorix/xalgorix · 100 tokens

performing-soap-web-service-security-testing

Perform security testing of SOAP web services by analyzing WSDL definitions and testing for XML injection, XXE, WS-Security bypass, and SOAPAction spoofing.

xalgorix/xalgorix · 41 tokens

detecting-compromised-cloud-credentials

Detecting compromised cloud credentials across AWS, Azure, and GCP by analyzing anomalous API activity, impossible travel patterns, unauthorized resource provisioning, and credential abuse indicators using GuardDuty, Defender for Identity, and SCC Event Threat Detection.

xalgorix/xalgorix · 55 tokens