O'Reilly logo

Hacking and Securing iOS Applications by Jonathan Zdziarski

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Driftnet

Driftnet is a network security tool that watches network traffic and displays image data that crosses the network. It has been used at numerous conferences and in corporate networks to visually monitor the image data in transit to identify use policy violations. An attacker can use Driftnet to intercept images being transferred across a network to eavesdrop and fish for confidential or private images being sent or received. The tool is a bit dated, but still works well with a little massaging.

Building

To build Driftnet on Mac OS X, use MacPorts to install a number of dependencies first. The following packages much be installed in order to build Driftnet.

giflib (4.1.6_1 used)
jpeg (8c_0 used)
libpng (1.4.8_0 used)
gtk2 (2.25.5_0+x11 used)
libungif (4.1.4_4 used)

You’ll also need X11, which is installed by default with Xcode.

Once these packages have installed, download the source distribution of Driftnet using cvs:

  $ cvs -d :pserver:anonymous@sphinx.mythic-beasts.com:/home/chris/vcvs/repos login
  $ cvs -d :pserver:anonymous@sphinx.mythic-beasts.com:/home/chris/vcvs/repos co driftnet

Note

The password for the anonymous user is anonymous. It’s not intended to be secure.

When the source distribution is finished downloading, change into the driftnet directory. You’ll have to make a code change in order to make it compatible with the latest version of libpng. Edit the png.c source file in the driftnet directory. Locate the following block of code:

 /* Convert greyscale images to 8-bit RGB ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required