Why I'm not seeing wireless data requests

113 views Asked by At

I'm new to Scapy, but pretty excited to be playing around with it. I see some cool potential applications for it. Currently I'm just working on getting some basic functionality and with that, I'm trying to pull in Wireless Probe Requests.

The problem is, I'm not seeing any! I'm hoping there is a work around, but as of this moment, I haven't been able to research my way to a solution.

Here's the code I'm using.

#!/usr/bin/env python

from scapy.all import *

def PacketHandler(pkt) :
    if pkt.haslayer(Dot11) :
        if pkt.type == 0 and pkt.subtype == 4 :
            if pkt.info :
                print("Client with mac: "+pkt.addr2+" probing for SSID "+pkt.info)
                #pkt.show() # debug statement

sniff(iface="wlan0", prn = PacketHandler) # "ifconfig -a" (or s) to see network adapters

There's a few questions I've been hitting along the way realizing this isn't as simple of a process as I thought. What's the Dot11 layer? pkt.type and sub type?

In other examples I've been seeing, they specify the interface as "mon0", but when I do that, I get a "No Such Device" message. However, when I don't specify an interface, I see many requests coming in from Ethernet. So I believe the issue is with my Ifs or my wireless adapter.

My goal is to scan for wireless networks with my phone and see the request caught show up on my computer.

1

There are 1 answers

0
John Sly On

Finally found the solution!! MONITOR MODE!!

This might be obvious to everyone who's done this before, but for anyone else doing this for their first time, when I ran this, it just seemed to idle, or not pull any relevant results. UNTIL I found I needed to be in monitor mode. It doesn't seem that all wireless cards can do this, so this isn't always the solution, but for me, it solved it.

To get into monitor mode just do the following commands:

sudo ifconfig wlan0 down
sudo iwconfig wlan0 mode monitor
sudo ifconfig wlan0 up