Press "Enter" to skip to content

[VXCTF2017] One Native Pad


Given an python script and two images.




To xor two images. I found that one of the image are cry frog.

So, i found the original image in google.

Now is the time to study how the script do the encryption

Formula: encPixel = curPixel xor k

Now we have encPixel and curPixel. So we can recover K with this formula: k[index] = encPixel(x,y) ^ curPixel(x,y).

After execute this script i get two image.

It seems there are some wire pixel inside these two image. My idea is to use the original image compare with outimg1Solve.png to extract the only wire pixel. Then i can use the wire pixel to compare with outimg2Solve.png

compare result:


Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *