Typewriter

 Okay, this problem is called Typewriter. Right off the bat we can tell its some kind of substitution cipher, as the description contains what looks like a full flag expect the letters have been jumbled.

(A substitution cipher is when one character is substituted for another.)

Substitution ciphers are generally easy because they usually follow some sort of rule.  

 The actual first thing I did was try to have my browser solve it automatically, there are plenty of online solvers. I tried dcode.fr for example, but that resulted in nothing. (I didn’t take any screenshots) 

Well, I guess I actually have to put in some effort. Taking another look at the description, it said that he was pranked and his typewriter’s keys had been re-arranged. As in, some kind of key-layout. So all we have to do is find out what that key layout was and reverse it.

Lets take a look at what we do know:  

 We know that zpezy really should turn into tjctf. So whatever alphabet they are using to substitute the characters, z maps to t and p maps to j etc. 

For a more visual viewing of this keymap, I edited an image of a QWERTYIUOP keyboard.

 taking what we know from above, I drew arrows point to the ‘switched’ keys. T maps to Z and J maps to P, etc.

 However, at this point, I did not notice any pattern whatsoever and I shelved the problem for a day until a hint came out. Regrettably, I had to use the hint to solve the problem, but in my defense, it was a really big hint.

 The hint says that a becomes q, b becomes w, c becomes e, f becomes y, j becomes p, t becomes z, and z becomes m. Did I notice a pattern in my head? I didn’t. So I went back and mapped the keys on my little diagram.

 Wait a second, I notice something – QWE all have letters switching to them. Lets see what they are:

 What, the numbers that replace Q,W, and E, are A,B, and C??? what are the chances??

Well, not really. Its pretty easy to tell at this point. The keyboard mapping had been switched out of the QWERTYIUOP layout and into an alphabetic layout, ABCDEFGEHIJ layout. Not a bad prank.

 So know we know out substitution alphabet. Lets go slam it into the converter.

I open up Cyberchef (Cyberchef OP btw) and paste in the garbled flag. Then I search for substitute and double click it to add it to the recipe.  

Now, we have to craft the recipe just right or it won’t work. I removed alphabets and added in my new ones. I put removed the Uppercase alphabets (there are no uppercase letters in the flag, so cyberchef won’t pick them up) and replaced the ciphertext alphabet with a normal, lowercase alphabet.

 then I added the first row of a QWERTYUIOP keyboard into the Plaintext alphabet. Again, in lowercase)

 And instantly I see some of the letters start to change, for example, I see the zpezy{ turn into zjczf{.

Next, I added the middle row of the qwerty keyboard, and then the lower row of the keyboard into the plaintext alphabet.

And it looks like we have a flag. Some parts of it appear to still be garbled, but I submitted it and it worked.

Flag: tjctf{red_orange_purple_efgrirroiefe_pineapple_fruit_auhsdeuhfn}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s