karapto
Posted on April 25, 2021
Description
Cryptography can be easy, do you know what ROT13 is?
cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_hyLicInt}
Solution
ROT13 is a method of encrypting textual information, in which all the letters of the alphabet are shifted by 13.
In ROT13, the 26 letters of the alphabet are shifted by exactly half to make the text unreadable while preserving the meaning of the string. If the string converted by ROT13 is run through ROT13 again, the string will return to its original state.
Let's use the nkf command to solve the problem in one-liner.
$ echo "cvpbPGS{arkg_gvzr_V'yy_gel_2_ebhaqf_bs_ebg13_hyLicInt}" | nkf -r
This gives us the following flags.
picoCTF{next_time_I'll_try_2_rounds_of_rot13_ulYvpVag}
nkf stands for "Network Kanji Filter," and is a command for converting character codes and newline codes, which can be a problem when exchanging text data between different operating systems, such as Linux and Windows [1].
The option "-r" means the decryption process by ROT13, which can be decoded by ROT13 just by adding it to nkf.
Conclusion
In this article, I solved the cipher of ROT13 by nkf. In fact, if you want to determine ROT13 without any hint from the problem text, you can check it with a frequency analysis[2]. Here is the reference.
Reference
[1] "nkf(1) - Linux man page",https://linux.die.net/man/1/nkf
[2] Andress, Jason. The basics of information security: understanding the fundamentals of InfoSec in theory and practice. Syngress, 2014.
Posted on April 25, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.