vanhoefm / fragattacks

Other
1.23k stars 185 forks source link

No such device Error. #58

Closed dhje0ng closed 9 months ago

dhje0ng commented 9 months ago

I use Ubuntu version 22.04.2 and use kernel 5.8.0.63-generic.

Linux fragattacks 5.8.0-63-generic #71~20.04.1-Ubuntu SMP Thu Jul 15 17:46:08 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

I created the image via VMware and used the git procedure to create an environment for fragattack in the environment for fragattack by following the git procedure.

As for the hardware, I am using an Alfa AWUS036ACH and iwconfig shows that the wifi interface is indeed available,

When I run fragattack.py, I get the following error the following error. Is there any way to resolve this?

$ ./fragattack.py wlx00c0cab457b0 ping
command failed: Operation not supported (-95)
Traceback (most recent call last):
  File "/home/dhjeong/fragattacks/research/fraginternals.py", line 779, in configure_interfaces
    scapy.arch.get_if_index(self.nic_mon)
  File "/home/dhjeong/fragattacks/research/venv/lib/python3.8/site-packages/scapy/arch/linux.py", line 380, in get_if_index
    return int(struct.unpack("I", get_if(iff, SIOCGIFINDEX)[16:20])[0])
  File "/home/dhjeong/fragattacks/research/venv/lib/python3.8/site-packages/scapy/arch/common.py", line 59, in get_if
    ifreq = ioctl(sck, cmd, struct.pack("16s16x", iff.encode("utf8")))
OSError: [Errno 19] No such device

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./fragattack.py", line 276, in <module>
    daemon.run()
  File "/home/dhjeong/fragattacks/research/fraginternals.py", line 902, in run
    self.configure_interfaces()
  File "/home/dhjeong/fragattacks/research/fraginternals.py", line 782, in configure_interfaces
    subprocess.check_output(["iw", self.nic_iface, "interface", "add", self.nic_mon, "type", "monitor"])
  File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['iw', 'wlx00c0cab457b0', 'interface', 'add', 'monwlx00c0cab45', 'type', 'monitor']' returned non-zero exit status 161.
[15:14:39] Closing daemon and cleaning up ...
(venv) root@fragattacks:/home/dhjeong/fragattacks/research# iwconfig
lo        no wireless extensions.

ens33     no wireless extensions.

wlx00c0cab457b0  unassociated  ESSID:""  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/100  Signal level=0 dBm  Noise level=0 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
vanhoefm commented 9 months ago

The AWUS036ACH is not supported in mixed injection mode (the default and recommended mode). See the README for details. You will need to get another Wi-Fi dongle.