rail-fence

Published: July 20, 2023Updated: December 9, 2025

Description

A message was encrypted with a rail fence cipher using 4 rails. Decode it and wrap the plaintext in picoCTF{...}.

Read the ciphertext from message.txt.

Use CyberChef or another rail fence decoder with key=4 to recover the plain text.

cat message.txt
# In CyberChef: Rail Fence Decode → Key 4 and paste the text

Solution

  1. Step 1Apply Rail Fence decoding
    The challenge states 4 rails, so plug the ciphertext into a rail-fence decoder with key 4. CyberChef’s Rail Fence (Decode) module works great.
  2. Step 2Wrap the flag
    The decoded sentence is already in the picoCTF format; copy it as-is.

Flag

picoCTF{WH3R3_D035_7H3_F3NC3_8361N_4ND_3ND_4A76...}

Rail fence is a simple transposition cipher; once you know the number of rails, decoding is straightforward.