Lenny Domnitser’s
domnit.org

⇙ Jump to content

explicit

This is a static archive of the domnit.org blog,
which Lenny Domnitser wrote between 2006 and 2009.

Introducing Stepic: Python Steganography in Images

Steganography is the hiding of data within other data. Stepic is my new Python module and command line tool for hiding arbitrary data within images by slightly modifying the colors. These modifications are generally imperceptible to humans, but are machine detectable.

Update: Stepic now has a homepage with documentation and downloads.

Stepic can be retrieved using Bazaar, and installed the standard Python way. Depending on your setup, it might look something like this:

bzr get http://domnit.org/stepic/
cd stepic
sudo ./setup.py install --prefix=/usr/local

Stepic’s only dependency, besides Python, is the Python Imaging Library (PIL).

Here’s an example: given this image:

(sample image without hidden data)

The command stepic --encode --image-in=stepic-demo-before.png --data-in=pyramid-fractal.html --out=stepic-demo-after.png produces this image:

(sample image after hiding data)

The images look the same, but the second contains a cool app I made in 2005 and never shared before. You can extract that file by downloading the second image and issuing the command: stepic --decode --image-in=stepic-demo-after.png --out=pyramid-fractal.html.

Note that obscurity is not security—there are other ways to have actual security. While there is no explicit indication in an image that it contains hidden data, an image is unlikely to contain long, non-random data that stepic can extract. If you want something like plausible deniability, your data should look random and most blues should be even.

I’m not doing anything new, except maybe providing a Python implementation. That’s OK by me, and if it counts for anything, I figured out the principle before reading the Wikipedia description.

It’s steganography, it uses pictures, it’s epic, it sounds like septic, it’s stepic—try it now! (Easier installation coming eventually.)

Update: Check out the Stepic homepage.

3 comments on Introducing Stepic: Python Steganography in Images

1. Kryptoblog » Blog Archive » Stepic - steganografi med Python says:

[...] letade efter Pythonbibliotek för att generera och manipulera bilder och grafik, och prang då på en artikel om ett bibliotek kallat Stepic. (Ja, artikeln är från februari så den är inte [...]

—Kryptoblog » Blog Archive » Stepic – steganografi med Python, 20 October 2007, 10:39

2. Steganography in Python « Design Build Test Repeat says:

[...] info, motion info, previous image names, etc. There is a nice class that does this simply. It is Stepic. It is a fairly basic implementation in that it does no encryption or compression of the data but is [...]

—Steganography in Python « Design Build Test Repeat, 7 November 2007, 10:47

3.   Steganography using Python by Design says:

[...] Python when undertaking Steganography exercises, however due to it’s speed and the excellent Stepic module by Lenny Domnitser it’s really, really easy. You’ll need PIL and the Stepic [...]

—  Steganography using Python by Design, 30 December 2007, 20:25

Comments on this entry are now closed. Thanks to those who participated. You can still email me.