Logo Crypto Attacks

Crypto Attacks

Cộng đồng
brucesongs
crypto-attacks

Cryptographic Attacks target implementation flaws and algorithm weaknesses in encryption systems, covering OWASP A04: Cryptographic Failures.

Add to TypingMind

Tổng quan

Nhà phát hànhbrucesongs
Kho mãkali-claw
Tên kỹ năngcrypto-attacks
Sao
70
Bản fork
18
Tệp đi kèm
14
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 14 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được brucesongs công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Crypto Attacks trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/brucesongs/kali-claw/tree/main/skills/crypto-attacks
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/brucesongs/kali-claw.git /tmp/kali-claw
mkdir -p .claude/skills
cp -r /tmp/kali-claw/skills/crypto-attacks .claude/skills/crypto-attacks
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Crypto Attacks trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Crypto Attacks ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Crypto Attacks với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Skill: Cryptographic Attacks

Supplementary Files:

  • payloads.md — Cryptographic attack payload collection: weak algorithm detection, hash cracking, Padding Oracle, Hash Length Extension, ECB mode, JWT attacks, RSA attacks, SSL/TLS test commands
  • test-cases.md — Structured test cases: complete test checklist covering cryptographic detection, hash cracking, protocol attacks, JWT attacks, and advanced techniques

Summary

Crypto Attacks skill domain covering cryptography operations.

Tools: openssl, sslscan, testssl.sh, hashcat, CyberChef, padbuster, RsaCtfTool

Domain: cryptography

OWASP: A04:2021-Cryptographic Failures

Description

Cryptographic Attacks target implementation flaws and algorithm weaknesses in encryption systems, covering OWASP A04: Cryptographic Failures. Attackers do not break mathematical problems; instead, they exploit engineering implementation errors: weak algorithm remnants (RC4/DES/MD5/SHA1), key management mistakes (hardcoded/reused/non-rotated), encryption mode misuse (ECB/Padding Oracle/IV Reuse), protocol downgrade (SSLv3/TLS 1.0), and missing signature verification (JWT alg:none/Algorithm Confusion).

Core Insight: The mathematical foundations of modern cryptography are robust — attackers almost never "break encryption algorithms" but rather "break how encryption is used." A rule of thumb: if you feel like you are attacking the math, you are probably heading in the wrong direction; instead, look for who wrote the key in the code, which IV is fixed, which service still accepts SSLv3.

Key Attack Surfaces:

  • Weak Algorithms: RC4 (fully broken), DES (56-bit brute forceable), MD5/SHA1 (collision attacks), Blowfish (64-bit block)
  • Key Management Flaws: Hardcoded keys, fixed IVs, key reuse, no key rotation, keys stored in source code/config files
  • Padding Oracle: Server returns different responses for decryption padding errors, allowing attackers to recover plaintext byte by byte without the key
  • Hash Length Extension: Hash functions based on Merkle-Damgard construction (SHA-1/MD5) allow appending data to MAC without knowing the key
  • SSL/TLS Vulnerabilities: POODLE (SSLv3), BEAST (TLS 1.0 CBC), Heartbleed (OpenSSL), certificate verification bypass

Use Cases

  1. Web Application Encryption Audit - Detect HTTPS configuration flaws, cookie encryption weaknesses, missing API signature verification, sensitive data transmitted in plaintext
  2. JWT / Token Security Testing - Algorithm confusion attacks (RS256 -> HS256), alg:none bypass, key brute force, payload tampering
  3. CTF Cryptography Challenges - Quickly identify encryption modes (ECB/CBC/CTR), known plaintext attacks, Padding Oracle, hash extension attacks
  4. Data Breach Assessment - Analyze whether leaked data uses weak encryption, assess cracking feasibility (hash type/salt/iterations)
  5. TLS/SSL Configuration Hardening - Scan server-supported protocol versions, cipher suites, certificate chain validity

Core Tools

ToolPurposeCommand Example
opensslCertificate analysis, protocol testing, encryption/decryption operationsopenssl s_client -connect target:443 -tls1
sslscanQuick TLS configuration scan, detect supported protocols and cipher suitessslscan target.com
testssl.shComprehensive SSL/TLS security audit, 200+ checkstestssl.sh --full target.com
hashcatOffline hash cracking (including JWT key brute force mode 16500)hashcat -m 16500 jwt.txt rockyou.txt
CyberChefEncoding/decoding/encryption/hashing online analysis (identify unknown encodings)Browser tool, drag-and-drop operation
padbusterAutomated Padding Oracle attackspadbuster URL ENC_BLOCK 8

Auxiliary tools: hash-identifier (hash type identification), htlea (Hash Length Extension), RsaCtfTool (RSA attack collection), jwt_tool (full JWT testing workflow).


Methodology

Attack Chain

[1] Crypto ID            [2] Algorithm Analysis    [3] Key/IV Attacks
  - Protocol version       - Weak algorithm detect   - Hardcoded key search
  - Cipher suite enum      - Block size/mode detect  - IV predictability
  - Hash type ID           - Key length assessment   - Key reuse detection
  - Token format parse     - Padding mode analysis   - ECB mode detection
       |                        |                        |
       v                        v                        v
[4] Protocol Downgrade    [5] Data Decryption       [6] Signature Bypass
  - TLS version downgrade   - Padding Oracle          - JWT alg:none
  - Cipher suite downgrade  - Known plaintext attack  - Algorithm Confusion
  - Forward secrecy test    - Bit flipping attack     - Key brute force
  - Cert chain validation   - Hash extension attack   - Replay attacks

Post-Quantum Migration

The post-quantum transition expands the crypto-attacks attack surface on three new axes that any Distinguished-tier engagement must cover: (a) classical-vs-quantum threat model, (b) hybrid construction correctness, and (c) protocol incompatibilities caused by larger PQ key / signature sizes. The attack chain below operationalizes the HNDL ("Harvest Now, Decrypt Later") adversary and the migration audit.

[PQM-1] Asset Inventory       [PQM-2] Algorithm Coverage   [PQM-3] Hybrid Construction
  - Long-lived keys cataloged   - FIPS 203/204/205 support     - X25519 + ML-KEM-768 KEM
  - HNDL exposure profiled      - liboqs / OQS-OpenSSL          - Transcript hash binding
  - PKI chain depth analyzed    - pqm4 (Cortex-M4 targets)      - KDF length-prefixing
       |                              |                                |
       v                              v                                v
[PQM-4] Protocol Compatibility [PQM-5] Downgrade Analysis   [PQM-6] PQC Implementation Audit
  - MTU / fragment / EDNS(0)    - Stripping PQ group             - KyberSlash (barrett div)
  - Middlebox cert handling     - Hybrid fallback policy         - Dilithium verify-before-release
  - X.509 alt-signature path    - Cipher string hardening        - Cross-protocol key reuse

Real research touchpoints: KyberSlash (2021), Injecting Crystals (Manganote et al., 2023), Crystal-Slinger, GROUNDTRUTH (2024), and Shor's algorithm assumptions about ECC/RSA recovery under a cryptographically relevant quantum computer (CRQC). The full attack taxonomy, parameter sizes, and lab procedures live in guides/crypto-attacks-pqc-migration-side-channel.md.

Side-Channel Analysis

Side-channel analysis (SCA) targets physical and microarchitectural leakage of secret-dependent computation -- the single largest source of real-world breaks of mathematically sound algorithms. Padding Oracle, Heartbleed, and Spectre/Meltdown are all side channels; the same methodology scales to power, EM, timing, and fault channels on cryptographic hardware.

[SCA-1] Channel Selection     [SCA-2] Trace Acquisition     [SCA-3] Statistical Attack
  - Timing (dudect)              - ChipWhisperer + STM32F4      - SPA: single-trace op ID
  - Power (SPA / DPA / CPA)      - Riscure Inspector            - DPA: difference-of-means
  - Electromagnetic (EMA)        - Near-field EM probe + scope  - CPA: HW correlation
  - Cache-timing (Spectre)       - Remote latency measurement   - Template: max likelihood
       |                              |                                |
       v                              v                                v
[SCA-4] PQC-Specific Attacks   [SCA-5] Constant-Time Audit   [SCA-6] Fault Injection
  - Kyber compress leak          - dudect / ctgrind / binsec    - Clock / power glitch
  - Dilithium z-step             - HW-accel (AES-NI, ARMv8)     - Verify-before-release bypass
  - SPHINCS+ WOTS+ chain         - Masking (order-1 minimum)    - Fault-tolerant chains

