Socket
Book a DemoInstallSign in
Socket

shadowbits

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shadowbits

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

pipPyPI
Version
1.0.1
Maintainers
1

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

  • Key-based Randomization: Uses PRNG seeded with your secret key to randomize bit placement
  • Automatic AES Encryption: All data is encrypted using AES-EAX mode with SHA-256 key derivation
  • Data Integrity Markers: Uses start/end markers to ensure data completeness
  • Format Validation: Verifies PNG/WAV file formats before processing
  • 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

Keywords

steganography

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts