Skip to content

spawn451/ExeSteganography-Delphi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

ExeSteganography-Delphi

A Delphi application for embedding executable files within image files using steganography techniques.

Overview

ExeSteganography is an educational tool that demonstrates how steganography can be used to embed executable files within carrier image files. The application uses the Least Significant Bit (LSB) technique to hide binary data in the pixels of an image with minimal visual impact.

⚠️ WARNING: This application is for educational purposes only. Misuse of steganography may violate laws in certain jurisdictions. Always use responsibly and ethically.

Features

  • Embed Mode: Hide executable files within PNG or JPG/JPEG images
  • Extract Mode: Recover hidden executables from stego images
  • Integrity Verification: Uses MD5 hashing to ensure extracted files match the original
  • Multi-threaded Operations: Background processing to keep UI responsive
  • Detailed Logging: Real-time progress reporting

Technical Details

Steganography Implementation

The application uses the Least Significant Bit (LSB) steganography technique, which works by replacing the least significant bit of each color channel (R, G, B) in the image pixels with bits from the executable file. Since modifying the LSB causes minimal visual changes, the resulting stego image appears virtually identical to the original.

Data Structure

The embedded data contains:

  1. The binary content of the executable file
  2. An MD5 hash of the executable for integrity verification
  3. An end marker to identify where the hidden data ends

Supported Formats

  • Carrier Images: PNG, JPG/JPEG
  • Output Images: PNG (to avoid compression artifacts)
  • Files to Hide: Any executable (*.exe) or binary file

Usage

Embedding an Executable

  1. Open the "Embed" tab
  2. Browse and select a carrier image
  3. Browse and select the executable file to hide
  4. Specify an output path for the stego image
  5. Click "Embed"
  6. Wait for the operation to complete

Extracting an Executable

  1. Open the "Extract" tab
  2. Browse and select the stego image containing a hidden executable
  3. Specify where to save the extracted executable
  4. Click "Extract"
  5. The application will verify the integrity of the extracted file using MD5

Development

Project Structure

  • BinaryHelper.pas: Utility class for binary operations
  • ExeSteganography.pas: Core steganography implementation
  • MainForm.pas: UI implementation and thread management

How It Works

  1. Embedding Process:

    • The executable file is read into memory
    • An MD5 hash is calculated for integrity verification
    • The executable data, MD5 hash, and end marker are combined
    • The combined data is converted to a bit stream
    • Each bit replaces the LSB of a color component in the image
    • The modified image is saved as PNG
  2. Extraction Process:

    • The LSB of each color component is extracted
    • Bits are combined into bytes
    • The end marker is located to determine where the data ends
    • The executable and MD5 hash are separated
    • The extracted executable is saved
    • The MD5 hash is compared against the calculated hash of the extracted file

Limitations

  • The carrier image must have sufficient capacity to store the executable file
  • PNG output is used to prevent data loss from lossy compression
  • Large executables require proportionally large carrier images

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Made with ❤️ using Delphi RAD Studio

About

Hide an Exe File in Images using Steganography

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages