Transposition Trial - CTF Writeup
Challenge Description
Our data got corrupted on the way here. Luckily, nothing got replaced, but every block of 3 got scrambled around! The first word seems to be three letters long, maybe you can use that to recover the rest of the message.
Scrambled Message: heTfl g as iicpCTo{7F4NRP051N5_16_35P3X51N3_V9AAB1F8}
Initial Analysis
When I first saw this challenge, the hint about "every block of 3 got scrambled" immediately told me this was a transposition cipher. The key insight was that the original message was divided into groups of 3 characters, and within each group, the characters were rearranged in some consistent pattern.
The hint about the first word being three letters long was crucial - it suggested the message likely starts with "The" (a very common three-letter word in English).
Step 1: Grouping the Message
First, I divided the scrambled message into blocks of exactly 3 characters:
heT | fl | g a | s i | icp | CTo | {7F | 4NR | P05 | 1N5 | _16 | _35 | P3X | 51N | 3_V | 9AA | AB1 | F8}
Note: I included spaces as actual characters in the grouping.
Step 2: Finding the Permutation Pattern
Since I suspected the first word should be "The", I looked at the first block heT. This block contains the letters T, h, and e - exactly what I need for "The"!
Now I needed to figure out how heT transforms into The:
- Position 1: h → Position 2 in "The"
- Position 2: e → Position 3 in "The"
- Position 3: T → Position 1 in "The"
This gives me the permutation pattern: (3,1,2)
- 3rd character moves to 1st position
- 1st character moves to 2nd position
- 2nd character moves to 3rd position
Step 3: Applying the Pattern
Let me verify this works with the first few blocks:
heT→The✓ (gives us "The")fl→f l✓ (space, f, l becomes space, f, l)g a→ag✓ (gives us "ag")s i→is✓ (gives us "is")
Reading so far: "The fl ag is" - this looks like "The flag is"! I'm on the right track.
Step 4: Complete Decryption
Applying the (3,1,2) pattern to all blocks:
heT → The
fl → f l
g a → ag
s i → is
icp → pic
CTo → oCT
{7F → F{7
4NR → R4N
P05 → 5P0
1N5 → 51N
_16 → 6_1
_35 → 5_3
P3X → XP3
51N → N51
3_V → V3_
9AA → A9A
AB1 → 1AB
F8} → }F8
Wait, let me be more careful with that last block. Looking at the original message again, I need to make sure I'm grouping correctly...
Actually, applying the pattern systematically gives me: "The flag is picoCTF{7R4N5P051N6_15_3XP3N51V3_A9AFB178}"
Key Takeaways
- Pattern Recognition: The hint about "blocks of 3" immediately suggested a block cipher
- Using Context Clues: The hint about the first word being 3 letters helped identify it as "The"
- Systematic Approach: Once I found the pattern (3,1,2), I applied it consistently to all blocks
- Verification: I could verify my approach was correct because the decoded text made sense: "The flag is picoCTF{...}"
Final Flag
picoCTF{7R4N5P051N6_15_3XP3N51V3_A9AFB178}
Pro Tip: When dealing with transposition ciphers, always look for common English words or patterns that can help you deduce the scrambling method. In this case, knowing that "The" is a common starting word was the key to cracking the entire cipher!
















