Skip to content

Steganography CLI & Web tool for concealing files within PNG images.

License

Notifications You must be signed in to change notification settings

CleasbyCode/pdvrdt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pdvrdt

pdvrdt is a "steganography-like" utility for Linux and Windows. It consists of two CLI tools, pdvin, used for embedding a data file within a PNG cover image, and pdvout, used for extracting the hidden file from the cover image.

There is also a pdvrdt Web App, available to use, if you don't want to download and compile the CLI source code.
Web file uploads are limited to 20MB.

Demo Image
Image credit: @pixelbouncer / PIN: 7927377220012420213

Unlike the common steganography method of concealing data within the pixels of a cover image (LSB), pdvrdt hides files within various chunks of a PNG image, such as iCCP and IDAT. You can embed any file type up to 2GB, although compatible hosting sites (listed below) have their own much smaller size limits and *other requirements.

For increased storage capacity and better security, your embedded data file is compressed with zlib/deflate (if not already a compressed file type) and encrypted using the libsodium cryptographic library.

  • Flickr (200MB), ImgBB (32MB), PostImage (32MB), Reddit (19MB / -r option),
  • Mastodon (16MB / -m option), ImgPile (8MB), X/Twitter (5MB + *Dimension limits)
  • *PNG-32/24 (Truecolor) 68x68 Min. - 900x900 Max. | PNG-8 (Indexed-color) 68x68 Min. - 4096x4096 Max.

Usage (Linux - pdvin / pdvout)

user1@linuxbox:~/Downloads/pdvrdt-main/src/pdvin$ sudo apt-get install libsodium-dev
user1@linuxbox:~/Downloads/pdvrdt-main/src/pdvin$ g++ main.cpp -O2 -lz -lsodium -s -o pdvin
user1@linuxbox:~/Downloads/pdvrdt-main/src/pdvin$ sudo cp pdvin /usr/bin

user1@linuxbox:~/Desktop$ pdvin 

Usage: pdvin [-m|-r] <cover_image> <secret_file>  
       pdvin --info

user1@linuxbox:~/Desktop$ pdvin my_cover_image.png document.pdf
  
Saved "file-embedded" PNG image: prdt_17627.png (1245285 bytes).

Recovery PIN: [***3483965536165427463***]

Important: Keep your PIN safe, so that you can extract the hidden file.

Complete!

user1@linuxbox:~/Downloads/pdvrdt-main/src/pdvin$ g++ main.cpp -O2 -lz -lsodium -s -o pdvout
user1@linuxbox:~/Downloads/pdvrdt-main/src/pdvout$ sudo cp pdvout /usr/bin

user1@linuxbox:~/Desktop$ pdvout

Usage: pdvout <file_embedded_image>
       pdvout --info
        
user1@linuxbox:~/Desktop$ pdvout prdt_17627.png

PIN: *******************

Extracted hidden file: document.pdf (1016540 bytes).

Complete! Please check your file.

By default (no options selected), pdvin embeds your data file within the last IDAT chunk of the PNG image.
For Mastodon, the data file is stored within the compressed iCCP chunk of the PNG image.

To create "file-embedded" PNG images compatible for posting on Mastodon, use the -m option with pdvin.

pdvrdt_CLI_Mastodon.mp4
pdvrdt_web_app.mp4

To correctly download images from X/Twitter or Reddit, click the image in the post to fully expand it, before saving.

In addition to the 5MB image size limit, X/Twitter also has image dimension size limits, listed above.

pdvrdt_CLI_Twitter.mp4

To create "file-embedded" PNG images compatible for posting on Reddit, use the -r option with pdvin.
From the Reddit site, click "Create Post" then select "Images & Video" tab, to post your PNG image.

To correctly download an image from Flickr, click the download arrow near the bottom right-hand corner of the page and select Original for the size of image to download.

Third-Party Libraries

This project makes use of the following third-party libraries:

  • libsodium for cryptographic functions.
  • zlib: General-purpose compression library
    • License: zlib/libpng license (see LICENSE file)
    • Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler