Thread: bmp header

  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    25

    bmp header

    Does anyone know how I could detect encryption in a bmp header?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Well you make a pretty good job by spreading your questions over manythreads and forums

    BMP isn't an encrypted file format, so any kind of encyption means it is no longer a bitmap header.

    Do you mean compression?

    From your previous posts, it looks like you're attempting some kind of steganography program (hiding messages in the noise bits of audio and image data). Of course, if your host file contains compressed data, then there isn't much noise to hide your secret in.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User samGwilliam's Avatar
    Join Date
    Feb 2002
    Location
    Newport
    Posts
    382
    Quote Originally Posted by Salem
    Well you make a pretty good job by spreading your questions over manythreads and forums

    BMP isn't an encrypted file format, so any kind of encyption means it is no longer a bitmap header.

    Do you mean compression?

    From your previous posts, it looks like you're attempting some kind of steganography program (hiding messages in the noise bits of audio and image data). Of course, if your host file contains compressed data, then there isn't much noise to hide your secret in.
    I know of someone who hid messages in JPEGs as his final year project - one character per DCT block, so it can be done.
    Current Setup: Win 10 with Code::Blocks 17.12 (GNU GCC)

  4. #4
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    Done - and undone - http://www.outguess.org/
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Adding data to a known format to create your own bastardized version is a very poor programming practice.

    I personally wouldn't even bother opening non-standard bmp, wav, jpeg, mp3, etc, etc.

    I think MS idea about hiding resources in an exe is bad enough coming from a professional organization, even though they did invent the exe format.

  6. #6
    Registered User
    Join Date
    Jan 2005
    Posts
    25
    A known stego program encrypts the headet of a bmp file. I want to write an application that can detect this.

    I am creating a stego detection program.

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    > A known stego program encrypts the headet of a bmp file
    That would be a pretty dumb move IMO.

    The whole idea with stego is that the host file behaves EXACTLY as it would without the secret information as with the secret information, otherwise there's no point.

    Stego hides data in the pixel data of BMP, not the header.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  8. #8
    Crazy Fool Perspective's Avatar
    Join Date
    Jan 2003
    Location
    Canada
    Posts
    2,640
    Quote Originally Posted by Rhidian
    Does anyone know how I could detect encryption in a bmp header?
    sure. try and read the header like a normal BMP header... if its all f***ed up than its either encrypted or not a bmp file

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BMP file header
    By YongzZ in forum C Programming
    Replies: 14
    Last Post: 04-25-2009, 10:46 AM
  2. Checking array for string
    By Ayreon in forum C Programming
    Replies: 87
    Last Post: 03-09-2009, 03:25 PM
  3. Problem reading BMP
    By Mortissus in forum C Programming
    Replies: 4
    Last Post: 02-02-2006, 06:32 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM