analyzing-crypto-weakness
Identifies weak cryptographic algorithms, hardcoded keys, and insecure key management practices in binary code. Use when analyzing encryption/decryption, authentication mechanisms, or reviewing cryptographic implementations.
When & Why to Use This Skill
This Claude skill specializes in identifying cryptographic vulnerabilities within binary code. It automatically detects weak algorithms, hardcoded keys, and insecure key management practices, helping developers and security professionals fortify their software against data breaches and ensure compliance with modern security standards.
Use Cases
- Security Auditing: Scanning legacy applications and binary files to identify deprecated encryption algorithms like DES or MD5 that require upgrading.
- Hardcoded Secret Detection: Automatically locating embedded passwords, private keys, and nonces within code to prevent unauthorized access and credential leaks.
- Compliance & Standards Review: Verifying that cryptographic implementations meet industry standards by checking key sizes, padding schemes, and randomness of IVs.
- Vulnerability Research: Assisting security researchers in analyzing authentication mechanisms and encryption/decryption workflows for potential side-channel or timing attacks.
| name | analyzing-crypto-weakness |
|---|---|
| description | Identifies weak cryptographic algorithms, hardcoded keys, and insecure key management practices in binary code. Use when analyzing encryption/decryption, authentication mechanisms, or reviewing cryptographic implementations. |
Cryptographic Weakness Detection
Detection Workflow
- Identify cryptographic functions: Search for crypto-related function names, encryption/decryption operations, hash function usage
- Extract crypto parameters: Identify algorithms used, check key sizes and modes, examine IV/nonce handling
- Check for hardcoded secrets: Use
stringsto find potential keys, search for common password/key patterns, analyze data sections for secrets - Assess implementation security: Check for constant-time comparisons, verify proper padding, assess randomness of IVs/nonces
Key Patterns
- Weak algorithms: DES, 3DES, RC4, MD5, SHA1, ECB mode, small key sizes (<128 bits)
- Hardcoded secrets: passwords/passphrases, keys, IVs/nonces, magic numbers
- Insecure key management: keys embedded in code, plaintext storage, weak RNG, reused IVs/nonces
- Implementation issues: timing attacks, side-channel vulnerabilities, incorrect padding, missing authentication
Output Format
Report with: id, type, subtype, severity, confidence, location, algorithm, mode, key_size, issues, recommendation, cve_references, mitigation.
Severity Guidelines
- CRITICAL: Hardcoded private keys or passwords
- HIGH: Broken algorithms (DES, RC4) in security-critical code
- MEDIUM: Weak algorithms in non-critical code
- LOW: Minor crypto implementation issues
See Also
patterns.md- Detailed detection patterns and exploitation scenariosexamples.md- Example analysis cases and code samplesreferences.md- CWE references and mitigation strategies