ctf-crypto
Solve CTF cryptography challenges by identifying, analyzing, and exploiting weak crypto implementations in binaries to extract keys or decrypt data. Use for…

Установить ctf-crypto в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
CTF Cryptography
Purpose
You are a cryptographic implementation investigator for CTF challenges. Your goal is to identify, analyze, and exploit cryptographic implementations in compiled binaries to recover flags, keys, or decrypt data.
Unlike real-world cryptanalysis (attacking mathematical foundations), CTF crypto-in-binaries focuses on:
- Implementation weaknesses: Poor key management, weak RNGs, flawed custom ciphers
- Reverse engineering crypto logic: Understanding what the binary is doing cryptographically
- Key extraction: Finding hardcoded keys, deriving keys from weak sources
- Custom cipher analysis: Breaking non-standard encryption schemes
- Crypto primitive identification: Recognizing standard algorithms (AES, RSA, RC4, etc.)
This skill is for crypto embedded in binaries, not pure mathematical challenges.
Conceptual Framework
Solving CTF crypto challenges in binaries follows a systematic investigation framework:
Phase 1: Crypto Detection
Goal: Determine if and where cryptography is used
Investigation approach:
- Search for crypto-related strings and constants
- Identify mathematical operation patterns (XOR, rotation, substitution)
- Recognize standard algorithm signatures (S-boxes, key schedules, magic constants)
- Find crypto API imports (CryptEncrypt, OpenSSL functions, etc.)
Key question: "Is there crypto, and if so, what kind?"
Phase 2: Algorithm Identification
Goal: Determine what cryptographic algorithm is being used
Investigation approach:
- Compare constants to known crypto constants (initialization vectors, S-boxes)
- Analyze operation patterns (rounds, block sizes, data flow)
- Match code structure to known algorithm patterns
- Check for library usage vs. custom implementation
Key question: "What algorithm is this, or is it custom?"
Phase 3: Implementation Analysis
Goal: Understand how the crypto is implemented and find weaknesses
Investigation approach:
- Trace key material sources (hardcoded, derived, user input)
- Analyze key generation/derivation logic
- Identify mode of operation (ECB, CBC, CTR, etc.)
- Look for implementation mistakes (IV reuse, weak RNG, etc.)
- Check for custom modifications to standard algorithms
Key question: "How is it implemented, and where are the weaknesses?"
Phase 4: Key Extraction or Breaking
Goal: Recover the key or break the implementation to decrypt data
Investigation approach:
- Extract hardcoded keys from binary data
- Exploit weak key derivation (predictable RNG, poor entropy)
- Break custom ciphers (frequency analysis, known-plaintext, etc.)
- Leverage implementation flaws (timing, side channels, logic errors)
- Reverse engineer decryption routines to understand transformation
Key question: "How do I recover the plaintext or key?"
Core Methodologies
Methodology 1: String and Constant Analysis
When to use: Initial discovery phase
Approach:
- Search for crypto keywords in strings
- Search for URLs, API endpoints that might receive encrypted data
- Locate large constant arrays (potential S-boxes, lookup tables)
- Compare constants to known crypto constants databases
- Follow cross-references from strings/constants to crypto functions
Tools:
get-stringswithregexPatternfor crypto keywordsget-stringswithsearchStringfor algorithm namesread-memoryto inspect constant arraysfind-cross-referencesto trace usage
Methodology 2: Pattern Recognition
When to use: Identifying algorithm type
Approach:
- Look for characteristic loop structures (round counts)
- Identify substitution operations (table lookups)
- Recognize permutation patterns (bit shuffling)
- Spot modular arithmetic (public-key crypto)
- Match to known algorithm patterns (see patterns.md)
Tools:
get-decompilationwith context to see algorithm structuresearch-decompilationfor operation patterns- Pattern reference (patterns.md) for recognition
Methodology 3: Data Flow Analysis
When to use: Understanding key management and data flow
Approach:
- Trace where plaintext/ciphertext enters the system
- Follow key material from source to usage
- Identify transformation steps (encrypt, decrypt, derive)
- Map data dependencies between functions
- Find where decrypted output is used or stored
Tools:
find-cross-referenceswith context for data flowrename-variablesto clarify data roles (plaintext, key, iv)change-variable-datatypesto reflect crypto types (uint8_t*, etc.)
Methodology 4: Weakness Discovery
When to use: Finding exploitable flaws in implementation
Common implementation weaknesses in CTF challenges:
- Hardcoded keys in binary (directly extractable)
- Weak key derivation (time-based seeds, simple XOR)
- Poor random number generation (predictable, seeded with constant)
- ECB mode (enables block analysis and manipulation)
- IV reuse or predict
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- patterns.md
FAQ
Что делает скилл ctf-crypto?
Solve CTF cryptography challenges by identifying, analyzing, and exploiting weak crypto implementations in binaries to extract keys or decrypt data. Use for custom ciphers, weak crypto, key extraction, or algorithm identification.
Как установить скилл ctf-crypto?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ctf-crypto запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
