This project is a steganography tool that allows you to hide messages in 24-bit BMP v3 images.
The program supports three different steganography methods:
- LSB1: Hides one bit of the message in the least significant bit of the image.
- LSB4: Hides four bits of the message in the least significant bits of the image.
- LSBI: Improvement of LSB1 method proposed by MOHAMMED ABDUL MAJEED & ROSSILAWATI SULAIMAN.
The program also supports encryption of the message before hiding it in the image. The following encryption algorithms are available:
- AES: Advanced Encryption Standard. Available key sizes are 128, 192 and 256 bits.
- 3DES: Triple Data Encryption Standard.
For the encryption, the following modes are available:
- ECB: Electronic Codebook Mode.
- CBC: Cipher Block Chaining Mode.
- OFB: Output Feedback Mode.
- CFB: Cipher Feedback Mode.
The program also supports the extraction of messages from images, allowing the user to decrypt the message if it was encrypted.
In both cases, the encryption is done using a password provided by the user. The password is used to generate the key for the encryption algorithm, using PBKDF2 with HMAC SHA-256, 0x00000000
as the salt.
To compile the program, you need to have the following binaries installed:
- Java 21
- Maven
To compile the program, run the following command:
mvn clean package
To run the program, use the following command:
./stegobmp <options>
The following options are available:
-embed
: Indicates that the program should embed a message in an image.-extract
: Indicates that the program should extract a message from an image.-in <file>
: Specifies the input file path to hide. Required for embedding mode.-p <file>
: Specifies the carrier image path. Required for both modes.-out <file>
: Specifies the output file path. Required for both modes.-steg <mode>
: Specifies the steganography method. Available options areLSB1
,LSB4
andLSBI
. Required for both modes.-pass <password>
: Specifies the password to use for key generation at encryption. If not present, the payload will not be encrypted.-a <algorithm>
: Specifies the encryption algorithm. Available options areAES_128
,AES_192
,AES_256
andDES_3
. If-pass
is present, defaults toAES_128
.-m <mode>
: Specifies the encryption mode. Available options areECB
,CBC
,OFB
andCFB
. If-pass
is present, defaults toCBC
.
This project was done in an academic environment, as part of the curriculum of Cryptography & Security from Instituto Tecnológico de Buenos Aires (ITBA)
The project was carried out by: