This project is a web application that allows users to encode and decode hidden messages within multimedia files (images, audio, and video). The backend is built using Flask. The application supports user authentication and encrypts hidden messages to enhance security.
- User Authentication: Secure login and registration functionality to restrict access to the encoding and decoding API.
- Image Steganography: Encode and decode messages within image files.
- Audio Steganography: Encode and decode messages within audio files.
- Video Steganography: Encode and decode messages within video files.
- Message Encryption: Encrypt messages before encoding them to enhance security.
- Database Integration: Store user information and uploaded files using SQLite.
- Flask
- SQLAlchemy
- Flask-HTTPAuth
- PyCryptodome
- Flask-Bcrypt
- OpenCV (for image processing)
- Pydub (for audio processing)
- FFmpeg/PyAV (for video processing)
- Python 3.8 or higher
-
Clone the repository and install the dependencies:
git clone https://github.com/Rational-Being/Sleuth.git pip install -r requirements.txt cd sleuth_api
-
Set up a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Run the Flask application:
export FLASK_APP=app.py flask run
The application will now be running on http://localhost:5000
Send a POST request to /register
with the following JSON payload:
{
"username": "your_username",
"password": "your_password"
}
-
Image Encoding:
- Endpoint:
/encode_image
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The image filemessage
: The message to encodepassword
: The password to encrypt the message
- Endpoint:
-
Audio Encoding:
- Endpoint:
/encode_audio
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The audio filemessage
: The message to encodepassword
: The password to encrypt the message
- Endpoint:
-
Video Encoding:
- Endpoint:
/encode_video
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The video filemessage
: The message to encodepassword
: The password to encrypt the message
- Endpoint:
-
Image Decoding:
- Endpoint:
/decode_image
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The encoded image filepassword
: The password used to encrypt the message
- Endpoint:
-
Audio Decoding:
- Endpoint:
/decode_audio
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The encoded audio filepassword
: The password used to encrypt the message
- Endpoint:
-
Video Decoding:
- Endpoint:
/decode_video
- Method: POST
- Authentication: Basic Auth (username and password)
- Form Data:
file
: The encoded video filepassword
: The password used to encrypt the message
- Endpoint:
Encode an Image:
curl -u username:password -X POST -F "file=@path_to_your_image.png" -F "message=Your secret message" -F "password=strong_password" http://127.0.0.1:5000/encode_image --output encoded_image.png
Decode an Image:
curl -u username:password -X POST -F "file=@encoded_image.png" -F "password=strong_password" http://127.0.0.1:5000/decode_image
Sleuth
├── sleuth_api/
│ ├── app.py
│ ├── models.py
│ ├── utils.py
│ ├── image_denc.py
│ ├── audio_denc.py
│ ├── video_denc.py
│ ├── uploads/
│ ├── encoded/
└── docs/
├── audio encode and decode
├── image encode and decode
├── user authentication
├── video encode and decode
├── README.md
├── sleuth.png (sample image files)
├── sleuth-3s.wav (sample audio file)
├── sleauth.avi (sample video file)
├── requirements.txt
LSB stegnography (used in this project) Transform domain steganography Steganlyis, Deep Stegnogrpahy Spread-Spectrum Stegnography