LSB-Steganography: steganography files into images
LSB-Steganography
Python program based on stegonographical methods to hide files in images using the Least Significant Bit technique.
I used the most basic method which is the least significant bit. A color pixel is composed of red, green and blue, encoded on one byte. The idea is to store information in the first bit of every pixel’s RGB component. In the worst case, the decimal value is different by one which is not visible to the human eye. In practice, if you don’t have space to store all of your data in the first bit of every pixel you should start using the second bit, and so on. You have to keep in mind that the more your store data in an image, the more it can be detected.
Information
LSBSteg module is based on OpenCV to hide data in images. It uses the first bit of every pixel and every color of an image. The code is quite simple to understand; If every first bit has been used, the module starts using the second bit, so the larger the data, the more the image is altered. The program can hide all of the data if there is enough space in the image. The main functions are:
- encode_text: You provide a string and the program hides it
- encode_image: You provide an OpenCV image and the method iterates for every pixel in order to hide them. A good practice is to have a carrier 8 times bigger than the image to hide (so that each pixel will be put only in the first bit).
- encode_binary: You provide a binary file to hide; This method can obfuscate any kind of file.
Only images without compression are supported, namely not JPEG as LSB bits might get tampered during the compression phase.
Install
git clone https://github.com/RobinDavid/LSB-Steganography.git
cd LSB-Steganography
pip install -r requirements.txt
Use
Copyright © 2017, Robin David – MIT-Licensed
Source: https://github.com/RobinDavid/