Black Pigeon is a simple Python tool , responsible for hiding various types of data into PNG or JPEG after the EOI marker of the image file to ensure security and privacy.
It is a educational project to understand how EOI steganography works under the hood. For more robust security use LSB steganography. We are currently trying to implement more steganographic methods besides EOI.
Black Pigeon is my first ever github repository as well as a scripted journey to the world of cybersecurity without a formal degree in CS. As a high-school student(when I developed the script first) , I tried to document my journey. In a 4GB of RAM old laptop, I entered to the beautiful world of coding and it was my first public project in GitHub.
I know , it seems that Black Pigeon did not entirely follow industry standard best practices but eventually it is my personal project for learning. I hope one day Black Pigeon will be the gold standard and go to choice for security through obscurity with our community collaboration.
Any good advice , guideline and collaboration will be accepted to improve or extend the project.
If you want to contribute to Black Pigeon to improve it or add new features for enterprise grade security, please check the issues tab and begin to work with your choice. For personal inquiries and collaboration feel free to reach out via Email as I am not currently active in social-media.
To hide file(s) inside the given image, it typically compresses files to be hidden using popular LZMA algorithm to reduce size and create a temporary zip file. Besides it uses cryptographic algorithm to encrypt data during compression process.A popular symmetric cryptographic algorithm called Fernet is used along with a password protection mechanism for users. Then the ZIP file is appended after the EOI(End Of the Image) marker of the given image.
- JPEG/JPG
FFD9(HEX) - PNG
49454E44AE426082(HEX)
Modern image parsers don't read image files after the specific EOI marker. Therefore appending any information after EOI marker is a safer choice for hiding information.
- Huge information can be obscured
- It does not affect image quality
- Ommited by modern image parsers
- Social media platforms often exclude contents after EOI marker for security reason
- It is insecure compare to modern steganographic methods like LSB steganography
- It is easy to idenify
Make sure Python3 is installed on your system to use this tool.
This script was mostly developed using python standard library. Which come in-built with python. Besides some popular third-party libraries are used.
cryptography(Third-party)zipfilehashlibbase64ossyssubprocesstime
- PNG (.png)
- JPEG (.jpeg)
- ZIP (.zip)
- Compression
- Decompression
- Encryption
- Decryption
- Steganographic obscuration
- File Injection
- File extration
- Password Protection
git clone https://github.com/xenon-computing/black_pigeon.gitcd black_pigeonFor Windows :
pip install -r requirements.txtFor Linux/MacOS:
pip3 install -r requirements.txtFor Termux:
pkg install python-cryptographyIf you are using termux and try to get rid of heavy rust backend for cryptography module , use above command to install the module.
For Linux / Termux:
chmod +x main.py- Aggregate all files to be obscured in a clean and separate directory.
- Select a cover image file
(.png or .jpeg)and copy the path of that image. This image is the carrier of all hidden file(s) - Copy the path of the directory.
- run
main.pyand select an option mentioned on the menu in the console as your need. - To obscure the directory, select option 1 . Then enter necessary information required by the script and don't forget to set a password for better security .
- For extracting contents from an image where you have obscured info through Black Pigeon , Select correct option from the menu and enter the password key that you set earlier during the encryption process.
- provide an output path to save extracted information.
- All types of path mentioned earlier have to be absolute, not relative
- Don't try to hide larger file(s), if your system doesn't have enough RAM, as currently we are using RAM to load and process file(s) for obscuration.
- Use the tool at your own risk in an isolated environment.
