• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
iGuRu

iGuRu

Real-time Technology News. Opinions & Tweaks

  • / news
  • / tools
  • / tweaks
  • / dummies
  • / opinions
  • / support
  • / yourpost
home / tools / Steganographer: Hide files or data in images

Steganographer: Hide files or data in images

20/07/2020 09:41 by Anastasis Vasileiadis

This script hides files within images (currenlty PNG) and extracts the modified image to your disk.

crypto - Steganographer: Hide files or data in images

The maximum file size that can be hidden inside an image depends on the size of the image.

max_file_size = ( height_of_image * width_of_image * 6 / 8 ) bytes

"100k words.txt" is hidden in "original_image.png" called "image_with_100k words.png". Go and check if you can tell the difference between these two images. You can use this section to extract "100k words.txt" from "image_with_100k words.png".

Example of original image:

68747470733a2f2f692e6962622e636f2f6750677332595a2f6f726967696e616c2d696d6167652e706e67 - Steganographer: Απόκρυψη αρχείων ή δεδομένων σε εικόνες

Modified image

68747470733a2f2f692e6962622e636f2f4b35674d30314a2f696d6167652d776974682d3130306b2d776f7264732e706e67 - Steganographer: Απόκρυψη αρχείων ή δεδομένων σε εικόνες

This image has 100k words hidden inside!

How does it work;

It is based on a simple principle that if we change the LSB (Least Significant Bits) of each Pixel, then the change will not be significant and will not be observed with the naked eye.

So this section takes 2 bits of data from the file to hide and replaces the last 2 bits of one pixel with those 2 bits and then moves on to the next pixel.

The maximum change in pixels can be 4 units and the value range in PNG image (0,255), so this change is not significant.

In a PNG image, each pixel has 3 channels red, green and blue. (Some PNG images have 1 or 4 channels, but this program will convert them to 3 channels) A typical pixel in a PNG image looks like:

a_pixel = (17,32,11)     # (RED, GREEN, BLUE)

So we can save 3 times 2 bits per Pixel, which means 6 bits per pixel. This takes us to the upper limit of the file size, which can be hidden in an image:

max_file_size = ( height_of_image * width_of_image * 6 / 8 ) bytes

Let's understand it with an example. The data that will be hidden are:

binary_data = 0b100111

Let's take the first two bits and replace them with the RED Channel of our "a_pixel".

a_pixel = (0b10001, 0b100000, 0b1011)   # binary representation of a_pixel values
# Let's change a_pixel's RED Channel
# 0b10001 -> 0b10010  ( First 2 bits are 10 )
a_pixel = (0b10010, 0b100000, 0b1011)  # modified pixel

Let's take 2 bits from binary_data again to replace the last 2 bits of GREEN Channel with them.

a_pixel = (0b10010, 0b100000, 0b1011)
# Let's change a_pixel's GREEN Channel
# 0b100000 -> 0b100001  ( The 2 bits are 01 )
a_pixel = (0b10010, 0b100001, 0b1011)  # modified pixel

Let's do it again with the BLUE Channel and we're done.

a_pixel = (0b10010, 0b100001, 0b1011)
# Let's change a_pixel's BLUE Channel
# 0b1011 -> 0b1011  ( The 2 bits are 11 ) ; Notice that the value wasn't changed this time
a_pixel = (0b10010, 0b100001, 0b1011) # pixel wasn 't modified this time

So we have hidden a 6 bit message in one pixel. Let's look at the changes in the pixel

a_pixel             = (0b10001, 0b100000, 0b1011) = (17, 32, 11)
a_pixel_with_data   = (0b10010, 0b100001, 0b1011) = (18, 33, 11)

As we can see that the change is not even noticeable at the pixel level. The Module does this repeatedly until all our data is stored in the image.

steganographer 4 - Steganographer: Hide files or data in images

NOTE: The "noise" in the photo increases and if we use any photo editing software to compare it with the original image, then this image will have much more noise than the original image.

Steganographer: Hide files or data in images was last modified: 20 July, 2020, 9: 42 am by Anastasis Vasileiadis

spread the news

  • Facebook
  • Twitter
  • Reddit
  • Printing
  • Email

Read them Technology News from all over the world, with the validity of iGuRu.gr

Follow us on Google News


Competition: toolstag: digital steganography, Steganographer, segregation, digital signage

You May Also Like

GG-AESY hide files in images
Openstego: Application for sealing
iGuRu
OpenPuff Free Professional Encryption

About Us Anastasis Vasileiadis

Translations are like women. When they are beautiful they are not faithful and when they are faithful they are not beautiful.

Previous Post: « Twitter deleted Trump's copyright video
Next Post: Tsunami: A network security scanner »

Reader Interactions

Comments
  1. Stavros

    24/07/2020 13:07

    Very smart way to put messages in pictures !!!

    Απάντηση

Comment Policy:

IGuRu.gr does not publish the comments immediately. Malicious comments, comments that include ads, or comments that are offensive are deleted without notice. We do not adopt the opinions expressed by our readers.
Your comments will be displayed after approval by the administrators


Leave your comment
Ακύρωση απάντησης

Your email address is not published. Τα υποχρεωτικά πεδία σημειώνονται με *

 

 © 2021 · iGuRu.gr · ☢ · Keep It Simple Stupid Genesis theme

about  ·   get in touch  ·  rss  ·  sitemap  ·  cough

loading Cancel
Could not post post - check your email address!
Email verification failed, please try again
Your blog can not post posts via email.