O'Reilly logo

Penetration Testing with Perl by Swizec Teller

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

802.11 packet capturing with Perl

To sniff packets in Perl on a WNIC, let's use RFMON on our device. We start by writing a small script to check the mode and enable it if not yet enabled. We will be using iw again, and we will create a VAP device from our WNIC. Let's first use Perl to list the local 802.11 devices and then create a VAP on our wlan0:

Note

These exercises are strictly for us to learn how to step through the packets on a per-byte basis and extract information as we see fit. Not every system will be the same in this aspect, as some kernel drivers and modules, hardware firmware, and other software libraries used in these examples might affect the beginning offset. As stated in an earlier chapter, it is best to work closely with Wireshark ...

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