-3

So far, I have opened the image in a hex editor and looked at the bytes. However, for the life of me I cannot identify the sound. I have spent days over this. I even tried opening the file (as 'Raw Data') in Audacity and playing it. Nothing but 'noise'. Tried to create a histogram/frequency analysis but nothing.

Any help would be appreciated.

learnerX
  • 1,022
  • 1
  • 18
  • 44
  • 2
    Unless you know what method was used to encode the data you're going to find this very difficult. This is too broad for [so] –  Mar 28 '15 at 20:48
  • 1
    Indeed not, but expecting someone to expound upon all the cryptanalysis required to answer your question is far beyond the remit of [so] –  Mar 28 '15 at 20:55
  • 1
    Use an image search tool to find the original image on the web, subtract the original (pixel values) from the steg image, then analyse the resulting difference. – Paul R Mar 28 '15 at 20:58
  • 1
    Not a good fit for this site. You're looking for a forum to pool suggestions, but this is a Q&A site with answers that can objectively be judged for their usefulness. You're just looking for suggestions and we'd be shooting in the dark about which one would solve your problem. Specifically, for steganography, there are virtually an infinite number of embedding methods and just the slightest variation from the correct procedure will yield no results. – Reti43 Mar 29 '15 at 11:01
  • Please read the [FAQ](http://stackoverflow.com/help/asking) on what questions are considered [appropriate](http://stackoverflow.com/help/on-topic) and [how to ask](http://stackoverflow.com/help/how-to-ask) them. Realise that this isn't a puzzle-solving service, but a Q&A site about programmatically-related questions on specific and clarified issues. That means you already have an idea of what you want to do, i.e. how to extract the secret, but have a problem in coding it an implementation. [Crypto StackExchange](http://crypto.stackexchange.com/) may be more appropriate for your needs. – Reti43 Apr 07 '15 at 16:40

1 Answers1

5

Steganography usually works by hiding a second image or some data in the lower bits of another image. These values becomes very insignificant over-all and have little impact on the visual look of the image.

To reveal this second data, you mask off the top bits, then usually scale up remaining values.

However, you need to know in advance:

  • How many of the lower bits are used (two are very common for secondary images)
  • How is the remaining data organized (if not an image):
    • Is it (bit) scaled, how much
    • what order (scan-lines horizontally, vertically...).
    • Are all color components in use? Which one and how is the data split over the components...
    • Is it an audio file or audio data
    • Is the resulting data compressed, encrypted, ...
    • Audio requires signed values, are the values signed in the data, are they shifted... (this steals one bit which means the bytes must probably be packed to produce something audible)

etc.

Without this information it is pretty useless (you can try likely guesses but they will be guesses, and you can do this for a very long time).

In any case, I provided a basis below showing the process, but what remains, and if it is extracted correctly, is virtually "impossible" to determine without knowing how the original data is organized:

Here is the result of this process using an image which is known in advance to hide another image (the cat) in the lower 2 bits:

var img = new Image;
img.onload = unstegano;
img.crossOrigin = "";
img.src = "//i.imgur.com/DkCZMJN.png";  // contains a hidden image

document.body.appendChild(img);

function unstegano() {
  var canvas = document.createElement("canvas"),
      ctx = canvas.getContext("2d");
  
  canvas.width = this.naturalWidth;
  canvas.height = this.naturalHeight;
  ctx.drawImage(this, 0, 0);
  
  // get pixels
  var idata = ctx.getImageData(0, 0, canvas.width, canvas.height),
      data = idata.data, i = 0, len = data.length;
  
  while(i < len) {
      data[i] = (data[i++] & 3)<<6;  // masks two first bits, shifts it to scale it
      data[i] = (data[i++] & 3)<<6;
      data[i] = (data[i++] & 3)<<6;
      i++
  }
  ctx.putImageData(idata, 0 ,0);
  document.body.appendChild(canvas);
}

With the supplied image you will get something that looks like noise, but that doesn't matter so much as audio data would produce a noise image in any case - your challenge now is to make anything out of this noise (or "noise"):

var img = new Image;
img.onload = unstegano;
img.crossOrigin = "";
img.src = "//i.imgur.com/IpaDzB4.png";
document.body.appendChild(img);

function unstegano() {
  var canvas = document.createElement("canvas"),
      ctx = canvas.getContext("2d");
  
  canvas.width = this.naturalWidth;
  canvas.height = this.naturalHeight;
  ctx.drawImage(this, 0, 0);
  
  // get pixels
  var idata = ctx.getImageData(0, 0, canvas.width, canvas.height),
      data = idata.data, i = 0, len = data.length;
  
  while(i < len) {
      data[i] = (data[i++] & 1)<<7;  // masks first bit, shifts it to scale it
      data[i] = (data[i++] & 1)<<7;
      data[i] = (data[i++] & 1)<<7;
      i++
  }
  ctx.putImageData(idata, 0 ,0);
  document.body.appendChild(canvas);
}