forensics.media Subscribe

Hidden-data (LSB)

Is there data hidden in this image?

Least-significant-bit steganography hides a message in the lowest bit of each pixel, where the eye cannot see it. Drop in an image and this shows you those low bits directly, and scores how far the pixel values have been nudged the way LSB embedding does. Read it as a lead, not proof.

Runs entirely in your browser. Your image is never uploaded or stored.

How to read the bit plane

Every colour value is eight bits, from the lowest bit (bit 0), which barely changes the colour, up to the highest (bit 7), which carries most of the picture. This view shows one bit at a time as pure black and white. In a normal photo the lowest bit is essentially random sensor and compression noise, so bit 0 should look like television static. The tell for hidden data is structure where there should be none: readable text, a logo, sharp edges or a rectangular block appearing in the lowest bit plane. When you climb to the higher bits you simply start to see the picture itself, which is expected and means nothing.

The chi-square score

Sequential LSB embedding has a statistical side effect: it pulls each pair of neighbouring values (0 and 1, 2 and 3, and so on) towards equal counts. The chi-square attack, introduced by Andreas Westfeld and Andreas Pfitzmann, measures exactly that, and reports a probability that the low bits carry a message. A score near 100 percent means the value pairs are suspiciously balanced across the image, the signature of a message written straight into the low bits; a low score means they are not. Treat a high score as a reason to look harder, since the same balance can occur naturally in some images.

Where it fails

This is a narrow test. It reliably catches only sequential LSB embedding, where a message is written pixel by pixel from the top of the image. Modern tools spread the payload at random positions, or embed adaptively in busy areas, and that defeats the chi-square attack entirely, so a low score is not a clean bill of health. It is also unreliable on flat or heavily saturated images, and close to useless on a JPEG, because JPEG rewrites the low bits every time it saves. A high score is a lead to corroborate, and a low score only rules out the simplest kind of hiding.

Sources

  • Westfeld, A., Pfitzmann, A. (2000). Attacks on Steganographic Systems. 3rd International Workshop on Information Hiding.