12 releases
0.4.6 | Feb 7, 2024 |
---|---|
0.4.5 | Feb 7, 2024 |
0.4.4 | Sep 11, 2022 |
0.4.2 | Jul 6, 2022 |
0.2.4 | Jun 9, 2022 |
#409 in Images
7MB
1K
SLoC
Stegosaurust
A simple image steganography tool, written in rust.
Disclaimer
⚠️ This is a program I made for fun. There is no guarantee of cryptographic security or data confidentiality. Please do not use this for sensitive information. If you do, you are doing so at your own risk. ⚠️
Introduction
Easily encode messages in images:
echo "text to hide" | stegosaurust enc --output encoded_image.png image.png
stegosaurust enc --decode encoded_image.png
See the examples below for more usage.
Usage
🦕 stegosaurust 0.4.6
Hide text in images, using rust.
USAGE:
stegosaurust <SUBCOMMAND>
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
SUBCOMMANDS:
disguise mask all files in a directory using steganography [aliases: dsg]
encode encode files using steganography [aliases: enc]
help Prints this message or the help of the given subcommand(s)
Features
Encoding supports a variety of options that effect how the data is encoded, including:
- compression
- base64 encoding
- encryption using AES-256-CBC, requires
key
to be supplied - bit distribution - how to distribute encoded bits throughout the image used for encoding
sequential
- encode the data pixel by pixel starting from the top leftlinear
- encode the data into pixels evenly spread out from the start to the end of all pixels
- bit encoding methods:
- least significant bit (
lsb
) - always encode the bit of data in the least significant bit of each colour value of each pixel - random significant bit (
rsb
) - randomly encode each bit of data into one the leastn
significant bits of each colour value of each pixel. Choose how largen
can be (1-4) (least significant to fourth least significant) and supply aseed
which is used to determine the bit to encode into
- least significant bit (
Installation
From crates.io
cargo install stegosaurust
From Source
Build and install the executable from the source code.
git clone https://github.com/jj-style/stegosaurust.git
cd stegosaurust
cargo install --path .
# to uninstall :(
cargo uninstall stegosaurust
Docker
docker pull ghcr.io/jj-style/stegosaurust:master
docker run --rm -it -v $PWD:/data stegosaurust stegosaurust enc --decode /data/image.png
Examples
The examples below assume you have installed the program (see here) and are in the repository directory (if not installed use cargo run --
instead of stegosaurust
).
# how much data can we fit in an image...
stegosaurust enc --decode examples/example-2.png | mpv -
# is there something hidden in the logo on the README?
stegosaurust enc --decode .github/logo.png | xargs python -c "import webbrowser,sys; webbrowser.open(sys.argv[1])"
Dependencies
~19–39MB
~575K SLoC