A steganography toolkit that allows you to hide binary data inside image files (PNG and JPG). The toolkit provides Python utilities for embedding data into images and C code for extracting the hidden data.
- Clone this repository:
git clone https://github.com/ctrgrb/stegoldr.git
cd stegoldr- Install Python dependencies:
pip install -r requirements.txtEmbed data into an image:
python stego_utils.py embed <image_file> <data_file> [output_file]Extract data from an image:
python stego_utils.py extract <stego_image> [output_file]Verify data integrity:
python stego_utils.py verify <original_data> <stego_image># Embed a file into an image
python stego_utils.py embed examples/test.jpg examples/data.bin
# Extract data from a steganographic image
python stego_utils.py extract examples/test_hidden.png extracted_data.bin
# Verify that the extraction matches the original
python stego_utils.py verify examples/data.bin examples/test_hidden.pngFor extracting data in C applications:
- Include
stb_image.hin your project (download from stb repository) - Copy the code from
steganography_single_file.cinto your project - Update the following constants:
png_path: Path to your steganographic imageMAGIC_HEADER: Should match the header used during embedding (default: "X9K7Q2M8")
- Call
extract_steganography_data()to extract data into global variables
The extracted data will be available in:
Payload[]: Array containing the extracted dataPayload_size: Size of the extracted data
- Large data files will visibly alter the host image
- Only works with RGB images (automatically converts other formats)
- Requires lossless image format (PNG) for reliable extraction
- C extraction code is Windows-specific (uses Windows.h for MessageBox)