ICSec / airpwn-ng

Packet injection for wifi; simplified.
https://gitter.im/ICSec/airpwn-ng
GNU General Public License v3.0
36 stars 13 forks source link

airpwn-ng not working at all due to missing modules #7

Closed Hyper100 closed 2 years ago

Hyper100 commented 2 years ago

Every time I'm trying to run the tool it gives me errors of missing modules. Most of the troubles were at Scapy. I tried working it around and installing the new version of it. It fixed some of the problems but not all. It now says that it's missing the EAPOL module but after looking around I noticed that there is only EAP in Scapy. I spent almost 2 hours trying to fix the problems and installing modules but it still doesn't work.

stryngs commented 2 years ago

Hello @tuphr1928 -- There has been a lot of work happening in updating airpwn-ng to work using python3 and the latest pyDot11 modules.

I just pushed everything a couple moments ago and airpwn-ng is now stable once again.

Please grab the latest release for airpwn-ng and then update to the modules found in RESOURCEs/

From there, refer to the README for your injection type. After you've done all of that please give it a whirl and report back if you're still facing the same issues.

Thanks!

Hyper100 commented 2 years ago

Oh thank you! I'll go experimenting now and report you back!

stryngs commented 2 years ago

How did it work for you @tuphr1928 ?

Hyper100 commented 2 years ago

I have updated all the modules but complete forgot to test it out. Let me check this instant.

Hyper100 commented 2 years ago

I don't know why but it still seams that there are missing modules related to Scapy. I guess that I need to manually install the module. The missing module is still EAPOL.

stryngs commented 2 years ago

@tuphr1928,

If testing WEP or Open use the modules in RESOURCEs via:

python3 -m pip install RESOURCEs/*.tar.gz

If testing WPA use the Python 2 modules in _python2 via: python2 -m pip install _python2/RESOURCEs/*.tar.gz

If testing WPA make sure you're in the _python2 directory as well.

I created the RESOURCEs directory to prevent any module import problems. If you're installing everything within then you are 100% good to go for airpwn-ng.

Keep me posted please.

Hyper100 commented 2 years ago

For some reason pip seems to work really fine on all of the files except Scapy. This is the error displayed when after typing in python3 -m pip install scapy-2.3.1.tar.gz

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

stryngs commented 2 years ago

@tuphr1928 For Python3 you would use scapy-2.4.5 located in RESOURCEs/. v2.3.1 is for Python2 and exists only in the _python2/RESOURCEs folder.

There are other package differences as well so make sure of the folder you are installing from.

Does this fix your issue?

Hyper100 commented 2 years ago

I haven't thought of this solution. Thank you, I'll test it out in the morning and then update you.

Hyper100 commented 2 years ago

It seems that there's a problem with the pip command. I don't have pip using python2. I need to install pip2. Most machines don't have pip2 installed so you should add it to the manual.

Hyper100 commented 2 years ago

After some research I've done it seems like python2 pip has reached the end of its life and it's out of support.

stryngs commented 2 years ago

Hi @tuphr1928,

That problem is exactly why I'm in the middle of a full port to Python3 for airpwn-ng/pyDot11.

I noticed that you did not mention an Operating System. Can you let me know what you're using? Maybe I can download the distro and then put together the syntax and build something, docker even maybe, not sure...

Also, fwiw there is a chance if you followed my instructions on how to install that some of the warnings and/or errors you may have saw, did not matter. It may sound weird but I've seen behavior like this with Python for multiple libs over the years. You pip install something, it complains but the install worked out.

Have you tried airpwn-ng since you did the install?

Hyper100 commented 2 years ago

I'm using Kali Linux. After trying to install the packages inside _python2/RESOURCES/ everything have still failed. I followed the instructions you gave, the instructions I have found online and I did a lot of reading and spend multiple hours trying to work this around. No matter what, I'm still failing to install Scapy modules. Using python2 ./airpwn-ng keep giving me the same error no matter what:

Traceback (most recent call last): File "airpwn-ng", line 10, in from lib.sniffer import Sniffer File "/home/myuser/tools/airpwn-ng/_python2/lib/sniffer.py", line 4, in from scapy.layers.l2 import EAPOL ImportError: cannot import name EAPOL

Unfortunately I cannot install the Scappy tar.gz file because my machine does not support python2 pip and I cannot install it because Debian does not support it anymore.

stryngs commented 2 years ago

The issue of pip isn't a concrete blocker; more of an annoyance. You'll have to solve this for every file in RESOURCEs, but here is how it solves the scapy issue.

$ ls
airpwn-ng  lib  LICENSE  payloads  README.md  RESOURCEs
$ python2 -m scapy
/usr/bin/python2: No module named scapy
$ cp RESOURCEs/scapy-2.3.1.tar.gz .
$ tar zxf scapy-2.3.1.tar.gz
$ mv scapy-2.3.1/scapy .
$ python2    
Python 2.7.18 (default, Mar  8 2021, 13:02:45) 
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scapy.layers.l2 import EAPOL
>>>

As you can see above we have ignored not having a working pip and moved the library itself to the same directory as the airpwn-ng file. From there when it tries to import EAPOL it will work. Without the other RESOURCEs though it is bound to fail.

Give it a whirl and if scapy doesn't act like above, let me know.

Once you repeat for all gzips RESOURCEs you should be well on your way to success.

stryngs commented 2 years ago

@tuphr1928,

Have you had any luck moving forward?

stryngs commented 2 years ago

Closing this out as inactive -- Feel free to re-open @tuphr1928

CHillyVibes commented 1 year ago

Im having an issue installing scapy scapy-2.3.1.tar.gz

I have scapy installed 2.4.5

I'm trying to attack my wpa protected network

Closing this out as inactive -- Feel free to re-open @tuphr1928

Linux Bebo 5.18.0-kali5-amd64 #1 SMP PREEMPT_DYNAMIC Debian 5.18.5-1kali6 (2022-07-07) x86_64 GNU/Linux

sudo python -m pip install *.tar.gz

Processing ./pbkdf2-1.3.tar.gz Preparing metadata (setup.py) ... done Processing ./pycryptodomex-3.4.5.tar.gz Preparing metadata (setup.py) ... done Processing ./pyDot11-1.0.2.2.tar.gz Preparing metadata (setup.py) ... done Processing ./rc4-0.1.tar.gz Preparing metadata (setup.py) ... done Processing ./scapy-2.3.1.tar.gz Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [7 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-req-build-soowjubg/setup.py", line 35 os.chmod(fname,0755) ^ SyntaxError: leading zeros in decimal integer literals are not permitted; use an 0o prefix for octal integers [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.

note: This is an issue with the package mentioned above, not pip. hint: See above for details.

pycryptodomex-3.4.5.tar.gz

installing package worked whats the issue? with scapy if the github repo says we dont need to do anything else?????

/home/kali/airpwn-ng/_archive/_python2/RESOURCEs

CHillyVibes commented 1 year ago

Adding on to commands being used now after installing those packages except scapy in the python2 folder

sudo airodump-ng wlan0 --band b --bssid --channel sudo airtun-ng -a -e -p wlan0 sudo ifconfig at0 192.168.1.83 netmask 255.255.255.0 up sudo aireplay-ng wlan0 -a -c * -0 1

sudo python3 ./airpwn-ng -i at0 -m wlan0 --injection payloads/demo

:(