Layers

WolvCTF 2026CryptoBeginnerBy .nerdsmithWriteup by @xabito

NjIgNjEgNzYgNjIgNjEgNjYgMmQgNzUgNmUgNjkgNzIgMmQgNzkgNmUgNmMgNzIgNjUgNjY=

Submit wctf{flag}.

Flag capture

The title warns us that the text needs more than one decoding pass.

The trailing = suggests Base64. Decoding once produces space-separated hexadecimal bytes:

62 61 76 62 61 66 2d 75 6e 69 72 2d 79 6e 6c 72 65 66

Hex decoding gives bavbaf-unir-ynlref, which ROT13 turns into onions-have-layers.

The following decoder performs all three steps with Python’s standard library:

import base64
import codecs

ciphertext = "NjIgNjEgNzYgNjIgNjEgNjYgMmQgNzUgNmUgNjkgNzIgMmQgNzkgNmUgNmMgNzIgNjUgNjY="

hex_text = base64.b64decode(ciphertext).decode("ascii")
rotated = bytes.fromhex(hex_text).decode("ascii")
message = codecs.decode(rotated, "rot_13")

print(f"wctf}")

Running it wraps the recovered phrase in the required format and prints the flag:

$ python3 solve.py
wctf{onions-have-layers}