Equipment baseline: ChipWhisperer Husky or Lite + CW308/STM32F4 target for power/EM/glitch; dudect / ctgrind for software constant-time verification; Riscure Inspector for enterprise-grade CPA / template attacks. Deep dive: guides/crypto-attacks-pqc-migration-side-channel.md.

Crypto-Agility Framework

Crypto-agility is the ability to swap cryptographic primitives without code changes or protocol breakage -- the strongest predictor of whether a PQC migration will succeed. The framework below structures the audit; an organization that cannot answer "yes" to every row is non-agile and at risk during any future algorithm transition (PQC today, AES-GCM-SIV tomorrow, whatever comes next).

[CA-1] Algorithm Inventory      [CA-2] Pluggable Primitive API  [CA-3] Negotiation & Telemetry
  - Every long-term key mapped    - Algorithm as config string     - Negotiated group logged
  - Every signature location      - Key store holds 5 KB PQ keys   - Downgrade detected
  - Every TLS / SSH / IPsec       - No hardcoded constants         - Per-peer algorithm tracked
       |                                |                                |
       v                                v                                v
[CA-4] Swap Planning             [CA-5] Test Coverage            [CA-6] Rollback Readiness
  - 12-month / 24-month target    - ACVP / CAVP vectors            - Atomic rollback to classical
  - Hybrid (classical + PQ)       - Cross-stack interop tests       - Re-key without service outage
  - Pure-PQ end state             - Side-channel regression         - Root of trust migration

Acceptance criterion: a single configuration change in crypto_policy.yaml (e.g., kem_group: x25519_mlkem768) propagates to every endpoint, every library, every certificate, with no source modification -- and the change is observable in production telemetry within 24 hours. Anything less is non-agile.

Defense Perspective

Defense MeasureDescriptionAttack Types Countered
AES-256-GCM / ChaCha20-Poly1305Authenticated encryption (AEAD), ensures both confidentiality and integrityECB/CBC mode attacks, Padding Oracle
TLS 1.3 OnlyDisable old protocols, enforce forward secrecy (PFS)POODLE/BEAST/protocol downgrade
Key Management (KMS/HSM)Keys never touch source code, hardware-isolated storageHardcoded keys, key leakage
PBKDF2/bcrypt/argon2idSlow hashing + salt, increases offline cracking costHash cracking, rainbow tables
JWT Security PracticesAlgorithm allowlist + short expiration + strong keys + token blacklistalg:none / Algorithm Confusion
Certificate PinningPin expected certificates/public keys, prevent MITMForged certificates, MITM
Hybrid KEM (X25519 + ML-KEM-768)Bind classical and PQ shares into transcript hash; secure if either primitive holdsHNDL, PQ-stripping downgrade, single-primitive break
Verify-before-release on PQ signaturesCompute signature, verify under public key, retry on mismatchDilithium / FN-DSA fault injection (Injecting Crystals)
First-order masking + NTT shufflingRandom-share secret-dependent lattice operationsKyber / Dilithius SPA / DPA / single-trace EM
Constant-time coding (verified)dudect / ctgrind / binsec CI gates; AES-NI / ARMv8 SHATiming, cache-timing, KyberSlash-class leaks
Crypto-agility policy layerAlgorithms expressed as config (OID / cipher string), not source constantsMigration blockers, future algorithm deprecations
X.509 alt-signature (hybrid)Two signatures (classical + PQ) per certificate with separate OIDsTransitional PKI trust breakage, slow client rollout
Per-protocol KEM key derivationDomain-separated KDF on the shared secretKyber cross-protocol (Bosc et al. 2023)
PQC Migration and Side-Channel Mitigations

