Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

too many packets lost ... #7

Closed
kings-way opened this issue Jun 8, 2016 · 3 comments
Closed

too many packets lost ... #7

kings-way opened this issue Jun 8, 2016 · 3 comments

Comments

@kings-way
Copy link

Have you noticed that the packet loss rate is a little high?
Many ICMP (ping) packets between station and the fakeap may be lost, for me, more than 50% sometimes. And I am sure it's not the wifi-adapter's problem.
If I use airbase-ng to setup an AP, then the situation will be much better.

I am not an expert in the network field.
So, I am just curious about that whether it is the problem of scapy or the way you handle dot11 packets?

@rpp0
Copy link
Owner

rpp0 commented Jun 8, 2016

You are right; unfortunately Scapy is inherently slow at processing packets. This is because it will try to dissect each frame. If Scapy can't keep up, it will drop frames. I tried to mitigate the issue with the following line:

TCP.payload_guess = []

This removes the payload dissector for layers higher than TCP. You could try to do the same with the IP layer for slightly less overhead -- if you only need ICMP replies. So:

IP.payload_guess = []

Airbase-ng is written in C, uses libpcap, and does not automatically dissect, which makes it much faster at processing packets. If you require performance, libpcap is the way to go. If you quickly want to prototype or attack a Wi-Fi protocol and performance is not crucial, then scapy-fakeap will be more convenient :).

@kings-way
Copy link
Author

kings-way commented Jun 9, 2016

Thanks for replying!
Actually, I am writing a tool making use of station probe packets to dynamically setup AP with the same SSID in probe packets. Yeah, it's a tool for pentest.
So, I have to provide stable Internet access for the stations.
Additionally, I translate dot11 frame to or from ethernet frame in my code. I think 'IP.payload_guess' may make some sense for me. I'll try it later.
Thanks again.

@rpp0
Copy link
Owner

rpp0 commented Jun 10, 2016

You're welcome, sounds like a cool project too! I did the same thing a while ago with hostapd. Hostapd works by putting your interface in AP / master mode (which has the advantage of automatically responding to ACKs). Might be worth taking a look at as an alternative to airbase-ng.

@rpp0 rpp0 closed this as completed Jun 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants