Using BMP Polyglots to get RCE

Competing with SLICES last weekend I helped win HITCON CTF. I spent a good chunk of the time during the event solving a fairly hard web challenge called IMGC0NV. I was the 3rd solve on it overall, and it had 5 solves total by the end of the CTF. The setup for the challenge was fairly simple. There&rsquo;s an app.py that runs a Flask server, an index.html , and a readflag.c that gets compiled into…