Beyond the row-level defenses, four structural mitigations cover the emerging PQ and side-channel surface:

  1. Hybrid-by-default for long-lived data: any TLS / SSH / IPsec endpoint that protects data with a confidentiality lifetime of 10+ years MUST negotiate a hybrid group (e.g., x25519_mlkem768) and MUST reject ClientHello that strips the PQ group. Pure-PQ endpoints are acceptable only after the PQC primitive has accumulated 5+ years of adversarial analysis.
  2. Verify-before-release everywhere: every PQC signature implementation must compute the signature, run a full verification under the public key, and retry on failure. This single step defeats the cheapest single-fault attacks (Injecting Crystals class) and is now mandated by FIPS 204.
  3. Constant-time as a CI gate, not a claim: any "constant-time" assertion must be backed by automated dudect / ctgrind / binsec evidence in CI. Side-channel regression tests on cryptographic primitives must run on every commit, not as a release milestone. Hardware acceleration (AES-NI, ARMv8 SHA, dedicated PQ IP) is preferred over constant-time software where available.
  4. Crypto-agility first: every algorithm must be expressible as a single configuration entry (cipher string, KEM group, signature OID), not a refactoring project. The acceptance test is "swap x25519 to x25519_mlkem768 in one config file; production telemetry reflects the change within 24 hours; no source modification." Organizations that cannot pass this test are non-agile and will not complete the PQC migration before the HNDL window closes.

Practical Steps

1. Crypto Identification Phase

bash
# SSL/TLS protocol scanning
testssl.sh --protocols target.com
sslscan target.com | grep -E "SSLv3|TLS 1.0|TLS 1.1"

# Hash type identification
hash-identifier
# Or: hashcat --identify hash.txt

2. Algorithm Analysis and Key Attacks

bash
# Padding Oracle attack
padbuster http://target/page?data=ENC ENC 8 -encoding 0 -plaintext "admin=true"

# ECB mode detection: Submit repeated plaintext, observe ciphertext block repetition
# IV Reuse: Encrypt same plaintext twice, compare ciphertexts

3. Signature Bypass and Token Attacks

bash
# JWT alg:none bypass
python3 jwt_tool.py <TOKEN> -X a

# JWT Algorithm Confusion (RS256 -> HS256)
python3 jwt_tool.py <TOKEN> -I -at HS256 -pc role -pv admin -k public_key.pem

# JWT key brute force
hashcat -m 16500 jwt_hash.txt /usr/share/wordlists/rockyou.txt

For detailed payloads see payloads.md, and for the complete test checklist see test-cases.md.


Common Pitfalls

  • Assuming encryption means security: Encryption that uses AES-256 but with a hardcoded IV or ECB mode is trivially breakable. Always verify the complete cryptographic configuration — algorithm, mode, key management, IV handling — not just the algorithm name.
  • Neglecting to check for key rotation: Many systems generate a single encryption key at deployment and never rotate it. A key leaked through a single code repository commit compromises all data encrypted with that key since the system was deployed.
  • Overlooking JWT in non-obvious locations: JWTs are used in cookies, Authorization headers, URL parameters, and WebSocket upgrade requests. Testing only one transport mechanism misses attack surface.

Automation and Scripting

Automate TLS configuration scanning by running testssl.sh with the --json output flag and piping results into a comparison script that flags deviations from security baselines. Use hashcat in benchmark mode (hashcat -b) to measure GPU cracking throughput before launching long-running cracking jobs. Script Padding Oracle attacks with padbuster's batch mode and custom Python wrappers that automate the byte-by-byte decryption loop with retry logic for network errors.

Reporting and Documentation

Cryptographic findings should be mapped to OWASP A04:2021 (Cryptographic Failures) and include the specific misconfiguration discovered (e.g., "TLS 1.0 enabled with CBC cipher suite" rather than "weak encryption"). Document the full attack chain from discovery to impact: how the weak configuration was identified, what data could be decrypted or tampered with, and the estimated effort to exploit. Include specific remediation with library-specific configuration examples (e.g., OpenSSL cipher string, node.js TLS options).

Legal and Ethical Considerations

Testing SSL/TLS configurations against production servers is generally permissible but be cautious with aggressive scanning that could trigger DoS conditions. Testing Heartbleed or similar memory-disclosure vulnerabilities on production systems may expose other users' sensitive data — use dedicated test environments when possible. Never store intercepted SSL private keys or decrypted session data beyond what is needed for the engagement report, and always verify that cryptographic testing is included in the scope of authorization.

Integration with Other Tools

Cryptographic attack findings feed directly into several adjacent skills. Weak TLS configurations discovered through testssl.sh inform network-pentest MITM attack planning. JWT vulnerabilities (alg:none, key brute force) connect to web-auth-bypass for authentication exploitation. Hash cracking results from hashcat feed into password-attack workflows for credential stuffing. Use burpsuite to intercept and replay JWT tampering payloads against authenticated API endpoints, combining crypto analysis with web application testing.

