Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Educational LSB steganography tool for understanding basic data hiding techniques.

Notifications You must be signed in to change notification settings

Ilias1988/Steganography-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Steganography Tool

Python License Platform

A modern, user-friendly tool for hiding secret messages inside images using LSB Steganography.

Features β€’ Installation β€’ Usage β€’ How It Works β€’ Screenshots


πŸ“– What is Steganography?

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"

Historical Context

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

LSB Steganography

This tool uses LSB (Least Significant Bit) steganography, which works by:

  1. Converting the secret message to binary (1s and 0s)
  2. Replacing the least significant bit of each color channel (R, G, B) in image pixels
  3. 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!


✨ Features

  • πŸŒ™ 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

πŸ› οΈ Installation

Prerequisites

  • Python 3.8 or higher
  • pip (Python package installer)

Step 1: Clone the Repository

git clone https://github.com/Ilias1988/Steganography-Tool.git
cd Steganography-Tool

Step 2: Install Dependencies

pip install -r requirements.txt

Step 3: Run the Application

python stego_tool.py

πŸš€ Usage

Hiding a Message

  1. Launch the application by running python stego_tool.py
  2. Click "Browse" to select a PNG image (this will be your "carrier" image)
  3. Type your secret message in the text box
  4. Click "πŸ”’ Hide Data"
  5. Choose where to save the encoded image
  6. Done! Your message is now hidden inside the new image

Revealing a Message

  1. Launch the application
  2. Click "Browse" to select an encoded PNG image
  3. Click "πŸ”“ Reveal Data"
  4. The hidden message will appear in the text box

πŸ“Έ Screenshots

Main Interface

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚           πŸ” 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                β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Project Structure

Steganography-Tool/
β”‚
β”œβ”€β”€ stego_tool.py       # Main application with GUI and steganography logic
β”œβ”€β”€ requirements.txt    # Python dependencies
└── README.md          # This file

πŸ”§ Technical Details

Dependencies

Library Version Purpose
customtkinter β‰₯5.2.0 Modern GUI with dark mode
Pillow β‰₯10.0.0 Image manipulation

Supported Formats

  • 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.

Capacity

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

⚠️ Disclaimer

This tool is provided for educational and legitimate purposes only.

Legal Notice

  1. Educational Use: This tool is designed to demonstrate steganography concepts and techniques for learning purposes.

  2. Authorized Use Only: Only use this tool on images you own or have explicit permission to modify.

  3. No Illegal Activities: Do not use this tool for:

    • Hiding illegal content
    • Evading security measures
    • Any malicious purposes
    • Violating privacy laws
  4. 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.

  5. Compliance: Users are responsible for ensuring their use of this tool complies with all applicable local, state, national, and international laws.

Ethical Considerations

  • Be transparent about your use of steganography when appropriate
  • Respect others' privacy and intellectual property
  • Use this knowledge responsibly

🀝 Contributing

Contributions are welcome! Feel free to:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ‘€ Author

Ilias


πŸ™ Acknowledgments

  • 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

Releases

No releases published

Packages

No packages published

Languages