Skip to main content

camouflage-decryptor

PyPI - Version PyPI - Python Version


This is a tool to extract information from files that have been generated with camouflage.

Table of Contents

Installation

pip install camouflage-decryptor

Usage

This tool provides different tools for analyzing a file that has been generated with camouflage. This includes the following:

Command Line Help

For the tool and all its subcommands, help can be retrieved by calling the tool with the --help flag:

camouflage-decryptor --help

Metadata retrieval

To retrieve all the camouflage metadata from a prepared file the following command can be used:

camouflage-decryptor get-info camouflaged-file.jpg

The output will look similar to this one:

File Name Carrier:             normal_file.png
File Name Secret:              secret.txt
Size secret file:              4.00 B
File size unmodified carrier:  4.00 B
Camouflage Version:            v1.2.1
Password:                      very-secret-password

'Carrier' refers to the file that has been used to hide the secret file. 'Secret' refers to the file that has been hidden in the carrier file.

Password retrieval

To get the password only from a stego file:

camouflage-decryptor get-key my-stego-file.jpg

Secret file retrieval

To retrieve the secret file from a stego file and save it to a file (here: secret.txt):

camouflage-decryptor get-data my-stego-file.jpg > secret.txt

This solution only works on Linux and Mac OS X. On Windows, the following command can be used:

python -m camouflage-decryptor get-data my-stego-file.jpg | Out-File -Encoding utf8 secret.txt

Get unmodified carrier file

To get the unmodified carrier file from a stego file (-> remove the part added by camouflage) and save it to a file (here: carrier.png):

camouflage-decryptor get-original camouflaged-carrier.png > carrier.png

This solution only works on Linux and Mac OS X. On Windows, the following command can be used:

python -m camouflage-decryptor get-original camouflaged-carrier.png | Out-File -Encoding utf8 carrier.png

Advanced: Generate own static key file for larger files

The tool is able to decrypt files up to 10MB using an embedded key. For larger files up to 1GB a static key is downloaded to decrypt the file. For larger files or to avoid the download of the static key, a custom static key can be supplied.

A 1GB key can be downloaded from the releases for offline use: https://github.com/anjomro/camouflage-decryptor/releases/download/v0.3.0/STATIC_KEY_1GB

A larger key can be obtained using the following steps:

  • Setup a virtual machine using Windows XP
  • Download camouflage and install it on the virtual machine
    • Download camouflage from here: http://camouflage.unfiction.com/
    • Transfer the downloaded file to the virtual machine via the shared folder
    • Install camouflage on the virtual machine
  • Create a payload with the intended size
    • This can be done using the camouflage-decryptor tool:
    • camouflage-decryptor dev generate-test-payload 2GB > PAYLOAD_2GB.txt
    • This will create a file with the size of 2GB. Adapt the size to your needs.
  • Transfer the payload to the virtual machine
    • This can be done using the shared folder
  • Create a stego file using camouflage
    • Find a carrier file (a file to hide the payload in)
      • Ideally this file should be small to avoid unneccecary resource consumption
      • Any random file will do
      • If no file is at hand, just create a small text file
    • Right click on the generated payload file and select the Camouflage Option
    • Click Next
    • For the field Camouflage using select the previously selected carrier file
    • For the field Create This File select a sensible file name, e.g camouflaged_2GB.txt and remove the read only checkmark
    • You can leave the password field empty, but it also doesn't matter if you do set a password
  • Extract the static key from the file treated with Camouflage
    • Use the camouoflage-decryptor tool to extract the static key
    • camouflage-decryptor dev extract-static-key path/to/camouflaged_2GB.txt > save/path/STATIC_KEY_2GB
    • Adapt the paths to the location and the location you want to save the static key

Advanced: Use a custom static key to decrypt a file

If you want to use a custom static key to decrypt a file you can use it using the following syntax:

CAMOUFLAGE_DECRYPTOR_KEY=/path/to/static/key.bin camouflage-decryptor get-data my-stego-file.jpg > secret.txt

It is necessary to use an absolute path to the static key.

To avoid prefixing every command, you can also set the static key for your session:

export CAMOUFLAGE_DECRYPTOR_KEY=/path/to/static/key.bin

After setting the key location once, you can then use the tool as usual:

camouflage-decryptor get-data my-stego-file.jpg > secret.txt

Both methods work with all functionality that requires a static key.

To obtain a static key see the section above.

Usage on Windows

For all presented commands, you might need to use the following syntax to call the script, e.g. if on Windows:

python -m camouflage_decryptor get-key my-stego-image.jpg

License

camouflage-decryptor is distributed under the terms of the EUPL-1.2 license.

Metadata

Release files for camouflage-decryptor 0.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for camouflage-decryptor 0.3.4
File Size Uploaded Provenance Actions
camouflage_decryptor-0.3.4.tar.gz 32.9 MB Without provenance Details for camouflage_decryptor-0.3.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for camouflage-decryptor 0.3.4
File Interpreter ABI Platform Actions
camouflage_decryptor-0.3.4-py3-none-any.whl Python 3 none any Details for camouflage_decryptor-0.3.4-py3-none-any.whl

Total release size: 44.9 MB

Release files / camouflage_decryptor-0.3.4.tar.gz

Download URL camouflage_decryptor-0.3.4.tar.gz
Size 32.9 MB
Tags Source
SHA-256 checksum
How to use checksums
4889e21cbcccba72ddd63fca04da4226d6b6faf1c03b6bd980abf2050e557420
BLAKE2b-256 checksum
How to use checksums
c77d9e81d015fd13add78a970b9a59267ad818e1a7dd51dedd5d9ae36c965aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / camouflage_decryptor-0.3.4-py3-none-any.whl

Download URL camouflage_decryptor-0.3.4-py3-none-any.whl
Size 12.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b6740ce327b7aced3ced789d508850d8f0f69344ca6dd52a7663de176b44ede5
BLAKE2b-256 checksum
How to use checksums
e9eefe503c88a6da658a4bceb2c9527b7790818661b4bc97fd638ec2c2ecf47f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.4

Security for camouflage-decryptor 0.3.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page