Case Studies and Examples

  • JWT algorithm confusion: A web application used RS256 (asymmetric) for JWT signing. An attacker obtained the public key from the /jwks.json endpoint, then forged a token signed with HS256 using the public key as the HMAC secret. The server accepted the forged token because it trusted the key without verifying the algorithm, granting admin access.
  • Padding Oracle in payment gateway: An e-commerce platform's payment callback URL returned different HTTP status codes for valid versus invalid padding. Using padbuster, the attacker decrypted the encrypted order ID parameter, modified the amount to zero, and re-encrypted it — purchasing items for free.
  • Heartbleed memory dump: During a TLS security audit, the Heartbleed vulnerability was confirmed on a legacy load balancer. The memory dump contained database connection strings with plaintext credentials, enabling full database compromise through the cryptographic implementation flaw.

Detection and Evasion

Defenders can detect cryptographic attacks through several indicators: unusual TLS negotiation patterns (downgrade attempts logged by the server), repeated decryption errors in application logs (Padding Oracle attempts), JWT validation failures with algorithm mismatches, and anomalous hash cracking activity (high GPU utilization on compromised machines). Monitor certificate transparency logs for unauthorized certificate issuance. To evade detection during testing: spread JWT brute force attempts across multiple API endpoints, use timing delays in Padding Oracle attacks to avoid triggering rate limits, and test TLS downgrade resistance through a single well-crafted ClientHello rather than a noisy scan. For hash cracking, offload to dedicated GPU rigs outside the target network.

Advanced Techniques

Beyond the core attacks, advanced cryptographic testing includes: RSA key recovery from partial key exposure (known bits of p or q), Bleichenbacher attacks against PKCS#1 v1.5 padding in RSA encryption, BEAST and Lucky13 attacks against TLS CBC cipher suites, hash length extension attacks against SHA-256 and SHA-512 (not just MD5/SHA1), and cryptographic side-channel attacks using timing analysis to extract secrets. For CTF challenges, practice with RsaCtfTool for automated RSA attack selection and CyberChef for rapid encoding/decoding chain prototyping.

Tool Comparison Matrix

ToolBest ForSpeedCoverageSkill Level
testssl.shComprehensive TLS auditingModerateVery broadBeginner
sslscanQuick protocol/cipher checkFastBroadBeginner
hashcatGPU hash/JWT crackingVery fast300+ hash typesIntermediate
padbusterPadding Oracle automationSlow (network-bound)NarrowIntermediate
CyberChefEncoding/decoding analysisN/A (manual)Very broadBeginner
RsaCtfToolRSA attack collectionVariableRSA-specificAdvanced

Detection Methods

TLS / SSL Audit

  • Weak cipher usage: TLS 1.0/1.1; RC4, DES, 3DES ciphers; SHA-1 signatures.
  • Certificate anomalies: Self-signed certs in production; cert chain depth > 5; expired intermediate.
  • Protocol downgrade: TLS_FALLBACK_SCSV abuse; SSLv3 fallback.

Cryptographic Implementation Flaws

  • Padding oracle signatures: Time-differential responses to malformed padding (Vaudenay, POODLE).
  • Bleichenbacher signatures: Varying error messages for RSA PKCS#1 v1.5 decryption failures.
  • Nonce reuse: Same IV/nonce used with same key in stream cipher (CTR/GCM).
  • Weak RNG: Predictable random number generation (signature of weak entropy).

SIEM Detection Rules

  • Splunk SPL: index=tls sourcetype=ssl_handshake | where tls_version IN ("TLSv1", "TLSv1.1")
  • Custom anomaly detection: TLS handshake timing correlation for padding oracle detection.

Defense Evasion Techniques

TLS Fingerprint Mimicry

  • JA3/JA4 hash matching: Use curl-impersonate to match real browser TLS fingerprints.
  • Cipher suite order: Match exact cipher order of legitimate client.
  • TLS extension order: Match ALPN, SNI, supported_versions order.

Side-Channel Attack Stealth

  • Slow & low: Pace oracle queries below threshold (e.g., 5 req/min).
  • Distribute source IPs: Use residential proxies to spread oracle calls.
  • Off-hours timing: Run during low-traffic hours; blends with maintenance.

Padding Oracle Stealth

  • Statistical noise: Mix oracle queries with legitimate traffic.
  • Use real client behavior: Mimic exact request patterns of legitimate user.
  • Connection reuse: Reuse legitimate session cookie to avoid new-connection alerts.

Weak RNG Exploitation

  • Time-delayed exploitation: Compromise RNG once, exploit later (avoids real-time detection).
  • Cross-protocol: Exploit predictable RNG in protocol A to compromise protocol B.

Performance and Remediation

GPU-accelerated cracking with hashcat can achieve billions of MD5 hashes per second on modern hardware, but performance drops dramatically for memory-hard algorithms like bcrypt (thousands per second) and argon2id (hundreds per second). Choose attack modes based on target hash type: dictionary + rules for fast hashes, targeted dictionaries with custom mutations for slow hashes. For TLS scanning, testssl.sh performs 200+ checks but takes 5-10 minutes per host. Prioritize cryptographic remediation by replacing the weakest components first: disable SSLv3 and TLS 1.0/1.1 immediately, migrate from CBC mode to GCM/ChaCha20-Poly1305, enforce TLS 1.3 where possible, and implement proper key management using HSMs or cloud KMS services. For JWT security, enforce algorithm allowlists, use short token lifetimes, and rotate any exposed keys.

Hacker Laws

  1. Obscurity Is Not Security -- Relying on hidden algorithms, custom encryption, or secret IVs to protect data is the biggest trap. Kerckhoffs' principle: security should depend only on the secrecy of the key, not the secrecy of the algorithm. Homemade encryption algorithms are almost certainly weaker than AES.

  2. First Principles -- Understanding the design principles of cryptographic primitives is more important than memorizing attack steps. Padding Oracle works because the server leaks a 1-bit piece of information: "whether the padding is valid." Understanding this, you can find similar information leaks in any implementation.

  3. Defense in Depth -- Single-layer encryption is not enough. TLS protects transmission + AES-256-GCM protects storage + HMAC protects integrity + HSM protects keys. No single point of failure should lead to total collapse.


Learning Resources

Supplementary files for this skill: payloads.md, test-cases.md Related skills: skills/web-auth-bypass/SKILL.md, skills/password-attack/SKILL.md External resources:

  • Workspace internal materials: guides/cryptographic_failures_complete_guide.md -- Complete OWASP A04 guide with weak algorithm attacks, ECB/Padding Oracle/IV Reuse attacks, JWT tampering, and complete offensive and defensive code for key management
  • Workspace internal materials: guides/crypto-attacks-pqc-migration-side-channel.md -- Post-Quantum Cryptography migration (NIST FIPS 203/204/205, ML-KEM, ML-DSA, SLH-DSA, FN-DSA), hybrid TLS 1.3, X.509 cert handling, side-channel methodology (SPA / DPA / CPA / EMA / timing / cache-timing), PQC-specific attacks (KyberSlash, Injecting Crystals, SPHINCS+ WOTS+ faults), and end-to-end ChipWhisperer lab on STM32F4
  • PortSwigger Crypto Lab: https://portswigger.net/web-security/cryptography -- Systematic cryptographic attack labs
  • Cryptopals: https://cryptopals.com/ -- 8 sets of cryptography programming challenges, from basic to advanced
  • testssl.sh GitHub: https://github.com/drwetter/testssl.sh -- TLS/SSL security scanning tool
  • JWT.io: https://jwt.io/ -- Online JWT decoding and analysis
  • HackTricks - Crypto: https://book.hacktricks.xyz/crypto -- Cryptographic attack quick reference

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Crypto Attacks làm được gì?

Cryptographic Attacks target implementation flaws and algorithm weaknesses in encryption systems, covering OWASP A04: Cryptographic Failures.

Vì sao nên dùng Crypto Attacks trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Crypto Attacks là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Crypto Attacks trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/brucesongs/kali-claw/tree/main/skills/crypto-attacks. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Crypto Attacks?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Crypto Attacks với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Crypto Attacks với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Crypto Attacks có miễn phí không?

Có. Kỹ năng này được brucesongs phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