CTF Toolkit (offline)

    1

    Offline CTF helpers: peel layered encodings, crack XOR and break classic ciphers in one call each, with ranked flag candidates.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    CTF Toolkit (offline)

    Example session with this skill installed

    There's a CTF practice challenge in ./challenge (note.txt and blob.bin). Flags look like flag{...}. Find both.

    • Read your context and instructions
    • Compiled the ctf toolkit offline

    Real session on a small practice challenge. The script output is pasted as-is.

    Summary

    Both flags were recovered in one script call each: flag{peel_every_layer} (base64 → hex → rot13) and flag{xor_is_not_encryption} (repeating-key XOR, key key).

    1. note.txt: identify, then peel

    $ cat challenge/note.txt
    NzM3OTZlNzQ3YjYzNzI3Mjc5NWY3MjY5NzI2NTZjNWY3OTZlNmM3MjY1N2Q=
    

    The alphabet and = padding point to base64.

    $ python3 scripts/decode_all.py challenge/note.txt
    input: 60 bytes, printable 100%, score 37.0, 118 candidates explored (depth 3)
    FLAG flag{peel_every_layer}  via base64→hex→rot13
    score  chain  preview
    105.2  base64→hex→rot13  flag{peel_every_layer}
    104.2  base64→hex  synt{crry_rirel_ynlre}
     98.1  base64→hex→rot9  bhwc{laah_aranu_hwuan}
    ...
    

    Note the second-ranked line synt{...}: it has the flag shape but is still rot13-encoded. The skill's pitfalls list warns about exactly this.

    2. blob.bin: binary, so XOR

    $ xxd challenge/blob.bin | head -2
    00000000: 0d09 180c 1e01 0417 2602 1626 050a 0d34  ........&..&...4
    00000010: 0017 0817 001b 1110 040b 04              ...........
    

    Mostly unprintable bytes, so it goes to xor_tools.py with the known prefix as a crib:

    $ python3 scripts/xor_tools.py challenge/blob.bin --crib 'flag{'
    input: 27 bytes, printable 26%
    offset 0: keystream 'keyke', period 3 -> key=0x6b6579 'key'  score -3.53 printable 100%  FLAG flag{xor_is_not_encryption}
        flag{xor_is_not_encryption}
    

    3. Result

    FileEncodingFlag
    note.txtbase64 → hex → rot13flag{peel_every_layer}
    blob.binrepeating-key XOR, key key (0x6b6579)flag{xor_is_not_encryption}

    Both match the flag{...} format and are fully printable.

    Next step: write each one exactly as the challenge asks, with printf '%s' and no trailing newline, then check it with cat -A.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Solve offline CTF challenges and cryptographic puzzles without manual trial and error. This skill automates the identification and extraction of flags from encoded blobs, ciphertexts, and obfuscated files. It eliminates the frustration of guessing encoding layers or brute-forcing XOR keys by hand.

    What it does

    • Multi-layer decoding peels back up to N layers of base64, hex, binary, rot, and morse encodings to find hidden flags.
    • XOR analysis cracks single-byte and repeating-key XOR encodings using brute-force, key length estimation, or crib-based attacks.
    • Classic cipher breaking automates decryption for Caesar, Vigenere, Beaufort, Affine, Atbash, and substitution ciphers.
    • File checks walks the agent through magic bytes, data after end markers and embedded PNG/ZIP signatures using standard tools (xxd, file, strings).
    • Automated verification ranks flag candidates by readability and format matching to ensure the output is clean.

    How it works

    1. Identify the data type using xxd, file, and entropy analysis to determine if it is text-like or binary.
    2. Execute decode_all.py to recursively strip common encoding layers and locate strings matching the flag regex.
    3. Analyze specialized encryption using xor_tools.py for binary data or classic_cipher.py for alphabet-preserving shifts.
    4. Extract flags into the required output format, ensuring zero trailing newlines or extra whitespace via printf.

    Frameworks & tools

    This skill uses Python 3 standard library scripts for decoding and cryptographic analysis. It utilizes standard Unix utilities like xxd, file, strings, and grep for initial reconnaissance.

    Why this beats prompting it yourself

    Generic LLM prompts often fail at deep recursive encodings or produce flags with incorrect bytes. This skill uses deterministic scripts to peel layers and calculate XOR keys, ensuring accuracy that raw prompting cannot achieve on binary data.

    Use cases

    • CTF competition practice involving layered encodings or classic ciphers.
    • Forensic analysis of small, unknown binary blobs or obfuscated text files.
    • Cryptographic debugging for developers testing XOR or simple cipher implementations.

    Known limitations

    Designed for authorized offline use only. It does not support network-based attacks, large binary reverse engineering, or modern asymmetric encryption like RSA/AES without keys.

    Free and open source (Apache-2.0), by the author of rosetta-js, a terminal coding agent for open-weight models.

    Authorized offline practice only: no network access or remote targets. It cannot break modern cryptography (AES, RSA) without the key and does not do heavy binary decompilation. Very short Vigenère or repeating-key XOR texts may need a hint or crib.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    python3
    xxd
    file
    strings

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    Shell runs the decoding scripts and xxd/file/strings. Read Files: it reads the challenge files in the working directory. Write Files: only the answer file (for example flag.txt) the challenge asks for. TMPDIR is read so scripts never write outside the working or temp directory. No network access.

    Listed1 month ago

    What's inside

    Frequently Asked Questions

    decode_all.py tries the common layers (base64/32/58/85, hex, binary, rot, XOR, gzip, morse and more) to depth 3 by default, or deeper with --depth, ranks the results, and prints the chain that produced each flag candidate.

    Yes, it includes specialized scripts for single-byte and repeating-key XOR analysis, using frequency estimation and crib-based attacks to recover keys without manual brute-forcing.

    This skill is designed for any AI agent with a Python 3 environment and access to standard Unix utilities like xxd and strings, making it highly compatible with most developer-focused agent frameworks.

    The SKILL.md workflow, three Python 3 standard-library scripts (decode_all.py, xor_tools.py, classic_cipher.py), a smoke test that checks them, and the Apache-2.0 license. It's free.

    It's built for offline puzzles: layered encodings, XOR and classic ciphers. It can't break modern cryptography such as AES or RSA without the key, and it isn't meant for attacking networks or live systems.

    New in Security