SecurinetsCTF 2019 - RSA/Encoding Error Writeup
RSA/Encoding Error (1000 pts., 6 solves)
We’re given a zip file in which we can find a png image. The image looks like a QR code but the dimensions are Hint: every information counts
. Running binwalk -e ctf_image.png
we can find a file named output.txt
. Looking into the file we can see that every line is formed by sequences of 0 and 1 and every 5 bits there is a dot. Using the title we recognize this as an error correction code, so, basically, every sequence of 5 bits represents a single bit: to prevent errors the same bit is transmitted 5 times, so if in the sequence there are more 1s than 0s the bit was most likely a 1 and viceversa.
Now we look to the other part of the title: RSA. Looking with hexeditor the QR we can find a comment that says
1 | from Crypto.Util.number import inverse, long_to_bytes |
And so we obtain the flag: Securinets{xJbht0oWpsOa1e3WnXo9FDnUj3VZpZsuxMPVlYEN}