Skip to main content

Powerful steganography tool for hiding files in images and audio using LSB techniques

Project description

ShadowBits 🔒

A powerful steganography tool that allows you to hide files within images and audio files using LSB (Least Significant Bit) techniques. ShadowBits supports both embedding and extraction operations with optional AES encryption for enhanced security.

Features

  • Image Steganography: Hide files within PNG images using LSB manipulation
  • Audio Steganography: Embed files in WAV audio files
  • AES Encryption: Optional encryption layer for embedded data
  • Key-based Randomization: Uses secret keys to randomize bit placement for enhanced security
  • Automatic File Type Detection: Detects and preserves original file types during extraction
  • Format Validation: Validates PNG images and WAV audio files before processing
  • Collision Prevention: Automatically handles filename conflicts during output
  • Comprehensive Error Handling: Robust error handling for various failure scenarios

Quick Start

Prerequisites

pip install -r requirements.txt

Installation

pip install shadowbits

One-Line Installation

# System-wide (with sudo)
curl -sSL https://raw.githubusercontent.com/kaizoku73/ShadowBits/main/install.sh | sudo bash

# User installation (no sudo)
curl -sSL https://raw.githubusercontent.com/kaizoku73/ShadowBits/main/install.sh | bash

Uninstallation

# To uninstall Resono (no sudo):
curl -sSL https://raw.githubusercontent.com/kaizoku73/ShadowBits/main/uninstall.sh | bash

# To uninstall Resono (With sudo):
curl -sSL https://raw.githubusercontent.com/kaizoku73/ShadowBits/main/uninstall.sh | sudo bash

Usage

ShadowBits provides a command-line interface with four main operations:

Image Operations

Embed a file in an image

shadowbits img embed --in secret.txt --cover image.png --key mysecretkey

Extract from image

shadowbits img extract --stego stego_image.png --key mysecretkey

Audio Operations

Embed a file in audio

shadowbits aud embed --in secret.pdf --cover music.wav --key myaudiokey

Extract from audio

shadowbits aud extract --stego stego_audio.wav --key myaudiokey

How It Works

LSB Steganography

ShadowBits uses the Least Significant Bit (LSB) method to hide data:

  • Images: Modifies the least significant bit of RGB color channels in a randomized order
  • Audio: Modifies the least significant bit of audio sample data in a randomized pattern

What is LSB and how does it work?

For a detailed explanation on LSB steganography and how it works, check out this article: https://kaizoku.gitbook.io/steganography

Security Features

  1. Key-based Randomization: Uses PRNG seeded with your secret key to randomize bit placement
  2. Automatic AES Encryption: All data is encrypted using AES-EAX mode with SHA-256 key derivation
  3. Data Integrity Markers: Uses start/end markers to ensure data completeness
  4. Format Validation: Verifies PNG/WAV file formats before processing
  5. File Type Detection: Automatically detects original file type using magic bytes for proper restoration

Hidden Files

The tool can hide any file type and will automatically detect and restore the original format using magic byte signatures, including:

  • Images: JPG, PNG, GIF, BMP, WebP, ICO
  • Documents: PDF, DOC, ZIP archives
  • Audio: MP3, OGG, FLAC, WAV
  • Video: MP4, M4V, AVI
  • Archives: ZIP, GZ, RAR, 7Z
  • Text/Code: HTML, XML, Python, C, JavaScript, plain text
  • Binary files: Any other format as .bin

Limitations

  • Image capacity: Limited by image size (3 bits per pixel for RGB images)
  • Audio capacity: Limited by audio file length (1 bit per sample)
  • File size: To hide larger files, you need larger cover media file

Examples

Hide a document in a photo

shadowbits img embed --in document.pdf --cover vacation.jpg --key family2023

Extract the hidden document

shadowbits img extract --stego stego_file.png --key family2023

Hide source code in music

shadowbits aud embed --in source_code.zip --cover favorite_song.mp3 --key coding123

Security Considerations

  • Key Management: Use strong, unique keys for each operation
  • Key Security: The same key is used for both encryption and randomization
  • Cover Selection: Choose cover files with sufficient capacity for your payload
  • File Format: Ensure cover images are PNG and audio files are WAV
  • Key Reuse: Avoid reusing keys across different files

Error Handling

ShadowBits includes comprehensive error handling for:

  • Invalid file formats
  • Insufficient cover media capacity
  • Corrupted embedded data or invalid markers
  • AES Decryption failures (wrong key or corrupted data)
  • Missing files or permissions

Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

License

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

Disclaimer

This tool is for educational and legitimate purposes only. Users are responsible for ensuring compliance with applicable laws and regulations when using steganography techniques.

Support

If you encounter any issues or have questions, please open an issue on GitHub.


ShadowBits - Where your secrets hide in plain sight 👁️‍🗨️

Made by kaizoku

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shadowbits-1.0.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shadowbits-1.0.1-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file shadowbits-1.0.1.tar.gz.

File metadata

  • Download URL: shadowbits-1.0.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for shadowbits-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9aa2550ac1c529b26230fb74f88f6f0b43e2f6ba4978c4f7ef7e22795ca4e4b1
MD5 3d3add0dd5fd54b8c378ac8c85fb33da
BLAKE2b-256 b35d1740d532b5b9c7eaaea6d92a7cc1519cf07e6f026cd56655d92ef66b5e58

See more details on using hashes here.

File details

Details for the file shadowbits-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: shadowbits-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for shadowbits-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 99c335971e9e0514db7cbe519b6a255452fac1bfc19767e87c17f5199eb74106
MD5 d0afe5f9e6948c128d7eed04f51bcdc1
BLAKE2b-256 6d9520868fe171b4d9d409539e1e4f363c8204114abeacd9edab5342c9a593b4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page