openssl enc quick reference for CTF crypto (symmetric decrypt with salted passwords).
How it works
openssl enc -d -aes-256-cbc -pbkdf2 -iter 100000 -md sha256 -pass pass:PW -in in.enc -out out.- Files with a
Salted__header areopenssl encoutput (8-byte salt follows the magic). - Older output uses
EVP_BytesToKey; if-pbkdf2fails, drop it. - Always specify the cipher —
openssl enc -dwith no cipher copies bytes through unchanged (silent no-op). - Verify success with a magic-byte check (
1f 8bfor gzip).
Detection & defence
- Brute-force cipher/digest/iteration combinations and test with file magic, not by eye.
- Confirm output with
file/cmp, not just ‘no error’.

