Weak Crypto
"Uses MD5" is not a finding. Every algorithm on this page fails for a specific, testable reason, and the report is only worth reading if it names that reason — the keyspace, the block size, the bias, or the absence of a cost factor. This page is the sorting exercise: which failure, which data, and what it costs to exploit.
Two different defects wearing one label
Identifying the usage
Start from the construction call, not the import. Libraries expose the algorithm name in one place and the mode in another, and the mode is where the defect usually lives. Then decide which of the three families you are looking at: a hash doing a job it cannot do, a symmetric cipher with a broken parameter, or an asymmetric key below the current strength floor.
| Algorithm | Class | Why it fails | Status |
|---|---|---|---|
| MD5 | Hash | Practical collision attacks since 2004; chosen-prefix collisions are minutes of compute | Broken for collision resistance. Still acceptable as a non-security checksum. |
| SHA-1 | Hash | Chosen-prefix collisions demonstrated (SHAttered 2017; later work dropped the cost by orders of magnitude) | Deprecated everywhere for signatures. Not a password hash either way. |
| DES | Block cipher | 56-bit effective key — exhaustive search is a commodity GPU problem | Broken. Every use is a finding. |
| 3DES | Block cipher | 112-bit effective key (not 168) and a 64-bit block — birthday bound around 2^32 blocks | Legacy-only in PCI and NIST guidance; Sweet32 applies. |
| RC4 | Stream cipher | Statistically biased keystream; biases recovered with a few million ciphertexts | Prohibited for TLS by RFC 7465 (Feb 2015), all versions. |
| Blowfish | Block cipher | 64-bit block, same birthday bound as 3DES; fine only as bcrypt’s internal primitive | Not for new encryption. bcrypt is still correct because it uses it differently. |
| RSA-1024 | Public key | Under 112-bit strength; NIST disallowed it for protecting data years ago | A finding on any system that still protects data with it. |
Breaking hashes
Password hashing has two independent defences and they are constantly confused. A salt stops precomputation and makes identical passwords produce different digests; it does not slow a single guess. A cost factor slows each guess and is the only thing that helps once the table is out. An unsalted fast hash has neither — which is why a leaked table of SHA-256 is not a leak, it is a plaintext export with extra steps.
What makes a hash "fast" is hardware. A modern GPU tests on the order of tens of billions of MD5 candidates per second, and the exact figure depends on the GPU, the mode and the ruleset — quote a benchmark you ran, not a chart you found. Against a properly configured password KDF the same hardware manages thousands per second, and the attacker's advantage becomes a cost problem rather than a mathematics problem.
// Finding: password stored with a single round of SHA-256
const hash = crypto.createHash('sha256').update(password).digest('hex');
// Why it matters: no salt, no cost. The same password produces the same
// digest in every tenant, so one crack resolves every copy of it, and
// a GPU tests billions of candidates per second against it.// Finding: password stored with a single round of SHA-256
const hash = crypto.createHash('sha256').update(password).digest('hex');
// Why it matters: no salt, no cost. The same password produces the same
// digest in every tenant, so one crack resolves every copy of it, and
// a GPU tests billions of candidates per second against it.// Fix: a password KDF with a per-user salt and a measured cost
import { hash, verify } from '@node-rs/argon2';
// OWASP Password Storage Cheat Sheet minimum: m=19456 KiB, t=2, p=1
const digest = await hash(password, { memoryCost: 19456, timeCost: 2, parallelism: 1 });
// verify() reads the parameters back out of the encoded hash, so
// raising the cost later does not invalidate existing users.
const ok = await verify(digest, password);// Fix: a password KDF with a per-user salt and a measured cost
import { hash, verify } from '@node-rs/argon2';
// OWASP Password Storage Cheat Sheet minimum: m=19456 KiB, t=2, p=1
const digest = await hash(password, { memoryCost: 19456, timeCost: 2, parallelism: 1 });
// verify() reads the parameters back out of the encoded hash, so
// raising the cost later does not invalidate existing users.
const ok = await verify(digest, password);DES and 3DES fail differently
These are usually reported together and should not be. DES fails on keyspace: 56 effective bits is exhaustible with commodity hardware, and has been for decades. 3DES has 112 effective bits, which is still expensive to brute-force; its defect is the 64-bit block. After 2^32 blocks under one key the birthday bound makes two identical blocks likely, and that is the structure Sweet32 exploits — in TLS it needed 2^32 records (tens of gigabytes of traffic) under a single session key, which is exactly what a long-lived HTTPS connection or a VPN tunnel can produce.
The practical consequence for a review: DES is a finding wherever it appears; 3DES is a finding in a protocol that keeps one key for a large volume of data, and a low-severity note in a short-lived single-message use. Both are excluded from current PCI DSS and NIST guidance for new work.
Sweet32 needs a lot of traffic — and gets it
RC4 and the date that matters
RC4's keystream is not uniform: early bytes are strongly biased and later bytes remain biased in ways that become statistically visible over millions of messages. That bias is enough to recover plaintext in repeated-message settings, which is why "it is still fast and nobody has broken it" was never true — it was broken by statistics, not by a key-recovery proof.
The finding should cite the rule, not a feeling: RFC 7465 (February 2015) prohibits RC4 for all versions of TLS, and TLS 1.3 has no non-AEAD cipher suites at all, so RC4 is not "deprecated in TLS 1.3" — it was prohibited two years before TLS 1.3 was published, for every version.
Measuring the cost
When a hash is in scope, the mode number is the finding's evidence. Pick it wrong and the run produces nothing; pick
it right and the benchmark becomes the severity argument. Identify first — hashid and
name-that-hash both work well — then benchmark with
-b before quoting a time.
| Mode | Hash | Note |
|---|---|---|
| 0 | MD5 | Trivially fast; a leaked table is plaintext |
| 100 | SHA-1 | Same order of magnitude |
| 1400 | SHA-256 | Fast — billions/sec on a modern GPU |
| 1700 | SHA-512 | Fast |
| 1000 | NTLM | The common AD target; unsalted by design |
| 10900 | PBKDF2-HMAC-SHA256 | Needs the iteration count; cost scales with it |
| 3200 | bcrypt | Cost factor matters; 72-byte input limit |
| 16500 | JWT (HS256) | Crack the signing secret directly |
| 13100 | Kerberoast (etype 23) | RC4 ticket hashes from AD |
| 22000 | WPA-PBKDF2-PMKID+EAPOL | Handshake, not the passphrase hash |
# Identify the hash first - do not guess the mode
hashid '5f4dcc3b5aa765d61d8327deb882cf99' # MD5
hashid '$2y$10$...' # bcrypt
name-that-hash -t '$2y$10$...' # alternative
# Dictionary attack, unsalted MD5
hashcat -m 0 -a 0 hashes.txt rockyou.txt
# With rules - turns one wordlist into millions of candidates
hashcat -m 0 -a 0 hashes.txt rockyou.txt -r rules/best64.rule
# Mask attack for a known policy: 8 chars, upper+lower+digit
hashcat -m 1400 -a 3 hashes.txt ?u?l?l?l?l?l?d?d
# Benchmark before quoting a time estimate to a client
hashcat -b -m 1400Password length is not the finding
Priorities
Weak-algorithm findings are the easiest to generate and the easiest to ignore, because a report with forty of them reads as boilerplate. Sort by what the attacker converts: recoverable secrets first, integrity bypasses second, legacy usage with no reachable attack third. A single RC4-protected session probably outranks every MD5 cache key in the codebase combined.
| Check | Expected | Where to look |
|---|---|---|
| The algorithm is named, not inferred from a headline | DES, 3DES, RC4, MD5, SHA-1, or a specific mode — each has a different exploitation path | The construction call and the protocol configuration |
| The reason is the right reason | DES: 56-bit keyspace. 3DES: 64-bit block (Sweet32). RC4: biased keystream, RFC 7465. | The finding text |
| Hash findings distinguish unsalted from salted, and fast from slow | A salted SHA-256 is still fast; the salt only removes precomputation | The password storage code |
| A recoverable artefact exists before claiming crackability | A hash, a capture, or a token — not "this looks weak" | The evidence section |
| The remediation names the replacement and the migration cost | RC4 to AES-GCM, 3DES to AES, SHA-1 to SHA-256 or Argon2id depending on purpose | The recommendation |
Evidence to Capture
Weak-crypto findings are easy to over-claim. These five items turn one into something a developer cannot dismiss:
The exact algorithm and parameter: Not "weak crypto" — "AES-128-ECB", "RSA-1024", "SHA-1 signature over the update manifest", "PBKDF2-HMAC-SHA256 at 1,000 iterations".
Where the value is reachable from: A weak hash over a session token is remotely reachable; a weak hash over a build artefact is not. State the route.
What the attacker gains, concretely: A forged update, a recovered password, a downgrade to a breakable suite. If the gain is theoretical, say so and drop the severity.
The measured cost where you can measure it: A hashcat benchmark on the client-irrelevant hardware still bounds the problem. For a leaked hash list, crack two or three entries and report the rate.
The migration constraint: A signed-firmware hash cannot be changed without reissuing firmware. Recording the constraint is what makes the recommendation credible.
Not Actually a Finding
Four patterns that get reported as weak crypto every week and should not be:
- MD5 as a content checksum: ETags, cache keys, deduplication and build fingerprints do not need collision resistance. The word MD5 in a config file is not a vulnerability.
- bcrypt "using Blowfish": bcrypt is built on Blowfish’s key schedule by design. The 64-bit block is not a weakness in that construction.
- AES-128: 128-bit strength exceeds every classical attack by a wide margin. It is not a weak algorithm and not a finding.
- SHA-1 in a non-security context: Git object naming, cache busting, and legacy protocol identifiers use SHA-1 for identity, not for collision resistance.
Assessing a Weak-Usage Finding
Before reporting, work through this to make sure the reason is the real reason:
- ☐ The algorithm and the mode are both named
- ☐ The parameter is recorded (key size, iteration count, cost factor)
- ☐ The data class the value protects is stated
- ☐ The failure mode is the correct one for that algorithm
- ☐ A current source is cited for the status (RFC, NIST, PCI, project advisory)
- ☐ The attacker capability required is described
- ☐ A concrete replacement is named
- ☐ The migration cost is acknowledged
- ☐ Where a value cannot be migrated, the compensating control is stated
Priorities
If the report cannot carry everything, order by what the attacker actually gets:
Why 3DES still ships, and what to replace it with
Legacy hardware is the usual reason: payment terminals, HSMs, smart-card personalisation systems and mainframe tape formats have 3DES in a fixed function. The replacement path is almost always AES with a derived key, but the migration runs through a period where both must be accepted — which is itself a finding if the negotiated direction can be chosen by the attacker. When reviewing, ask whether a downgrade to 3DES is possible even after AES is enabled; in TLS the answer lives in the cipher-suite order, and a server that still offers 3DES alongside AES is only as strong as the weakest suite it will accept.
Cracking Practice
Labs with real hashes, so the numbers you quote in reports are measured rather than remembered.