0

I am trying to do detection of LSB Steganography using real-time camera on mobile phone. So far i havent had much luck with detecting the LSB Steganography, whether on printed material or on the PC Screen.

I tried using OpenCV and do the conversion of each frame to RBG, and then read the bits from each pixel, but that never detects the steganography.

I also tried using the Camera functionality, and check onFrame whether pixel by pixel the starting string is recognized or not, so i can read the actual hidden data in the remaining pixels.

This provided few times positive result, but then the reading of the data was impossible.

Any suggestions how to approach this?

Little bit more information on the hidden data: 1. It is all over the image, and i know the algorithm works, since if i just read the exact image through Bitmap in the app, the steganography is detected and decoded, but when i try to use the camera no such luck. 2. It is in a grid, 8x5 pixels all over the image, so it is not that it is only on 1 specific area of the image, and it can not be detected in the camera view.

I can post some code as well if needed.

Thanks.

Borce Ivanovski
  • 561
  • 1
  • 4
  • 23
  • Just to be clear. You embed data in a digital image and then you look at it through a camera, hoping to detect the secret in the pixels? What is the starting string (if just a bunch of 1s and 0s, how many) and how frequently did you get a positive result? – Reti43 Aug 16 '17 at 20:19
  • it is bunch of 1s and 0s inside 8 pixels in a row. That is to detect that there is code embedded inside.I was getting often positive result from the detection, but then the actual data is jibrish – Borce Ivanovski Aug 17 '17 at 10:57

1 Answers1

0

You still haven't clarified on the specifics of how you do it, but I assume you do some flavour of the following:

  • embed a secret in a digital image,
  • print this stego image or have it displayed on a pc, and
  • take a photograph of that and detect the embedded secret.

For all practical purposes, this can't work. LSB pixel embedding steganography is a very fragile technique. You require a perfect copy of the stego pixels images for extraction to work. Even a simple digital manipulation is enough to destroy your secret. Scaling, cropping and rotation are to name a few. Then you have to worry about the angle you take the photo and the ambient light. And we're not even touching upon the colours that are shown on a pc monitor or the printed photo.

The only reason you get positives for the starting sequence is because you use a short one and you're bound to be lucky. Assuming the photographed stego image results in random deviations for each pixel from its true value, you'll still get lucky sometimes. Imagine the first pixel had the value 250 and after photographed it's 248. Well, the LSB in both cases is still 0.

On top of that, some sequences are more likely to come up. In most photos neighbouring pixels are correlated, because the colour gradient is smooth. This means that if the top left of a photo is dark and the top right is bright, the colour will change slowly. For example, the first 4 pixels have the value 10, then the next few have 11, and so on. In terms of LSBs, you have the pattern 00001111 and as I've just explained, that's likely to come up fairly frequently regardless of what image you photograph out there.

Reti43
  • 9,656
  • 3
  • 28
  • 44
  • Ok, i thought the same thing, but i said let me give it a try. What do you suggest to use? DCT algorithm? DWT Algorithm for encoding and detecting/decoding – Borce Ivanovski Aug 18 '17 at 17:15
  • I don't know whether it's possible. Remember that taking a photo of the stego image is very sensitive to the photo capture conditions. How far you're from the photo, the resolution of the camera, etc. – Reti43 Aug 18 '17 at 17:39
  • @BorceIvanovski Under some very strict conditions, which effectively require you to take a snapshot to reacreate the original stego image as **faithfully** as possible, it miiiiight be possible. [Here's an idea](https://stackoverflow.com/questions/30662050/image-based-steganography-that-survives-resizing) of how tough it is to survive image scaling. – Reti43 Aug 18 '17 at 17:46
  • But i would not have that kind of issue, where stego image has to survive resizing. Basically whatever the exact size of the stego image is, that is what it will be tried to be recognized on the mobile side. Basically, they will have to adjust the mobile closer/further from the image to get the exact pixels. – Borce Ivanovski Aug 18 '17 at 18:51
  • @BorceIvanovski In that case, you might be interested in "robust steganography" algorithms and see if you can find something that suits your requirements. – Reti43 Aug 18 '17 at 19:01
  • I will look into that. Thank you – Borce Ivanovski Aug 18 '17 at 19:47