PicoCTF Writeup – waves over lambda
# Information:
CTF Name: PicoCTF
CTF Challenge: waves over lambda
Challenge Category: Cryptography
Challenge Points: 300
picoCTF 2019
# Used Tools:
- Guballa.de
- netcat
# Challenge Description:
We made a lot of substitutions to encrypt this. Can you decrypt it? Connect with
nc jupiter.challenges.picoctf.org 39894
Hints: Flag is not in the usual flag format
# Writeup
Hello, and welcome to another picoCTF challenge writeup. First I ran the command provided in the description:
mregra on Cyber:VM $ nc jupiter.challenges.picoctf.org 39894
Step 1
After running the command above I was presented with this output:
So we have a lot of weird stuff, it seems like text but with the letters swap in some way.
From my experience this seems to me like a Substitution cipher challenge.
Substitution cipher, what is it?
Encryption consists in hiding information in plain sight by changing the original text in some way and making the encrypted text unreadable.
Substitution cipher is a type of encryption. It works by having the letters in the original text replaced with different letters in a specific way.
One example is:
Plain text: Thank you for reading my work
Letters exchanging pattern:
abcdefghijklmnopqrstuvwxyz
zyxwvutsrqponmlkjihgfedcba
Cipher text: Gszmp blf uli ivzwrmt nb dlip
How to crack it!?
To crack this type of encryption you need to have the letters exchange pattern, otherwise it is a brute force attack in which you try every substitution possibility, which, in some cases could take to much time.
However, there is another possibility. If you have enough text, and also the encrypted text does not have any security like if it is not written in blocks of fixed size you can use frequency analysis of the cipher text to crack it.
Frequency analysis leverages the fact that in any given natural language certain letters and combinations of letters (words) occur more often then others. For example, the word “the” occurs relatively more often in English than the word “car”.
Continuing the challenge…
After some online search I was able to find a substitution cipher tool, that uses frequency analysis: https://www.guballa.de/substitution-solver
I copied the text above and inserted it into the tool:
And the flag is:
Thank you very much for reading!
Cheers,
MRegra