Performing Cryptographic Audit of Application
Overview
A cryptographic audit systematically reviews an application's use of cryptographic primitives, protocols, and key management to identify vulnerabilities such as weak algorithms, insecure modes, hardcoded keys, insufficient entropy, and protocol misconfigurations. This skill covers building an automated crypto audit tool that scans Python and configuration files for common cryptographic weaknesses.
Objectives
- Detect usage of deprecated algorithms (MD5, SHA-1, DES, RC4)
- Identify insecure cipher modes (ECB) and padding schemes
- Find hardcoded keys, passwords, and secrets in source code
- Verify TLS/SSL configuration strength
- Check key derivation function parameters
- Validate random number generator usage
- Produce a structured audit report with findings and remediation
Key Concepts
Cryptographic Weakness Categories
| Category |
Examples |
Risk Level |
| Weak Hashing |
MD5, SHA-1 for integrity/signatures |
High |
| Insecure Encryption |
DES, 3DES, RC4, Blowfish |
High |
| Bad Cipher Mode |
ECB mode for any block cipher |
High |
| Insufficient Key Size |
RSA < 2048, AES-128 for long-term |
Medium |
| Hardcoded Secrets |
Keys/passwords in source code |
Critical |
| Weak KDF |
Low iteration PBKDF2, plain MD5 |
High |
| Poor Entropy |
time-based seeds, predictable IVs |
High |
| Deprecated Protocols |
SSLv3, TLS 1.0, TLS 1.1 |
High |
Security Considerations
- Review both application code and configuration files
- Check third-party dependencies for known crypto vulnerabilities
- Verify certificates and TLS configurations on deployed servers
- Ensure secrets are loaded from environment variables or vaults
- Review key storage and rotation practices
Validation Criteria
1---2name: performing-cryptographic-audit-of-application3description: A cryptographic audit systematically reviews an application's use of cryptographic primitives, protocols, and key management to identify vulnerabilities such as weak algorithms, insecure modes, hardco4domain: cybersecurity5subdomain: cryptography6tags: [cryptography, audit, security-review, compliance, vulnerability-assessment]7version: "1.0"8author: mahipal9license: Apache-2.010---1112# Performing Cryptographic Audit of Application1314## Overview1516A cryptographic audit systematically reviews an application's use of cryptographic primitives, protocols, and key management to identify vulnerabilities such as weak algorithms, insecure modes, hardcoded keys, insufficient entropy, and protocol misconfigurations. This skill covers building an automated crypto audit tool that scans Python and configuration files for common cryptographic weaknesses.1718## Objectives1920- Detect usage of deprecated algorithms (MD5, SHA-1, DES, RC4)21- Identify insecure cipher modes (ECB) and padding schemes22- Find hardcoded keys, passwords, and secrets in source code23- Verify TLS/SSL configuration strength24- Check key derivation function parameters25- Validate random number generator usage26- Produce a structured audit report with findings and remediation2728## Key Concepts2930### Cryptographic Weakness Categories3132| Category | Examples | Risk Level |33|----------|----------|------------|34| Weak Hashing | MD5, SHA-1 for integrity/signatures | High |35| Insecure Encryption | DES, 3DES, RC4, Blowfish | High |36| Bad Cipher Mode | ECB mode for any block cipher | High |37| Insufficient Key Size | RSA < 2048, AES-128 for long-term | Medium |38| Hardcoded Secrets | Keys/passwords in source code | Critical |39| Weak KDF | Low iteration PBKDF2, plain MD5 | High |40| Poor Entropy | time-based seeds, predictable IVs | High |41| Deprecated Protocols | SSLv3, TLS 1.0, TLS 1.1 | High |4243## Security Considerations4445- Review both application code and configuration files46- Check third-party dependencies for known crypto vulnerabilities47- Verify certificates and TLS configurations on deployed servers48- Ensure secrets are loaded from environment variables or vaults49- Review key storage and rotation practices5051## Validation Criteria5253- [ ] Scanner detects all injected test weaknesses54- [ ] MD5/SHA-1 usage for security purposes is flagged55- [ ] ECB mode usage is flagged56- [ ] Hardcoded keys/passwords are detected57- [ ] Weak KDF parameters are identified58- [ ] Report includes severity, location, and remediation59- [ ] False positive rate is below 10%