A modern, user-friendly tool for hiding secret messages inside images using LSB Steganography.
Features β’ Installation β’ Usage β’ How It Works β’ Screenshots
Steganography is the practice of hiding secret information within ordinary, non-secret data or a physical object to avoid detection. Unlike encryption, which makes data unreadable, steganography hides the very existence of the secret message.
The word comes from the Greek words:
- Steganos = "covered" or "hidden"
- Graphein = "writing"
Steganography has been used throughout history:
- Ancient Greece: Messages were tattooed on shaved heads of slaves, then hidden under regrown hair
- World War II: Invisible ink and microdots were used to pass secret messages
- Modern Day: Digital steganography hides data in images, audio files, and video
This tool uses LSB (Least Significant Bit) steganography, which works by:
- Converting the secret message to binary (1s and 0s)
- Replacing the least significant bit of each color channel (R, G, B) in image pixels
- Since changing the LSB only alters the color value by 1 (out of 256), the change is imperceptible to the human eye
Original pixel: R=156, G=200, B=100
Binary: R=10011100, G=11001000, B=01100100
^ ^ ^
LSB LSB LSB
After hiding '101':
Binary: R=10011101, G=11001000, B=01100101
New pixel: R=157, G=200, B=101
The difference between RGB(156, 200, 100) and RGB(157, 200, 101) is invisible to the naked eye!
- π Modern Dark Mode GUI - Beautiful interface using CustomTkinter
- π Hide Messages - Encode secret text into PNG images
- π Reveal Messages - Extract hidden messages from encoded images
- π Easy File Selection - Browse and select images with a simple dialog
- β Input Validation - Clear error messages for invalid inputs
- πΎ Lossless Output - Saves encoded images as PNG to preserve data
- π¨ User-Friendly Design - Intuitive interface for both beginners and advanced users
- Python 3.8 or higher
- pip (Python package installer)
git clone https://github.com/Ilias1988/Steganography-Tool.git
cd Steganography-Toolpip install -r requirements.txtpython stego_tool.py- Launch the application by running
python stego_tool.py - Click "Browse" to select a PNG image (this will be your "carrier" image)
- Type your secret message in the text box
- Click "π Hide Data"
- Choose where to save the encoded image
- Done! Your message is now hidden inside the new image
- Launch the application
- Click "Browse" to select an encoded PNG image
- Click "π Reveal Data"
- The hidden message will appear in the text box
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β π Steganography Tool β
β Hide secret messages inside images β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β π Select Image: β
β ββββββββββββββββββββββββββββββββββ ββββββββββββ β
β β C:/images/photo.png β β Browse β β
β ββββββββββββββββββββββββββββββββββ ββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β βοΈ Secret Message: β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β β
β β Your secret message goes here... β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ββββββββββββββββ ββββββββββββββββ β
β β π Hide Data β β π Reveal β β
β ββββββββββββββββ ββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
Ready - Select an image to begin β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Steganography-Tool/
β
βββ stego_tool.py # Main application with GUI and steganography logic
βββ requirements.txt # Python dependencies
βββ README.md # This file
| Library | Version | Purpose |
|---|---|---|
| customtkinter | β₯5.2.0 | Modern GUI with dark mode |
| Pillow | β₯10.0.0 | Image manipulation |
- Input: PNG images (recommended for best results)
- Output: PNG format (lossless compression preserves hidden data)
β οΈ Important: Do not use JPEG or other lossy formats! Compression will destroy the hidden data.
The maximum message size depends on the image dimensions:
- Formula:
max_characters = (width Γ height Γ 3) / 8 - Example: A 1920Γ1080 image can hide approximately 777,600 characters
This tool is provided for educational and legitimate purposes only.
-
Educational Use: This tool is designed to demonstrate steganography concepts and techniques for learning purposes.
-
Authorized Use Only: Only use this tool on images you own or have explicit permission to modify.
-
No Illegal Activities: Do not use this tool for:
- Hiding illegal content
- Evading security measures
- Any malicious purposes
- Violating privacy laws
-
No Warranty: This software is provided "as is" without warranty of any kind. The authors are not responsible for any misuse or damage caused by this tool.
-
Compliance: Users are responsible for ensuring their use of this tool complies with all applicable local, state, national, and international laws.
- Be transparent about your use of steganography when appropriate
- Respect others' privacy and intellectual property
- Use this knowledge responsibly
Contributions are welcome! Feel free to:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Ilias
- GitHub: @Ilias1988
- CustomTkinter for the beautiful modern GUI library
- Pillow for excellent image processing capabilities
- The cybersecurity community for inspiring this educational project
β If you found this project useful, please consider giving it a star! β
Made with β€οΈ for the cybersecurity and Python community