stegano-sec is a Python-based, offline steganography toolkit for security enthusiasts, CTF players, and researchers. It allows you to hide (encode) and extract (decode) text or files within various media typesβsuch as images (PNG, JPEG), audio (WAV), and plain text filesβwith no need for external APIs or internet access. The toolkit is designed to be modular, user-friendly, and easily extensible, making it ideal for both educational and practical infosec use.
π Version 3.0.0: Now with AES encryption, BMP support, and enhanced CLI!
- Encode and decode messages/files in:
- PNG, JPEG & BMP images (using LSB steganography)
- WAV audio files (LSB steganography)
- Plain text files (whitespace or zero-width character encoding)
- π AES Encryption: Optional password-based encryption for hidden messages
- Graphical User Interface (GUI) - Easy-to-use tkinter-based interface
- Command-line interface (CLI) for easy usage and scripting
- Modular codebase for adding new media formats or encoding techniques
- Offline & privacy-friendly: No data ever leaves your computer
- Modern Python: Full type hints, pathlib usage, and Python 3.8+ compatibility
- Developer-friendly: Comprehensive test suite, pre-commit hooks, and linting tools
- Pip installable: Can be installed as a proper Python package
git clone https://github.com/irfan-sec/stegano-sec.git
cd stegano-sec
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txtgit clone https://github.com/irfan-sec/stegano-sec.git
cd stegano-sec
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
pip install -r requirements-dev.txt # Optional: for development tools# Coming soon: pip install stegano-sec
pip install -e . # Install in development modeLaunch the user-friendly GUI:
python stegano_sec_gui.pyThe GUI provides three tabs:
- Encode: Hide messages in images, audio, or text files
- Decode: Extract hidden messages from files
- Capacity: Check how much data a file can hide
python stegano_sec.py encode -i input.png -o output.png -m "Secret message here"python stegano_sec.py encode -i input.png -o output.png -m "Secret message" -p mypasswordpython stegano_sec.py decode -i output.pngpython stegano_sec.py decode -i output.png -p mypasswordpython stegano_sec.py encode -i input.wav -o output.wav -f secret.txtSee all available commands and options:
python stegano_sec.py --helpstegano-sec/
βββ stegano_sec.py # CLI entry point
βββ stegano_sec_gui.py # GUI entry point
βββ stegano/
β βββ __init__.py
β βββ image.py # Image steganography functions
β βββ audio.py # Audio steganography functions
β βββ text.py # Text steganography functions
β βββ crypto.py # AES encryption/decryption
β βββ utils.py # Helper utilities
βββ requirements.txt
βββ README.md
βββ examples/
βββ sample.png
# Run basic test suite
python -m pytest tests/
# Run with verbose output
python -m pytest tests/ -v# Format code with Black
black stegano/ stegano_sec.py tests/
# Sort imports with isort
isort stegano/ stegano_sec.py tests/
# Lint with flake8
flake8 stegano/ stegano_sec.py tests/
# Type checking with mypy
mypy stegano/ stegano_sec.py# Install pre-commit hooks (optional)
pre-commit install
# Run all hooks manually
pre-commit run --all-files- π AES Encryption: Password-based encryption using
--passwordflag for both CLI and GUI - πΌοΈ BMP Support: Added BMP image format for steganography
- π Version Flag: Added
--version/-VCLI flag - π Crypto Module: New
stegano/crypto.pywith encrypt/decrypt/detect functions - π§ͺ Expanded Tests: 11 tests covering encryption, BMP support, and core functionality
- π¦ New Dependency:
cryptographylibrary for secure AES encryption
All existing functionality remains fully compatible!
This toolkit is for educational and research purposes. While v3.0.0 adds AES encryption for hidden messages, steganography alone does not provide strong security. The encryption feature adds a layer of protection, but do not rely solely on it for high-security scenarios in adversarial environments.
Pull requests, bug reports, and feature suggestions are welcome! Please open an issue or submit a PR.
MIT License
Developed by @irfan-sec
