Skip to content

Latest commit

 

History

History
123 lines (100 loc) · 7.02 KB

README.md

File metadata and controls

123 lines (100 loc) · 7.02 KB

Corium

Corium is an image steganography utility which can hide files inside images.

Installation

download self-contained specific platform executable from releases.

if you have docker you can try the app directly without installing anything:

docker run -it --rm -v $(pwd):/app eboubaker/corium --help

!> on windows cmd change $(pwd) to %cd%.
!> images and files to be used must be on the terminal working directory to be visible by the container.

Usage

Usage:
  Corium [options] [command]

Options:
  -v, --verbose   Turn on verbose mode which will show more debug information.. [default: False]
  -s, --silent    Turn on silent mode (no messages will appear on the console, if return code was 0 then operation was
                  successful).. [default: False]
  --version       Show version information
  -?, -h, --help  Show help and usage information

Commands:
  hide     Hide files inside images
  extract  Extract hidden files from previously processed images

Hide command

hide
  Hide files inside images

Usage:
  Corium [options] hide

Options:
  -i, --images <images> (REQUIRED)  The path(s) to the image(s) or directory(s) containing images that is to be used by
                                    Corium for hiding files.
  -d, --data <data> (REQUIRED)      The path to the file(s) or directory(s) that is to be hidden inside the images.
  -o, --output <output>             The name or the path of the output directory(processed image collections will be
                                    dropped in this output directory). [default: processed]
  -a, --alpha                       Use alpha channels in the output images (increases image capacity). [default: False]
  -b, --bits <bits>                 Set how many bits to be used (1-8) from every pixel channel default 3. [default: 3]
  -c, --collection <collection>     Set the collection number of the output images. [default: <Auto-Generated>]
  -n, --no-sub-directory            by default processed images will be placed in a folder whose name is the collection
                                    name of the imagesenabling this option will disable this feature and all images
                                    will be put in the same output directory. [default: False]
  -v, --verbose                     Turn on verbose mode which will show more debug information.. [default: False]
  -s, --silent                      Turn on silent mode (no messages will appear on the console, if return code was 0
                                    then operation was successful).. [default: False]
  -?, -h, --help                    Show help and usage information

Extract command

extract
  Extract hidden files from previously processed images

Usage:
  Corium [options] extract

Options:
  -i, --images <images> (REQUIRED)  The path(s) to the image(s) or directory(s) containing images that is to be used by
                                    Corium to extract files.
  -c, --collection <collection>     Set the target collection number to be extracted from the input images if the
                                    images contains more than one collection,
                                    this will cause Corium to only extract from the specified collection if it was found
                                    if no collection number was specified corium will extract all found collections
  -o, --output <output>             The name or the path of the output directory(extracted files will be dropped in
                                    this directory). [default: extracted]
  -b, --bits <bits>                 Set how many bits to be used (1-8) from every pixel channel default 3, (must be
                                    same as when data was hidden inside images otherwise extraction will fail).
                                    [default: 3]
  -a, --alpha                       Use alpha channels in the input images (set to true if images were
                                    used by corium with alpha option set to true when hiding files). [default: False]
  -ncd, --no-collection-directory   by default extracted files will be placed in a folder whose name is the collection
                                    name of the imagesenabling this option will disable this feature and all collection
                                    files will be put in the same output directory. [default: False]
  -v, --verbose                     Turn on verbose mode which will show more debug information.. [default: False]
  -s, --silent                      Turn on silent mode (no messages will appear on the console, if return code was 0
                                    then operation was successful).. [default: False]
  -?, -h, --help                    Show help and usage information

Example

The source code of this project is hidden inside the image source-code.jpg. source-code

Download this image and extract the files with corium.

wget -O source-code.jpg https://raw.githubusercontent.com/Eboubaker/Corium/main/source-code.jpg
corium --verbose extract --images source-code.jpg

How does it work.

Corium will take the bits of the file and insert them to the image's pixel channels by default 3 bits per channel.
For example lets say the data we want to hide is 1 byte and represented as:
1001 0111
and lets say the original image is 1 pixel its color is rgb(252, 186, 3) #fcba03#fcba03 so it has 3 channels, each channel is represnted as 1 byte and we would have 3 bytes:
1111 1100 1011 1010 0000 0011
By default corium will use 3 bits per channel this can be changed with --bits option.
Now when we want to insert the previous data we will drop 3 bits from each channel and replace them with our data.

so from our example we will take the data from left-to-right and put them in the channels the final result will be:
1111 1100 1011 1101 0000 0110 and the new pixel color will be rgb(252, 189, 6) #fcbd06#fcbd06 when extracting corium will take the last 3 bits of each channel and construct the byte from them. 100 101 11.
corium knows the size of the data so it will not include the last bit. this is done by appending metadata to the file bytes before inserting.
here are the two colors next to each other #fcba03 #fcbd06 as you can see the change is very hard to see by the human eye especially when it is a full image

The Name

The program is named after the skin layer Corium which is the middle layer in the skin. Which means to hide something between layers. like how this program works.