Problems with promiscuous mode (capture network traffic)
Posted: Sat Jul 22, 2017 12:09 pm
I use the promiscuous mode of the esp32 to capture network traffic around me.
But i don't get all of the packets. First of all here is my script: https://gist.github.com/Staubgeborener/ ... 336029668b
Everytime the esp32 receive a packet the callback function will be triggered and i check if the mac address in the packets match with the mac address in the filter (line 20), but for now i leave this column empty (see gist). So there is no filter and i should receive everything. All of the packets will be saved on a sd card in a wireshark friendly hexdump. But when turning the esp32 on, i'll mostly get only beacon frames. Maybe some (encrypted) data frames, but mostly (98%) beacons.
So i wrote a program which uses scapy. I send randomly some (thousand) packets (arp, icmp, tcp and beacon frames) in the air. And those packets definitly exist - for example, i send an arp to my second computer and opened wireshark. Wireshark recognized this arp (who is xxx, tell zzz).
But after sending around 30.000 packets, the esp32 only received 30 beacon frames. Thats all. No arp, icmp or tcp. And there we're around ~7.000 beacon frames in the air for around 2 hours.
Most of the (beacon) frames i receive, are those from my network (respectively also my neighbors), but only some from my scapy program. Needless to say: no 'real data' packet, even without filtering.
But i don't get all of the packets. First of all here is my script: https://gist.github.com/Staubgeborener/ ... 336029668b
Everytime the esp32 receive a packet the callback function will be triggered and i check if the mac address in the packets match with the mac address in the filter (line 20), but for now i leave this column empty (see gist). So there is no filter and i should receive everything. All of the packets will be saved on a sd card in a wireshark friendly hexdump. But when turning the esp32 on, i'll mostly get only beacon frames. Maybe some (encrypted) data frames, but mostly (98%) beacons.
So i wrote a program which uses scapy. I send randomly some (thousand) packets (arp, icmp, tcp and beacon frames) in the air. And those packets definitly exist - for example, i send an arp to my second computer and opened wireshark. Wireshark recognized this arp (who is xxx, tell zzz).
But after sending around 30.000 packets, the esp32 only received 30 beacon frames. Thats all. No arp, icmp or tcp. And there we're around ~7.000 beacon frames in the air for around 2 hours.
Most of the (beacon) frames i receive, are those from my network (respectively also my neighbors), but only some from my scapy program. Needless to say: no 'real data' packet, even without filtering.