skillfed

ctf-crypto

CTF Crypto helps you investigate cryptographic implementations embedded in compiled binaries through systematic detection, algorithm identification, and weakness analysis. Trace key sources, recognize standard algorithms and custom ciphers, and exploit implementation flaws to recover plaintext or extract keys.

CTF Crypto identifies and analyzes cryptographic implementations in CTF binaries to extract keys and decrypt data.

AI-generated summary based on this skill's SKILL.md

792 68 Apache-2.0 updated by cyberkaida

Install

cyberkaida/reverse-engineering-assistant/ctf-crypto · repository language: Java

git clone https://github.com/cyberkaida/reverse-engineering-assistant
cp -r reverse-engineering-assistant/ReVa/skills/ctf-crypto ~/.claude/skills/ctf-crypto
npx skillfed install cyberkaida/reverse-engineering-assistant/ctf-crypto

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does ctf-crypto help solve CTF crypto challenges?

ctf-crypto guides you through systematic investigation of cryptographic implementations in compiled binaries. It helps you detect encryption routines, identify algorithm types (standard like AES/RSA or custom ciphers), trace key sources, and locate implementation weaknesses. By combining binary analysis with cryptanalysis techniques, ctf-crypto enables you to recover plaintext, extract hardcoded keys, or break weak schemes to capture flags.

How can I identify encryption in binary files using ctf-crypto?

ctf-crypto teaches you to recognize cryptographic patterns in compiled code: look for characteristic S-boxes, key schedules, and algorithm-specific constants. Search for standard library calls (OpenSSL, libgcrypt) or custom cipher loops. Examine memory operations, XOR chains, and substitution patterns. ctf-crypto helps you correlate these signatures with known algorithms or flag custom implementations for deeper analysis.

What techniques does ctf-crypto cover for extracting hardcoded keys?

ctf-crypto covers key extraction by tracing initialization routines, identifying where keys are stored in memory or data sections, and recognizing weak key derivation. It shows how to spot hardcoded strings, static buffers, and predictable key generation. You'll learn to exploit poor key management—keys embedded in .rodata, derived from weak RNG, or passed as constants—to recover encryption material and decrypt protected data.

How does ctf-crypto help reverse engineer custom ciphers?

ctf-crypto teaches you to document custom cipher logic by tracing encryption loops, identifying substitution and permutation operations, and mapping data flow. You'll recognize patterns like Feistel networks, byte-level transformations, and key mixing. By reconstructing the algorithm's behavior from assembly, ctf-crypto helps you build a cryptanalytic model to find weaknesses—weak diffusion, predictable round keys, or reused constants—and break the scheme.

What implementation weaknesses can ctf-crypto help me exploit?

ctf-crypto highlights common flaws: ECB mode (identical plaintext blocks produce identical ciphertext), weak RNG for key or IV generation, hardcoded keys, insufficient key derivation, and custom ciphers with poor diffusion or key schedules. It teaches you to recognize these patterns in binaries and apply targeted attacks—frequency analysis, known-plaintext recovery, or brute-force on weak key spaces—to decrypt data or recover flags.

Can ctf-crypto help me recognize AES, RSA, and other standard algorithms in compiled code?

Yes. ctf-crypto teaches you to spot standard cryptographic algorithms by their implementation signatures: AES S-boxes and key expansion routines, RSA modular exponentiation and padding schemes, and hash function constants. You'll learn to identify library calls and algorithm-specific memory patterns. Once recognized, ctf-crypto guides you to extract keys, find configuration weaknesses, or leverage known attacks on the implementation.

SKILL.md

rendered from the published skill — quoted content, verbatim

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

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
ReVa/skills/ctf-crypto/SKILL.md
ReVa/skills/ctf-crypto/patterns.md

Related skills

Tags

binary-cryptanalysis weak-implementations key-recovery cipher-identification reverse-engineering implementation-flaws ctf-exploitation custom-ciphers crypto-patterns flag-extraction