Description
Can you get the real meaning from this file. Download the file here.
Setup
Download the enc_flag file from the challenge artifacts.
Work locally; no remote service is needed once you have the blob.
wget https://artifacts.picoctf.net/c_titan/3/enc_flag && \
cat enc_flagSolution
- Step 1Read the initial Base64cat enc_flag prints a long Base64 string ending in ==. Decode it once to reveal a Python byte literal (b'...').
cat enc_flag | base64 -dLearn more
Base64 is an encoding scheme - not encryption. It converts arbitrary binary data into a safe printable-ASCII string using 64 characters (A–Z, a–z, 0–9, +, /). Every 3 bytes of input become 4 Base64 characters, which is why Base64-encoded data is always about 33% larger than the original.
The
==at the end is padding. Base64 works in 3-byte groups; if the input isn't a multiple of 3 bytes, one or two=characters are appended as placeholders so the length is always a multiple of 4.Base64 is everywhere: email attachments (MIME), embedding images in CSS (
data:image/png;base64,...), JWTs (the header and payload are Base64URL-encoded), and passing binary data through systems that only handle text. Seeing a string that ends in==or is unusually long and uses only alphanumeric characters is a strong hint to try Base64 decoding it. - Step 2Strip quotes and decode againRemove the leading b' and trailing ' (cut -d "'" -f2 works nicely), then Base64-decode the inner string to obtain a Caesar-shifted message.
cat enc_flag | base64 -d | cut -d "'" -f2 | base64 -dLearn more
The
b'...'wrapper is Python's syntax for a bytes literal. When Python prints a bytes object it adds this prefix so you can tell it apart from a regular string. It's not part of the data - it's just how Python represents it in text form.cut -d "'" -f2splits on the single-quote character and takes the second field - neatly extracting just the inner Base64 content. Layering encodings like this (Base64 of Base64, or Base64 of Caesar, etc.) is a common CTF pattern to slow you down while still being technically "reversible without a key."The key insight: encoding is not encryption.No secret key is involved - anyone who recognizes the encoding can reverse it. Real encryption (AES, RSA) requires a key you don't have. Encoding is purely a format transformation.
- Step 3Apply ROT13 / CaesarThe result resembles a flag but with letters rotated. Run it through caesar (from bsdgames) or CyberChef's ROT13 to finish the decode.
cat enc_flag | base64 -d | cut -d "'" -f2 | base64 -d | caesarIf caesar isn't installed, use CyberChef's ROT13 recipe instead.Learn more
A Caesar ciphershifts each letter by a fixed number of positions in the alphabet. ROT13 is a Caesar cipher with a shift of 13 - it's its own inverse (applying it twice gives you back the original), which made it popular for hiding spoilers in early internet forums.
Caesar ciphers are trivially breakable because there are only 25 possible shifts. Frequency analysis (counting how often each letter appears and comparing to expected English frequencies) can crack it in seconds. The most common letter in English is E - if you see X appearing most often in ciphertext, the shift is probably X − E = 19.
Historically, Julius Caesar reportedly used a shift of 3. The cipher was reasonably secure in an era when most people were illiterate, but provides zero real security today. It's the ancestor of the Vigenère cipher (a repeating-key Caesar), which itself was cracked in the 1800s using the Kasiski test.
Alternate Solution
Handle each layer without the terminal: use the Base64 Decoder to peel both Base64 layers, then paste the result into the ROT / Caesar Cipher tool and click Try all 26 shifts to brute-force the Caesar offset and reveal the flag in seconds.
Flag
picoCTF{caesar_d3cr9pt3d_b20...}
Two Base64 layers plus a Caesar shift are all that stand between you and the flag.