Skip to content
Adam Omar Saleh

hiCTF 2026 placeholder badge (unofficial)hiCTF 2026Cryptography

Cipher Cascade

Four-layer reversible encoding

Competition
hiCTF 2026 placeholder badge (unofficial)hiCTF 2026
Category
CryptographyEasy · estimated
Analysis status
Flag extracted locally
Document
Original PDF

01Challenge analysis

The problem

The ciphertext was built from multiple basic encoding layers. The important step was to undo transformations in the opposite order from their application.

02Exploit or recovery path

How I solved it

  1. 01

    I recognized the first transformation as a reversal and reversed the provided text.

  2. 02

    I Base64-decoded the resulting string to recover the next intermediate representation.

  3. 03

    I hex-decoded the next layer into text.

  4. 04

    I applied ROT13 to the final string and obtained the flag.

03Code evidence

Reproduction

Solver / Reproduction
import base64import codecs​def unwind(ciphertext):    stage1 = ciphertext[::-1]    stage2 = base64.b64decode(stage1)    stage3 = bytes.fromhex(stage2.decode())    return codecs.decode(stage3.decode(), 'rot_13')​# print(unwind(original_ciphertext))

Result

RECOVERED FLAG

hiCTF{l4y3r_by_l4y3r_unw1nd}

Flag extracted locally

Local Verification
The extracted plaintext matched the expected hiCTF flag format; platform acceptance not recorded.

Original document

Original PDF

The writeup as I first documented it.