In this challenge we get the flag from our friend, but it looks like they mistyped it…
Solution
If we take a closer look at the chat log, we notice that our friend was quite preoccupied while responding to our messages. We know that they mistyped the flag, but given that this is a CTF challenge, it’s likely that the keyboard was used to encode the flag under the guise of our friend making a mistake.
One such cipher that makes use of standard keyboard layouts is the “Keyboard Shift Cipher”. Essentially, one can take a standard keyboard layout, type a message out, then shift all letters in a specified direction. For example, if we were to encode MetaCTF
by shifting it to the right based on the QWERTY keyboard layout, the resulting message would be <rysVYG
.
We can confirm our suspicions by submitting the ciphertext for analysis against dCode’s Cipher Identifier. Sure enough, the cipher identifier suggests that we investigate the Keyboard Shift Cipher. The tool features an automatic decoding feature, so we can submit our message and attempt to decode it. Luckily, the first result gives us what we’re looking for:
The flag is MetaCTF{5hift3d_k3yb0ard_d3c1ph3r1ng}