28 lines
1.3 KiB
Markdown
28 lines
1.3 KiB
Markdown
|
#Stenography
|
||
|
|
||
|
This challenge uses Stenography to hide an image inside another image.
|
||
|
The principle behind is quite simple and the technique used here is known as LSB Stenography or "Least Significant Bit" stenography.
|
||
|
when working with images, each pixel holds an RGB or RGBA value. The least significant bit of each R G or B value changes the color to its immediate neighbor out of a range of 255. The image can later be constructed, however with a loss of data since we can only recover the MSB (Most significant bit)
|
||
|
|
||
|
This script has been written rapidely and only works for images that have the same since.
|
||
|
|
||
|
assume the following 2 pictures.
|
||
|
|
||
|
A christmass cards seems innocent enough that no one will expect something to be hidden there
|
||
|
|
||
|
![Christmass.png](Christmass.png "Christmass card")
|
||
|
|
||
|
and were are going to hide Waldo REALLY well this time
|
||
|
|
||
|
|
||
|
![WaldoFlag.png](WaldoFlag.png "WaldoFlag")
|
||
|
|
||
|
This script will create the flag picture and looks like this
|
||
|
|
||
|
![Hidden.png](Hidden.png "Christmass card with flag embedded")
|
||
|
|
||
|
When we try to recover it again, the flag will have changed slightly because we are only saving and recovering the MSB but it is still readable.
|
||
|
|
||
|
The results after decryption looks as follow
|
||
|
|
||
|
![revert.png](revert.png "Recovered flag")
|