A Based Crypto Challenge - DuckCTF 2023

As hinted by the challenge title and description, this challenge is just some sort of base encoding. This is further confirmed by looking at the encoded data; 8990767883967987868C74768B8B90857A747A8678877981867C8B98 To determine the base, let us count the number of distinct symbols. 13! So this is likely to be base 13. There is of course a chance it was some other base where, by chance, the other symbols didn’t get used, but let us first try base 13....

August 4, 2023 · lachlan

Homebrewed Block Cipher - DuckCTF 2023

In this challenge, we are given an oracle that will encrypt our input with a constant key. We are also given a redacted version of the encrypting script. Reading through the script, we can see that data is encrypted by splitting the data into blocks of two characters, encrypting each block individually (with a redacted function), and then concatenating the output. Furthermore, by connecting to the oracle, we can see that each block gets encrypted to a fixed size of 40 characters....

August 4, 2023 · lachlan

Not So Standard Substitution Cipher - DuckCTF 2023

We are given a file with 10,000 lines, each of which is a new piece of data encrypted with a substitution cipher with a different key. One of these lines is the flag, and the rest are just random characters. To filter the rubbish out from the flag, we can use frequency analysis – as a substitution cipher will not change the frequency of characters. Ideally, we do not want to be comparing the character frequency distributions by hand....

August 4, 2023 · lachlan

Non-textual Troubles - UACTF 2022

It turns out that in Python 3, attempting to write non-ASCII characters to a file without using ‘binary mode’ (a mode which deals with ’non-textual data’, hence the name of the challenge) has some less-than-ideal results. Indeed, if you tried providing your plain text to xor.py you might have noticed that there are somehow more bytes in the cypher-text after XORing that you started with in your plaintext. Ultimately, it appears that the write....

August 7, 2022 · javad