Here is our original picture. It is a picture of Emma Watson in an event. We are to extract the flag from this image.


Original Image

I checked for common anomalies in the picture but, couldn’t find any. No extra information in the metadata or the blob content of the image. Then I suspected if it is LSB steganography and checked for it too. But, there could be no meaningful data extracted from the LSB bits.

Then came in TinEye and Google’s reverse image search. I got my hands on the original image. Ran a diff between the original and given image to get the diff image as


You can see that the first row of pixels is completely red. There has been some kind of encoding done in the first row of pixels. Extracting the pixel data from the first row, showed something like this. This is a truncated output. It is in the format red-green-blue-alpha.

216 166 216 255
216 166 216 255
216 216 216 255
216 166 216 255
216 166 216 255
216 216 216 255
216 166 216 255
216 216 216 255
216 216 216 255
216 166 216 255
217 217 217 255

At first, it seemed that there was no pattern among the pixels (I figured that there must be repetition but, there were none). Then, I saw that some pixels had red, green, blue values the same while some others didn’t. Then, I wrote a simple script to mark it as 0 if the color values are equal and 1 if the values are not equal.

from PIL import Image

image ='the_bling_ring.png')

width, height = image.size

res = ''
results = []
for x in xrange(width):
    r, g, b, a = image.getpixel((x, 0))
    if r == g == b:
        res += '0'
        res += '1'
print res

Running the script, gave the output


Getting the ASCII characters from this binary string, gives us the flag