Link: https://backdoor.sdslabs.co/challenges/LOSSLESS
Author: Arpit Singla
Points: 100
Category: stegano

Description

d4rth used his dirty methods to hide a secret in a png file. He is cleverly trying to divert your focus from challenge, but the force is strong with you. Now extract the flag from these images, my young padawan.
original.png
encrypted.png

tl;dr

Subtract both images. LSB is changed by 1 in encrypted.png.

Solution

We have been given two images, seemingly identical:
original:
original
and encrypted:
encrypted

When compared with ImageMagick, by:
compare original.png encrypted.png difference.png an encrypted message can be spotted in the upper left corner.

difference

With a bit of work in GIMP we end up with the following image:

solution

The data is a 49×7 binary matrix, which looks like vertically written, binary encoded, ascii letters. The first one is a capital letter, as it begins with 10, while the others are lower case letters (begin with 11). Also we can see spaces ( 0100000).

Let’s decode the hidden message. We’ve rotated the image by 90 degrees counter-clockwise and exported it in BMP format. Then, treating the image body as a data hexdump, we’ve replaced all 00 00 00 with 1 and all ff ff ff with 0. Lastly, we’ve added leading zeros to every group of seven bits.

Utilitarian script (in python 2.7) to transform the data:

The decoded data is printable ASCII string, which happens to be the flag.


Leave a Reply