User Tools

Site Tools


install_drivers

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
install_drivers [2008/11/02 14:01] – added link for rt2580 page darkaudaxinstall_drivers [2013/12/29 14:52] – [Compat-Wireless Alternative Approach] darkaudax
Line 1: Line 1:
 ====== Installing Drivers ====== ====== Installing Drivers ======
- 
- 
- 
- 
 ===== Linux ===== ===== Linux =====
-As of now, Aireplay-ng only supports injection on Prism2, PrismGT (FullMAC), Atheros, Broadcom (with the b43 driver), RTL8180, RTL8187, Ralink, ACX1xx and Zydas. Injection on** Hermes, Aironet and Marvell** is not supported because of firmware and/or driver limitations.+As of now, Aireplay-ng only supports injection on Prism2, PrismGT, Atheros, Broadcom (with the b43 driver), Intel IWL, RTL8180, RTL8187, Ralink, ACX1xx and Zydas. Injection on** Hermes, Aironet and Marvell** is not supported because of firmware and/or driver limitations.
 \\ \\
  
-There are two families of drivers - ieee80211 and mac80211.  Basically, mac80211 is starting to replace ieee80211.  See [[install_drivers#mac80211_versus_ieee80211_stacks|this write-up]] for more detail.  Where the mac80211 version of the driver is stable and supports injection, that should be your first choice.  Keeping in mind that mac80211 is only well supported starting in about 2.6.25 and up kernels.  However, in many cases, only legacy ieee80211 drivers exist for injection.+There are two families of drivers - ieee80211 and mac80211.  Basically, mac80211 has largely replaced ieee80211.  See [[install_drivers#mac80211_versus_ieee80211_stacks|this write-up]] for more detail.  Where the mac80211 version of the driver is stable and supports injection, that should be your first choice.  Keeping in mind that mac80211 is only well supported starting in about 2.6.25 and up kernels.  However, in some cases, only legacy ieee80211 drivers exist for injection.
  
-Nearly all non-mac80211 drivers that can support injection need to be patched to support injection in **Monitor mode**.  On the other hand, the mac80211 versions of the drivers generally only need the mac80211 core itself patched to support the fragmentation attack.+Nearly all non-mac80211 drivers that can support injection need to be patched to support injection in **Monitor mode**.  On the other hand, the mac80211 versions of the drivers generally only need the mac80211 core itself patched to support the fragmentation attack.  Other attacks using mac80211 drivers typically work without patching.
  
 Remember you cannot use both ieee80211 and mac80211 versions of the same driver at the same time.  You must decide to use one or the other, not both.  If you try loading both, one will fail.  So you must consciously decide which one you wish to use and blacklist the other one if you have both on your system. Remember you cannot use both ieee80211 and mac80211 versions of the same driver at the same time.  You must decide to use one or the other, not both.  If you try loading both, one will fail.  So you must consciously decide which one you wish to use and blacklist the other one if you have both on your system.
- 
-Also keep in mind that the mac80211 driver versions are still immature compared to the ieee80211 versions.  Getting the mac80211 infrastructure working properly requires more linux skills and poses some risks to your system.  You are dealing with "bleeding edge" software.  So unless you have good linux skills and are prepared for problems, consider using the ieee80211 versions for now. 
 \\ \\
  
 You will need the following to compile drivers: You will need the following to compile drivers:
-  * Linux kernel headers that match your current running kernel. On openSUSE, the kernel sources also must be installed.+  * Linux kernel headers that match your current running kernel. On openSUSE, the kernel sources also must be installed.  Depending on the driver and distribution, you must install the full kernel sources as well.
   * The same **gcc** version that was used to compile your kernel. At least make sure that the first two version numbers or the compiler are the same (e.g. it's OK to use gcc **3.4**.6 to compile the driver if the kernel was compiled by gcc **3.4**.2). Ignoring this rule will cause **Invalid module format** errors during module load. That can be checked via /proc/version.   * The same **gcc** version that was used to compile your kernel. At least make sure that the first two version numbers or the compiler are the same (e.g. it's OK to use gcc **3.4**.6 to compile the driver if the kernel was compiled by gcc **3.4**.2). Ignoring this rule will cause **Invalid module format** errors during module load. That can be checked via /proc/version.
-  * Always use latest patches that you can find [[http://patches.aircrack-ng.org/|here]]+  * Always use the latest patches that you can find [[http://patches.aircrack-ng.org/|here]]
 \\ \\
 Note: if you're using drivers provided by your distribution, they are NOT patched. Note: if you're using drivers provided by your distribution, they are NOT patched.
 \\ \\
 +General information about patching drivers plus troubleshooting tips can be found in the [[patching|How To Patch Drivers Tutorial]].
  
 The following are detailed instructions for installing/patching the ieee80211 versions of the drivers: The following are detailed instructions for installing/patching the ieee80211 versions of the drivers:
Line 40: Line 35:
   * [[rt2500]]   * [[rt2500]]
   * [[rt2570]]   * [[rt2570]]
-  * [[rt2580]]+  * [[rt2870]]
   * [[rt61]]   * [[rt61]]
   * [[rt73]]   * [[rt73]]
Line 55: Line 50:
 In addition, the following mac80211 drivers require extra patches to enable or improve monitoring or injection support (purpose of the patch is in parentheses): In addition, the following mac80211 drivers require extra patches to enable or improve monitoring or injection support (purpose of the patch is in parentheses):
  
-  * [[ath5k]] (improve injection speed+  * [[iwlagn]] (allow injection in 2.6.25/.26, formerly called iwl4965
-  * [[b43]] and b43legacy (improve injection speed and enable the fragmentation attack) +  * [[rtl8187]] (improve injection speed)
-  * [[iwl4965]] (allow injection)+
   * [[zd1211rw-mac80211]] (fully disable packet filtering in monitor mode)   * [[zd1211rw-mac80211]] (fully disable packet filtering in monitor mode)
  
Line 63: Line 57:
 **Note**: For other drivers, simply follow the standard installing procedure for your distribution. **Note**: For other drivers, simply follow the standard installing procedure for your distribution.
  
 +
 +===== Compat-Wireless Alternative Approach =====
 +
 +**UPDATE: compat-wireless is now known as [[https://backports.wiki.kernel.org/index.php/Main_Page|backports]]**
 +
 +As mentioned previously, the mac80211 drivers quite often support injection out of the box in recent kernels.  The mac80211 drivers are improving very rapidly.  Sometimes you want to try the latest mac80211 driver without recompiling your entire kernel.  This is where [[http://linuxwireless.org/en/users/Download|Compat-Wireless]] comes in.  You can now download a package which lets you compile and install the latest advances on the Linux wireless subsystem and get some of the latest drivers without having to recompile your entire kernel. This package adds mac80211, mac80211 drivers, and any new FullMAC driver which has had fairly recent updates. 
 +
 +For full details see the Aircrack-ng [[compat-wireless|Compat-Wireless documentation]].
  
  
 ===== Windows ===== ===== Windows =====
  
-On windows, currently, only monitoring is supported. Stock drivers doesn't support monitoring, you'll have to install [[http://www.wildpackets.com/support/downloads/drivers|wildpacket]] driver.  For Atheros chipsets, if your model isn't listed or your are unsure as to which driver applies, simply download the latest version). \\ +Windows is **NOT** supported.
-\\ +
-To make it short, all Atheros cards should be supported. Centrino or USB adapter are not supported. \\ +
-See [[compatibility_drivers|Compatibility, Drivers, Which Card to Purchase]] for a complete list of supported chipsets. \\ +
-In 1.0, [[Airpcap]] adapter will be supported. +
-\\ +
-\\ +
-  * [[wildpacket_driver_install|Installing wildpacket drivers]] +
-\\+
  
  
Line 90: Line 84:
 The first critical step is to ensure that your wireless device is recognized by your system.  There are a variety of methods to verify that your system did this successfully.  Here are some methods: The first critical step is to ensure that your wireless device is recognized by your system.  There are a variety of methods to verify that your system did this successfully.  Here are some methods:
  
-  * The "dmesg" command can quite often contain detailed messages indicating that the wirelss devices was properly detected.+  * The "dmesg" command can quite often contain detailed messages indicating that the wireless devices was properly detected.
   * If the card is an ISA card, you are usually out of luck.    * If the card is an ISA card, you are usually out of luck. 
   * If the card is a PCI card (miniPCI/miniPCI Express/PCI Express), you need to use the command "lspci" to display the card identification strings.   * If the card is a PCI card (miniPCI/miniPCI Express/PCI Express), you need to use the command "lspci" to display the card identification strings.
   * If the hardware is a USB dongle, you need to use the command "lsusb" to display the dongle identification strings. In some case, "lsusb" doesn't work (for example if usbfs is not mounted), and you can get the identification strings from the kernel log using "dmesg" (or in /var/log/messages).    * If the hardware is a USB dongle, you need to use the command "lsusb" to display the dongle identification strings. In some case, "lsusb" doesn't work (for example if usbfs is not mounted), and you can get the identification strings from the kernel log using "dmesg" (or in /var/log/messages). 
-  * If the card is a Cardbus card (32 bits Pcmcia), and if you are using kernel 2.6.X or kernel 2.4.X with the kernel Pcmcia subsystem, you need to use the command "lspci" to display the card identification strings. If the card is a Cardbus card (32 bits Pcmcia), and if you are using an older kernel with the standalone Pcmcia subsystem, you need to use the command "cardctl ident" display the card identification strings. Try both and see what comes out.  +  * If the card is a Cardbus card (32 bits PCMCIA), and if you are using kernel 2.6.X or kernel 2.4.X with the kernel PCMCIA subsystem, you need to use the command "lspci" to display the card identification strings. If the card is a Cardbus card (32 bits PCMCIA), and if you are using an older kernel with the standalone PCMCIA subsystem, you need to use the command "cardctl ident" display the card identification strings. Try both and see what comes out.  
-  * If the card is a true Pcmcia card (16 bits), and if you are using kernel 2.6.14 or later, you need to use the command "pccardctl ident" to display the card identification strings. If the card is a true Pcmcia card (16 bits), and if you are using an older kernel, you need to use the command "cardctl ident" display the card identification strings. Note that cardmgr will also write some identification strings in the message logs (/var/log/daemon.log) that may be different from the real card identification strings.+  * If the card is a true PCMCIA card (16 bits), and if you are using kernel 2.6.14 or later, you need to use the command "pccardctl ident" to display the card identification strings. If the card is a true PCMCIA card (16 bits), and if you are using an older kernel, you need to use the command "cardctl ident" display the card identification strings. Note that cardmgr will also write some identification strings in the message logs (/var/log/daemon.log) that may be different from the real card identification strings. Usually 16bit PCMCIA cards can be easily identified by the sticker on the bottom of the card with tick boxes or information indicating its a 5V card.
  
 Needless to say, if your wireless device is not detected by your system, you will have to investigate and correct the problem. Needless to say, if your wireless device is not detected by your system, you will have to investigate and correct the problem.
 +
  
 ==== Modprobe ==== ==== Modprobe ====
  
 Start by running "modprobe <kernel module name>". Start by running "modprobe <kernel module name>".
- 
- 
  
  
Line 117: Line 110:
  
 See the next entry of a problem commonly seen: "unknown symbol". See the next entry of a problem commonly seen: "unknown symbol".
 +
  
 ==== "unknown symbol" error ==== ==== "unknown symbol" error ====
Line 159: Line 153:
  
 Run "modinfo <kernel module name>" This will confirm the module is actually in the modules tree.  As well, confirm it is the correct version.  Do a "ls -l <file location per modinfo>" and confirm the date matches when you compiled it.  It is not uncommon that you are not running the correct module version. Run "modinfo <kernel module name>" This will confirm the module is actually in the modules tree.  As well, confirm it is the correct version.  Do a "ls -l <file location per modinfo>" and confirm the date matches when you compiled it.  It is not uncommon that you are not running the correct module version.
- 
- 
  
  
Line 167: Line 159:
 A common problem on newer kernels is that the new mac80211 version of the driver gets loaded instead of the older legacy driver, or vice versa.  If that is the case, then you need to blacklist the wrong modules by editing /etc/modprobe.d/blacklist.  First, determine the broken module names and add them to the blacklist file as "blacklist <module name>". A common problem on newer kernels is that the new mac80211 version of the driver gets loaded instead of the older legacy driver, or vice versa.  If that is the case, then you need to blacklist the wrong modules by editing /etc/modprobe.d/blacklist.  First, determine the broken module names and add them to the blacklist file as "blacklist <module name>".
  
-Specifically for madwifi-ng, do a locate or find for ath5k.ko.  If ath5k.ko exists then add "blacklist ath5k" to /etc/modprobe.d/blacklist and reboot. Ath5k is heavily experimental, and it isn't yet tested to work with aircrack-ng. +Specifically for madwifi-ng, do a locate or find for ath5k.ko.  If ath5k.ko exists then add "blacklist ath5k" to /etc/modprobe.d/blacklist and reboot. 
 +Same for the other way around: if you want to load ath5k, but madwifi-ng gets loaded instead, add "blacklist ath_pci" to /etc/modprobe.d/blacklist.
  
  
 ==== Reload Driver ==== ==== Reload Driver ====
-Although it is not very "scientific", sometimes simply unloading then reloading the driver will get it working.  This is done with the rmmod and modprobe commands. +Although it is not very "scientific", sometimes simply unloading then reloading the driver will get it working.  This is done with the rmmod and modprobe (or simply modprobe -r and then modprobecommands.
- +
-For b43 and b43legacy, it might also be necessary to reload the underlying SSB module. Similarly, rt2x00 and p54 might need reloading of the common modules (p54common, rt2x00lib, rt2x00usb, rt2x00pci). Sometimes (especially with mac80211 drivers), reloading the stack (for example, modules "cfg80211" and "mac80211"might do the trick. +
- +
  
 +For b43 and b43legacy, it might also be necessary to reload the underlying SSB module. Similarly, rt2x00 and p54 might need reloading of the common modules (p54common, rt2x00lib, rt2x00usb, rt2x00pci). Sometimes (especially with mac80211 drivers), reloading the stack (for example, modules "cfg80211" and "mac80211") might do the trick. Also another trick is to do modprobe --show-depends <driver>.
  
 +For USB devices, the trick to reloading the driver is to make sure all of its related interfaces are down (usually wlan0, mon0, etc if you only have one USB device). Then you modprobe -r via the driver it is using and reload those drivers again via modprobe.
  
 +For PCMCIA devices, it is recommended that you have pcmcia-cs package installed as it has a handy utility known as pccardctl. To eject the device virtually, make sure that the interfaces are down following similar guide to USB devices. Once they are down, use pccardctl eject to virtually eject the card/s. Remove all the modules related to the card (hint: if you weren't familiar with the drivers that were used, before you eject the card/s make sure that you do lspci -k as this will list all the devices connected via PCI bus and their related drivers). Once you have removed it, do pccardctl insert and the driver should be loaded automatically. If not load them manually via modprobe.
  
 +For PCI devices, there is no real shortcut as the device will remain permanently used by the driver. You will need to reboot for the new driver to take effect. 
  
  
Line 258: Line 250:
 Here are a few things to check: Here are a few things to check:
  
-  * Ensure you have the firmware installed on your system and in the correct location.+  * Ensure you have the firmware installed on your system and in the correct location. usually its in /lib/firmware or /lib/firmware-`uname-r`.
   * You can try downloading a fresh copy of the driver and installing it again.   * You can try downloading a fresh copy of the driver and installing it again.
   * Try connecting your USB device directly to your computer without a cable.  Cables can be defective and/or too long.  If they are too long then the signal may degrade or there is insufficient power.   * Try connecting your USB device directly to your computer without a cable.  Cables can be defective and/or too long.  If they are too long then the signal may degrade or there is insufficient power.
install_drivers.txt · Last modified: 2018/10/05 23:27 by mister_x