← All concepts
Cryptographic weakness

Understanding Cryptographic weakness

What it is

Cryptography fails far more often from misuse than from broken maths — a predictable random value, a token signed with a guessable key, a hash used where a MAC was needed, an oracle that leaks one bit at a time. The primitive may be sound; the way it is wired is not.

How you approach it

  1. Look at any token, signature or random-looking value the app trusts. Is it as unpredictable as it needs to be?
  2. Weak keys, missing signatures and homemade schemes all fail the same way: you can produce a value the server will accept as genuine.
  3. Forge or predict the value the flag sits behind, and present it as if it were legitimately yours.

How it gets fixed

A cryptographic value the server trusted turned out to be predictable or forgeable, so a crafted one was accepted as authentic. That authenticity was all that stood between you and the flag. The fix is a keyed, verified primitive with a properly random, secret key.

Practise it

Every lab in the Cryptographic weakness category drills exactly this. Start at Apprentice and work up.

Practise it

PractitionerCryptographic weakness

A password-reset token you can predict

Break the guarantee a weak or misused primitive was meant to give.

25 pts · 45 minStart →
PractitionerCryptographic weakness

An ECB-mode image that leaks its shape

Break the guarantee a weak or misused primitive was meant to give.

25 pts · 45 minStart →
ExpertCryptographic weakness

The JWT signed with a guessable secret

Break the guarantee a weak or misused primitive was meant to give.

50 pts · 90 minStart →
ExpertCryptographic weakness

Swapping a JWT to the 'none' algorithm

Break the guarantee a weak or misused primitive was meant to give.

50 pts · 90 minStart →
ExpertCryptographic weakness

A length-extension against a naive MAC

Break the guarantee a weak or misused primitive was meant to give.

50 pts · 90 minStart →
MasterCryptographic weakness

A padding oracle that reads the ciphertext

Break the guarantee a weak or misused primitive was meant to give.

100 pts · 180 minStart →