Tokyo Western's CTF 2017 offered a neat simple cryptography challenge that was written in python. For the challenge, we are given the python source code that was used to encrypt, and the output of the encryption. The challenge is to determine what the original input was that produced the output we're given. While the proper solution here is likely to actually understand and reverse the algorithm, I took this as an opportunity to enable my tool pySym to solve this challenge.

While this challenge was under the "Baby's First" section, I think it's a great teaching example of a basic heap exploitation technique. File


$ file beatmeonthedl
beatmeonthedl: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/, for GNU/Linux 2.6.24, not stripped

This years DEFCON CTF qualifiers featured a section called crackme. The idea behind the questions in this section was to find correct input to a prompted executable. The added challenge was that each challenge was actually a series of ~200 binaries. Your goal was to automate the cracking of one and be able to extend it to all the rest.


Magic was one of the easy ones, but it shows off the power of angr in finding good code paths.


$ file 4245f48054debd4d1a4cc0e5bd704705bff1440607443b8c6fc5c342d067e93e
4245f48054debd4d1a4cc0e5bd704705bff1440607443b8c6fc5c342d067e93e: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/, stripped

For this challenge, we were given a binary named "mute". The reason for this name becomes apparent in a minute.


$ file mute
mute: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/, for GNU/Linux 2.6.32, BuildID[sha1]=3c37c5241fad4af47c79288b1f0aea4b63418e86, not stripped


I find this challenge to be good for two reasons. First, the premise is interesting/novel. And second, this is an example of a challenge that can be simply stated and does not attempt to make itself harder through obfuscation of the vulnerability. I came up with my solution right as the contest was ending, so I do not have the flag nor did I run it against the server. However, this solution worked well for me and is interesting.