wstg-weak-cryptography

Tests TLS configurations, padding oracles, unencrypted channels, and weak encryption per OWASP WSTG.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-weak-cryptography-maicongambini
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: wstg-weak-cryptography
Source: https://github.com/MaiconGambini/opencode-harness-guide/tree/main/skills/wstg-weak-cryptography
Command: npx skills add https://github.com/MaiconGambini/opencode-harness-guide --skill wstg-weak-cryptography-maicongambini

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Cryptographic failures expose sensitive data, break authentication, and enable spoofing, yet they are easy to miss during a security assessment. This Skill provides a systematic methodology for auditing all four OWASP WSTG-CRYP test cases so testers can find weak transport security, padding oracles, cleartext data transmission, and broken encryption implementations. ## Core Features & Use Cases - TLS and Certificate Auditing: Enumerate protocol versions, cipher suites, certificate strength, HSTS, and mixed content issues against Mozilla and NIST baselines. - Padding Oracle Detection: Identify block-cipher encrypted values, tamper with ciphertext, and detect oracles through error messages, status codes, or timing differences. - Cleartext Channel and Weak Crypto Review: Find credentials or PII sent over HTTP, cookies missing the Secure flag, hardcoded secrets, and forbidden algorithms like MD5, DES, RC4, and ECB mode. - Use Case: During a web application penetration test, run the WSTG-CRYP-01 checks against every TLS endpoint, then grep the source code for MD5, ECB, and java.util.Random to prioritize manual testing of the highest-risk cryptographic code paths. ## Quick Start Use the wstg-weak-cryptography skill to audit the target application's TLS configuration and check for padding oracle vulnerabilities in its encrypted tokens.

Frequently Asked Questions about wstg-weak-cryptography

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test for weak TLS configuration during a penetration test?

Enumerate every TLS service port and check accepted protocol versions, cipher suites, and extensions. Flag anything below TLS 1.2, EXPORT/NULL/RC4 ciphers, TLS compression, and DHE parameters under 2048 bits, using the Mozilla Server Side TLS Guide as the baseline.

How to detect a padding oracle vulnerability in an application?

Find Base64-encoded values whose decoded length is a multiple of 8 or 16, flip bits in the second-to-last block, and resubmit. If the application distinguishes valid padding, invalid padding, and garbled plaintext through errors, status codes, or timing, a padding oracle exists.

Which encryption algorithms are considered weak under OWASP WSTG?

Forbidden algorithms include DES, 3DES, RC4, RC2, Blowfish, MD5, SHA-1, and ECB mode. Minimum acceptable choices are AES-128 or stronger, RSA 2048 or Curve25519, SHA-256 or stronger, and HMAC-SHA256 for message authentication.

Does CBC mode encryption need an HMAC?

Yes. AES-CBC without authentication is vulnerable to padding oracle attacks. Use an authenticated encryption mode like AES-GCM, or apply Encrypt-then-MAC with HMAC-SHA256 verified before any decryption attempt.

Why is java.util.Random dangerous for cryptographic values?

java.util.Random is a predictable non-cryptographic PRNG, so IVs, keys, salts, and tokens generated with it become guessable. Use a CSPRNG such as java.security.SecureRandom, os.urandom, or /dev/urandom instead.