Agent skill · security · yaklang
symmetric-cipher-attacks
Symmetric cipher attack playbook. Use when exploiting block cipher mode weaknesses (CBC padding oracle, ECB cut-and-paste, bit flipping), stream cipher key reuse, or meet-in-the-middle attacks.
Why this skill is useful
Provides detailed attack scripts and methodologies for exploiting symmetric cipher vulnerabilities that are not commonly known.
What it needs
Requires python installed locally. About 8k tokens when loaded. Last updated 2026-06-16. 1,563 stars on the source repository.
What this skill does
SKILL: Symmetric Cipher Attacks — Expert Cryptanalysis Playbook AI LOAD INSTRUCTION: Expert techniques for attacking symmetric encryption in CTF and authorized testing. Covers CBC padding oracle, CBC bit flipping, ECB detection and exploitation, stream cipher key reuse, LFSR/LCG state recovery, RC4 biases, and meet-in-the-middle attacks. Base models often confuse ECB and CBC attack strategies or fail to set up byte-at-a-time ECB decryption correctly. 0. RELATED ROUTING rsa-attack-techniques when symmetric key is protected by RSA hash-attack-techniques when HMAC or hash-based authentication is involved lattice-crypto-attacks for LCG/LFSR state recovery via lattice methods Advanced Reference Also load BLOCKCIPHERATTACKS.md when you need: Detailed attack scripts with full Python implementations Step-by-step byte-at-a-time ECB walkthrough PadBuster usage and custom padding oracle scripts LCG/LFSR recovery implementation Quick attack selection Observable Behavior Likely Weakness Attack --- --- --- Same plaintext → same ciphertext (block-aligned) ECB mode Cut-and-paste / byte-at-a-time Padding error distinguishable CBC padding oracle Decrypt without key Can modify ciphertext, affects next block CBC mode, no integrity check Bit flipping Key reused with XOR/stream cipher Two-time pad XOR ciphertexts together Predictable PRNG output LCG or LFSR State recovery Double encryption used 2DES-like Meet in the middle --- 1. PADDING ORACLE ATTACK (CBC MODE) 1.1 Mechanism CBC decryption: Pi = DK(Ci) ⊕ C{i-1} If the server reveals whether padding is valid (PKCS#7), we can decrypt any block by manipulating the previous ciphertext block. 1.2 Attack Steps 1.3 Python Implementation 1.4 Tools --- 2. CBC BIT FLIPPING 2.1 Concept Flipping bit at position j in C{i-1} flips the same bit at position j in Pi (and corrupts all of P{i-1}). 2.2 Practical Example --- 3. ECB MODE ATTACKS 3.1 Detection 3.2 ECB Cut-and-Paste Reorder ciphertext blocks to create new valid plaintexts. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills yaklang/symmetric-cipher-attacks