Link to challenge: http://hackvent.hacking-lab.com
Date Completed: 13 December 2015
... here it is, but will you be able to reveal it's secret?
The following image was also provided:
First I suspect the common least significant bit steganography technique has been used here where the least two or one significant bit(s) of the image have been changes so other images can be hidden without affecting the appearance of the first image by much.
I load up Matlab as it is fairly good for image processing and write a little script to gather the least significant bit of each RGB channel for every pixel (this is based off a script I wrote for HV14).
I end up with this code:
%Takes RGB image matrix and returns hidden day13 images
function res = day13(rgbimage)
%for each pixel in image
for i=1: size(rgbimage, 1),
%Get RGB values of least significant bit
R = bitand(rgbimage(i,j,1), 1);
G = bitand(rgbimage(i,j,2), 1);
B = bitand(rgbimage(i,j,3), 1);
%Calculate new pixels for image
res(i,j) = R + G + B;
%Show image in grayscale
Now, I added the RGB channels least significant bits together and observe the image that is produced.
I can read the text on the image but its clear that each RGB channel contains something different. I run the script three more times and change res(i,j) = R + G + B to res(i,j) = R then res(i,j) = G and finally res(i,j) = B
After this I get three clear images:
This is a message telling us that we should look elsewhere. Nothing special but a sweet Mario reference!
This one is interesting, its telling us to look at XKCD comic number #26 which is available here.
Seems interesting and important.
This image also seems important. I try to convert all the bits within to ASCII but no luck. I scan the image for QR codes and barcodes and do fine some UPC_E barcodes but they just happened to be created by coincidence.
Putting it all together
Finally, I think about the XKCD comic and discover (through research) that you can hide images within images using a Fourier transform. I try to do this within Photoshop but my plugin was not compatible or perhaps it was corrupt. Gimp should have a FFT filter but I did not have access to linux at the time. So I found an online tool that performs Fourier transformations to images (link).
I use the online tool on the original Christmas ball image (because the excess amounts of green blobs in the center of the image make it the primary candidate) and get this result:
A secret message is found which says: f0uRier-ru1ez
We put this in the ball-o-matic and get it gives us the ball which we scan to get our flag!