[DuCTF'23] Actually Proxed
Actually Proxed This post is a continuation of the previous proxed challenge. If you haven’t read the writeup for it, I strongly suggest reading up on it here before reading this post! Description Still cool haxxorz only!!! Except this time I added in a reverse proxy for extra security. Nginx and the standard library proxy are waaaayyy too slow (amateurs). So I wrote my own :D The source code can be downloaded here.
[DuCTF'23] Proxed
DuCTF'23: Proxed This challenge is solved by changing a specific HTTP header to a hardcoded value. If we look at the source code, we can see that the flag is returned when the variable ip matches 31.33.33.7. if ip != "31.33.33.7" { message := fmt.Sprintf("untrusted IP: %s", ip) http.Error(w, message, http.StatusForbidden) return } else { w.Write([]byte(os.Getenv("FLAG"))) } So where does this variable ip come from? If we look at the start of the function, we see the following lines of code.
[DuCTF'23] BlinkyBill
DUCTF'23: BlinkyBIll This was a morse code steganography challenge which had a challenge file of around 10s. The challenge file can be downloaded here. The Challenge The audio file was 10s long, with beeps of varying lengths. There were background noises in the audio too. The goal was to decrypt the hidden message within the audio file. Solution The beeps gave it away that it was morse code. I put the wav file into Audacity, a free audio software. The waveform of the audio file is shown below:
[DuCTF'23] Pyny
DUCTF'23: Pyny This reverse engineering challenge from DuCTF 2023 was rather intresting as it played around with encodings, which is not commonly (to me at least) changed. The Code #coding: punycode def _(): pass ('Correct!' if ('Enter the flag: ') == 'DUCTF{%s}' % _.____ else 'Wrong!')-gdd7dd23l3by980a4baunja1d4ukc3a3e39172b4sagce87ciajq2bi5atq4b9b3a3cy0gqa9019gtar0ck Explanation At first glance, the seemingly random characters at the end seem to be invalid Python code. However, if we look at the comment at the top, it states that it some sort of encoding called punycode.
[GreyCTF'23] CrashPython
GreyCTF'23: CrashPython This was a pretty simple python challenge that makes use of a segmentation fault (segfault). A segfault occurs when a program tries to access a memory location that it is not allowed to access. The Challenge Explanation The main gist of this challenge was that there was a placeholder to input python code to run to cause a crash (through segmentation fault), but the code had to fulfil the requirements of the blacklist. The blacklist included keywords that couldn’t be used in the code.