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

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 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.

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 2 days ago

    • Free to download with an account

    Requires

    python3
    xxd
    file
    strings

    Listed2 days ago

    What's inside

    Frequently Asked Questions