Sniff Open Wireless Traffic with Mac OS X

Sniffing open wireless traffic can be pretty interesting and entertaining. It’s amazing to see what gets transferred across a network. Just make sure you’re doing it legally.

Sniffing on Mac OS X is very similar to sniffing on any other operating system with a few small caveats.

1. Install MacPorts

This is the best package manager IMHO for OS X. You’ll need to install Apple XCode Developer tools prior to installing MacPorts. The install page details all that information here http://www.macports.org/install.php. It’s all very simple double click and install DMG
packages.

2. Install Wireshark

Open a Terminal:

nobody@nobody:~$ sudo port install wireshark

If you just start Wireshark at this point, no interfaces will show up. Your user needs to own /dev/bpf in order to use the interfaces.

3. Create a Startup Script

Create this small script in /usr/bin/wireshark_start

#!/bin/sh
osascript -e "do shell script "chown $USER /dev/bpf*" with administrator privileges";
wireshark &

Give it full execute permissions

nobody@nobody:/usr/bin$ sudo chmod +x wireshark_start
4. Configure Wireshark & Start Sniffing

Start Wireshark

nobody@nobody:~$ wireshark_start

Once Wireshark is open, choose Capture->Options, choose Interface ‘en1′, ensure ‘capture packets in monitor mode’ is enabled, click Start!

You should now be capturing packets. You’re pretty much ‘drinking from a fire hose’ so you need to make sure you utilize Wireshark’s Filter section. e.g. to filter http traffic, type in ‘http’ in the filter box and hit apply.

11 Comments Sniff Open Wireless Traffic with Mac OS X

  1. Pingback: Sniffing Traffic on Your Home Network

  2. Mark

    After installing, creating wireshark_start, and chmodding it, I attempt to run wireshark_start, osx prompts me for my password but then nothing. Eh?

    Reply
    1. xploit

      Mark, if you run just the command ‘wireshark’ from the command line does wireshark open? You should see a white X icon in your dock appear since wireshark runs using X11.

      Reply
  3. Pingback: Firesheep, Blacksheep, and Protecting Your Wi-Fi Data | Wireless Networking Wifi

  4. Nate

    im new to this, everything works but i dont have a wireshark_start directory? is there supposed to be one created by the installation? im lost

    Reply
  5. Nate

    ok well i dont know how to create the script. and also is /usr/bin under Development? because thats the only /usr/bin i found

    Reply
    1. Dustin

      Open up Terminal, type

      cd /usr/bin
      sudo vim wireshark_start
      -press i (puts vim in insert mode)
      -paste the script contents
      press esc (exits insert mode)
      press : x enter (saves and exits)

      Reply
  6. GummyBear

    How can I sniff FTP traffic if its not in my network? For example, I live in Los Angeles and I want to sniff out a password from a website say in italy. How can I do that? Please help. Loving your ‘blog’ and posts.

    Keep it up!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>