blunderbuss-wctf / wacker

A WPA3 dictionary cracker
BSD 2-Clause "Simplified" License
278 stars 56 forks source link

Compiling wpa_supplicant fails #6

Closed SG420 closed 10 months ago

SG420 commented 10 months ago

Attempting to compile wpa_supplicant using the provided steps fails on Kali Live 2023.3, below is what happens when running as root:

apt-get install -y pkg-config libnl-3-dev gcc libssl-dev libnl-genl-3-dev
cp defconfig wpa_supplicant-2.10/wpa_supplicant/.config
git apply wpa_supplicant.patch
cd wpa_supplicant-2.10/wpa_supplicant
make -j4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pkg-config is already the newest version (1.8.1-1).
libnl-3-dev is already the newest version (3.7.0-0.2+b1).
gcc is already the newest version (4:13.2.0-1).
libssl-dev is already the newest version (3.0.10-1).
libnl-genl-3-dev is already the newest version (3.7.0-0.2+b1).
0 upgraded, 0 newly installed, 0 to remove and 543 not upgraded.
../src/build.rules:85: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:89: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:86: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:89: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:86: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:88: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:93: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:89: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:93: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:89: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:92: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:103: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:93: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:103: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:93: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:102: *** mixed implicit and normal rules: deprecated syntax
make: *** No rule to make target '../wpa_supplicant/%.c', needed by '/home/kali/Desktop/WPA3'.  Stop.
make: *** Waiting for unfinished jobs....

The script will then fail to run due to the file being missing:

Starting wpa_supplicant...
Traceback (most recent call last):
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 236, in <module>
    wacker = Wacker(args, start_word)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 60, in __init__
    self.start_supplicant()
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 93, in start_supplicant
    proc = subprocess.Popen(self.cmd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './wpa_supplicant-2.10/wpa_supplicant/wpa_supplicant'
rpcraig commented 10 months ago

I wasn't able to reproduce. The wpa_supplicant built with the following steps

I was also interested in the path in your error report which is suspicious: stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3

Could you describe your setup?

SG420 commented 10 months ago

I am running off a live USB which was made using ventoy, there is also a partition on the USB for regular storage of files, which is where I cloned wacker to. The "stuff" appears to be part of the directory for this, the full directory is /media/kali/USB STORAGE/Cyber Range/WPA3 Stuff/wacker/wpa_supplicant-2.10/wpa_supplicant.

When cloning to the desktop directly, was able to compile. After further testing it appears to fail when it is cloned to a folder which has a space in the name - when I cloned it to a folder in the desktop called "WPA3 Stuff", it would fail the same as before.

rpcraig commented 10 months ago

File names with spaces you say... this one likely goes higher up than what wacker can handle. GNU Make has a really hard time with spaces in file names and doesn't support most use cases of them. A few options might be to just not use spaces in the file/dir names, use underscores instead, poke the supplicant folks and see if they can somehow restructure their makefiles to accommodate, or even try to have the GNU make folks revisit the ultimate issue. But as far as wacker is concerned we can't really do anything with this outside of updating the README with a warning.

ChillVibesMushroom commented 9 months ago

I'll take not of your directions and install the required packages in order to test my WiFi SAE security.

Thank you for this amazing tool. Seems like a straight forward install to be honest.

Just gotta make sure the nics support wpa3 right I was using chatgpt and it said we can use this command in regards to that.

You can use the following command in the Kali terminal to check if your wireless card supports WPA3:

iw list | grep -A8 "Supported interface modes" | grep "WPA3"

This command will display the supported interface modes of your wireless card, including WPA3 if it is supported.

UPDATE perfect install I'm going to setup a WPA3 network later and then give it a test I'll let you know how it goes

Release: 2022.3 Codename: kali-rolling

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

ChillVibesMushroom commented 9 months ago

Attempting to compile wpa_supplicant using the provided steps fails on Kali Live 2023.3, below is what happens when running as root:

apt-get install -y pkg-config libnl-3-dev gcc libssl-dev libnl-genl-3-dev
cp defconfig wpa_supplicant-2.10/wpa_supplicant/.config
git apply wpa_supplicant.patch
cd wpa_supplicant-2.10/wpa_supplicant
make -j4
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
pkg-config is already the newest version (1.8.1-1).
libnl-3-dev is already the newest version (3.7.0-0.2+b1).
gcc is already the newest version (4:13.2.0-1).
libssl-dev is already the newest version (3.0.10-1).
libnl-genl-3-dev is already the newest version (3.7.0-0.2+b1).
0 upgraded, 0 newly installed, 0 to remove and 543 not upgraded.
../src/build.rules:85: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:89: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:86: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:89: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:86: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:88: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:93: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:89: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:93: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:89: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:92: *** mixed implicit and normal rules: deprecated syntax
../src/build.rules:103: warning: overriding recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:93: warning: ignoring old recipe for target '/home/kali/Desktop/WPA3'
../src/build.rules:103: warning: overriding recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:93: warning: ignoring old recipe for target 'stuff/wacker/wpa_supplicant-2.10/build//home/kali/Desktop/WPA3'
../src/build.rules:102: *** mixed implicit and normal rules: deprecated syntax
make: *** No rule to make target '../wpa_supplicant/%.c', needed by '/home/kali/Desktop/WPA3'.  Stop.
make: *** Waiting for unfinished jobs....

The script will then fail to run due to the file being missing:

Starting wpa_supplicant...
Traceback (most recent call last):
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 236, in <module>
    wacker = Wacker(args, start_word)
             ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 60, in __init__
    self.start_supplicant()
  File "/home/kali/Desktop/WPA3 stuff/wacker/./wacker.py", line 93, in start_supplicant
    proc = subprocess.Popen(self.cmd)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1950, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: './wpa_supplicant-2.10/wpa_supplicant/wpa_supplicant'

python3 --version Python 3.11.4 check my sysinfo and then go off of that I am running Python 3.11.4 I cloned as sudo and I ran install as sudo so what other commands have you set or used that caused the confliction?

rpcraig commented 9 months ago

Seems like you're having the same issues as SG420 encountered. You'll need to explain your setup further to know for sure. Do you have spaces in your path? The python version isn't going to matter when the supplicant isn't building to begin with.