How to decode a partially visible or damaged QR Code: a CTF writeup for STACK the Flags 2020

Nyan Tun Zaw
8 min readDec 7, 2020
Photo credit: GovTech STACK the Flags 2020

I was participating in the STACK the Flags 2020 CTF by GovTech Singapore over the weekend and found that one of the challenges for the “Miscellaneous” category was particularly very interesting so decided to do a writeup for it since I have learnt so much during the challenge.

This is the first ever CTF writeup that I have written so apologies in advance if there are any mistakes and errors. I have tried to write it in a more elaborate way so that I can share my thought process and the things I have learnt along the way.

With this, let’s jump right into it!

The challenge was to decode the partially visible QR code provided below.

Prior to this competition, I had no knowledge at all on how QR codes work so i took this as an opportunity to learn about it.

Firstly, after analyzing the image provided, the text below was pretty easy to understand for anyone, which basically says “Note to self: Secret is in the QR code” so I knew that the flag will show up if I can figure out what’s in the QR code.

--

--

Nyan Tun Zaw

Loves writing and reading books. Cybersecurity and AIML enthusiast.