install_drivers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
install_drivers [2009/01/06 23:41] – Replace an anti-ath5k sentence with two-way instructions. (Ath5k is going to be the default driver in BT4, and is no longer "experimental".) netrolller3d | install_drivers [2017/08/18 21:55] – Renamed old page and added link to latest blog post. mister_x | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installing Drivers ====== | ====== Installing Drivers ====== | ||
+ | ===== Linux ===== | ||
+ | ==== Open Source drivers ==== | ||
+ | Nowadays, most open source drivers make use of cfg80211 (and sometimes mac80211). There are 2 types of wireless cards: | ||
+ | * FullMac | ||
+ | * SoftMac | ||
+ | Here is a picture on how the different parts, cfg80211/ | ||
+ | {{https:// | ||
+ | Staging drivers are stand alone drivers that are not ready to be merged in the kernel for various reasons such code not ready or driver not stable enough for example. | ||
+ | [[https:// | ||
- | ===== Linux ===== | + | ===FullMac=== |
- | As of now, Aireplay-ng only supports injection on Prism2, PrismGT | + | |
- | \\ | + | Those wireless cards have [[https:// |
+ | |||
+ | With a few exceptions, none of those cards support monitor mode and injection. | ||
- | There are two families of drivers - ieee80211 and mac80211. | + | ===SoftMac=== |
- | Nearly all non-mac80211 drivers that can support injection need to be patched to support injection | + | SoftMac wireless cards have MLME handled |
- | Remember you cannot use both ieee80211 and mac80211 versions | + | Most of those do support capture |
- | Also keep in mind that the mac80211 driver versions | + | ==== Vendor drivers ==== |
- | \\ | + | |
+ | Vendor drivers have their own stack and are often called STA drivers. They are usually limited to Managed mode (client) | ||
+ | |||
+ | |||
+ | Most of them won't support monitor mode (and injection). | ||
+ | |||
+ | |||
+ | ==== Driver compilation ==== | ||
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, |
* 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 / | * 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 / | ||
- | * Always use latest | + | * Always use the latest |
- | \\ | + | |
- | Note: if you're using drivers provided by your distribution, | + | |
- | \\ | + | |
- | The following are detailed instructions for installing/ | ||
- | | + | **Note**: if you're using drivers provided by your distribution, |
- | | + | |
- | | + | |
- | | + | |
- | * [[ipw3945]] | + | |
- | * [[madwifi|madwifi-old]] | + | |
- | * [[madwifi-ng]] | + | |
- | * [[prism54]] | + | |
- | * [[r8180-sa2400]] | + | |
- | * [[r8187]] | + | |
- | * [[r8187b]] | + | |
- | * [[rt2500]] | + | |
- | * [[rt2570]] | + | |
- | * [[rt2870]] | + | |
- | * [[rt61]] | + | |
- | * [[rt73]] | + | |
- | * [[wlan-ng]] (prism2) | + | |
- | * [[zd1211rw]] | + | |
- | \\ | ||
- | For fragmentation support, all mac80211 drivers require the mac80211 core to be patched: | ||
- | * [[mac80211|mac80211 core patching | + | General information about patching drivers plus troubleshooting tips can be found in the [[patching|How To Patch Drivers Tutorial]]. |
- | The mac80211 link above also contains information regarding which mac80211 drivers work with the aircrack-ng suite. | + | Refer to your distribution way of compiling kernels: |
- | In addition, the following mac80211 drivers require extra patches to enable or improve monitoring or injection support (purpose of the patch is in parentheses): | + | * [[https:// |
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | * [[iwlagn]] (allow injection in 2.6.25/.26, formerly called iwl4965) | + | ==== Compat-Wireless / Linux backports ==== |
- | * [[rtl8187]] (improve injection speed) | + | |
- | * [[zd1211rw-mac80211]] (fully disable packet filtering in monitor mode) | + | |
- | \\ | + | **NOTE**: They are not currently maintained due to lack of time. |
- | **Note**: For other drivers, simply follow the standard installing procedure for your distribution. | + | |
+ | [[https:// | ||
+ | As mentioned previously, the mac80211 drivers quite often support injection out of the box in recent kernels. | ||
- | ===== Windows ===== | + | For full details see the Aircrack-ng [[compat-wireless|Compat-Wireless documentation]]. |
- | On windows, currently, only monitoring is supported. Stock drivers doesn' | ||
- | \\ | ||
- | To make it short, all Atheros cards should be supported. Centrino or USB adapter are not supported. \\ | ||
- | See [[compatibility_drivers|Compatibility, | ||
- | In 1.0, [[Airpcap]] adapter will be supported. | ||
- | \\ | ||
- | \\ | ||
- | * [[wildpacket_driver_install|Installing wildpacket drivers]] | ||
- | \\ | ||
- | ===== Troubleshooting | + | ==== Troubleshooting ==== |
- | This troubleshooting information applies to linux only. The individual driver pages may have additional troubleshooting information specific to that driver. | + | This troubleshooting information applies to Linux only. The individual driver pages may have additional troubleshooting information specific to that driver. |
You will need to do a bit of homework first prior to following the troubleshooting tips below. | You will need to do a bit of homework first prior to following the troubleshooting tips below. | ||
Line 87: | Line 79: | ||
- | ==== Hardware Verification | + | === Hardware Verification === |
The first critical step is to ensure that your wireless device is recognized by your system. | The first critical step is to ensure that your wireless device is recognized by your system. | ||
- | * The " | + | * The " |
* 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/ | * If the card is a PCI card (miniPCI/ | ||
* If the hardware is a USB dongle, you need to use the command " | * If the hardware is a USB dongle, you need to use the command " | ||
- | * 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 | + | * 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 |
- | * If the card is a true Pcmcia | + | * If the card is a true PCMCIA |
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 " | Start by running " | ||
+ | === View iwconfig output === | ||
+ | Run the " | ||
- | ==== View iwconfig | + | === View dmesg output === |
- | Run the " | + | |
- | A common problem is that your system has both ieee80211 | + | Run the " |
+ | Two common issues are: | ||
- | ==== View dmesg output ==== | + | * " |
+ | * Missing firmware | ||
- | Run the " | + | === Missing firmware === |
+ | |||
+ | Some wireless | ||
+ | |||
+ | The message is very clearly detailed in dmesg, it will tell what filename is missing | ||
- | See the next entry of a problem commonly seen: " | + | Files can be manually added to fix the issue but most of the time, firmwares can be found in a package (such as firmware-linux or firmware-linux-nonfree). |
- | ==== " | + | === " |
When loading the driver kernel module you get a " | When loading the driver kernel module you get a " | ||
Line 127: | Line 127: | ||
If you use the RPM package manager then "rpm -qa | grep kernel" | If you use the RPM package manager then "rpm -qa | grep kernel" | ||
- | kernel-headers-2.6.24.4-64.fc8 | + | |
- | | + | kernel-headers-3.10.0-514.2.2.el7.x86_64 |
- | | + | kernel-3.10.0-514.2.2.el7.x86_64 |
- | | + | kernel-3.10.0-327.13.1.el7.x86_64 |
- | | + | kernel-devel-3.10.0-327.el7.x86_64 |
- | | + | kernel-devel-3.10.0-514.2.2.el7.x86_64 |
+ | kernel-devel-3.10.0-327.18.2.el7.x86_64 | ||
+ | kernel-tools-3.10.0-514.2.2.el7.x86_64 | ||
+ | kernel-devel-3.10.0-327.13.1.el7.x86_64 | ||
+ | kernel-3.10.0-327.18.2.el7.x86_64 | ||
+ | kernel-3.10.0-327.el7.x86_64 | ||
In the example above, there are kernel headers and a kernel development package that match the kernel we are running. | In the example above, there are kernel headers and a kernel development package that match the kernel we are running. | ||
Line 139: | Line 144: | ||
yum -y install kernel-devel | yum -y install kernel-devel | ||
- | Lets assume that "uname -r" returned "2.6.24.4-64.fc8" then all the 2.6.24.1-15 ones are old and need to be removed. | + | Lets assume that "uname -r" returned "3.10.0-514.2.2.el7.x86_64" then all the 3.10.0-327 ones are old and need to be removed. |
- | rpm -e 2.6.24.4-64.fc8 | + | rpm -e kernel-3.10.0-327.13.1.el7.x86_64 |
- | rpm -e kernel-2.6.24.1-15.fc8 | + | |
- | rpm -e kernel-devel-2.6.24.1-15.fc8 | + | rpm -e kernel-devel-3.10.0-327.18.2.el7.x86_64 |
+ | rpm -e kernel-devel-3.10.0-327.13.1.el7.x86_64 | ||
+ | rpm -e kernel-3.10.0-327.18.2.el7.x86_64 | ||
+ | rpm -e kernel-3.10.0-327.el7.x86_64 | ||
Also change to "/ | Also change to "/ | ||
Line 150: | Line 158: | ||
- | ==== View lsmod output | + | === View lsmod output === |
Run the " | Run the " | ||
Line 157: | Line 165: | ||
- | ==== View modinfo output | + | === View modinfo output === |
Run " | Run " | ||
+ | === Laptop Specific === | ||
+ | Some laptops have a BIOS setting and/or a physical switch to enable/ | ||
+ | This can be verified in userspace using //rfkill// tool: | ||
+ | To list wireless devices and their status: | ||
- | ==== Blacklisting ==== | + | rfkill list all |
- | 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 | + | A hard block refers to the physical/ |
- | Specifically for madwifi-ng, do a locate or find for ath5k.ko. | + | In order to disable a soft block, the following command will enable wireless functions of all wireless cards on the system: |
- | Same for the other way around: if you want to load ath5k, but madwifi-ng gets loaded instead, add " | + | |
+ | rfkill unblock all | ||
+ | Notes: | ||
- | ==== Reload Driver ==== | + | - A specific wireless interface can be unblocked. |
- | Although it is not very " | + | - For obvious reasons, only a soft block can be disabled. |
- | 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 " | + | ===== Windows ===== |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== mac80211 versus ieee80211 stacks | + | |
- | There is a new wireless stack starting in the mainline kernel since 2.6.22 called mac80211. | + | |
- | + | ||
- | The legacy drivers use the ieee80211 or net80211 stacks. | + | |
- | + | ||
- | So with this as background, here is troubleshooting information for problems that arise when both stacks are installed on a system. | + | |
- | + | ||
- | * The mac80211 driver for your wireless device is not stable or the monitor mode / injection functionality is not working well. | + | |
- | * You are using a mac80211 driver, but your aircrack-ng version is too old to support Radiotap. | + | |
- | * You are using the legacy driver for your device and want to switch to the mac80211 driver. | + | |
- | * The old and new modules conflict. | + | |
- | + | ||
- | You can tell if you are running the new mac80211 stack based on the kernel version or you likely get an error message similar to: | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | mon0: unknown interface: No matching device found | + | |
- | | + | |
- | + | ||
- | or in aircrack-ng v1.0-rc1 and newer: | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | | + | |
- | + | ||
- | Notice the reference to " | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | + | ||
- | | + | |
- | | + | |
- | + | ||
- | Another indicator of the mac80211 driver being loaded is if the output from iwconfig includes: | + | |
- | + | ||
- | | + | |
- | + | ||
- | Notice the reference to " | + | |
- | + | ||
- | Perhaps the most consistent way of determining the stack type of your drivers is running the command "lsmod | grep mac80211." | + | |
- | + | ||
- | | + | |
- | + | ||
- | then the modules at the end of the line are mac80211 drivers. | + | |
- | If the new mac80211 driver | + | Two solutions are available for Windows. Currently, only Airpcap |
- | It is also possible that the new driver is not working because your version of aircrack-ng is too old. Updating to at least 1.0-rc1 often fixes such problems. | + | ==== Airpcap ==== |
- | If you are using a legacy driver, and want to switch to the mac80211 driver, then you need to blacklist the old driver, and enable the new one. If the names of the old and new in-kernel drivers match (for example, with zd1211rw, which is softmac in 2.6.24 and before, but mac80211 in 2.6.25), then you need to upgrade your wireless subsystem (either by updating the kernel or using compat-wireless-2.6). | + | [[https:// |
- | If you have conflicts due to running both drivers, then decide which one you want and blacklist the other one. | + | ==== NPcap ==== |
+ | [[http:// | ||
- | ==== dmesg error " | + | Github repository and downloads can be found [[https:// |
- | When using an USB device and you get a message similar to this from dmesg: | + | Aircrack-ng does not support NPcap yet. It will support it in the near future. |
- | rt73: Firmware loading error | + | ===== BSD ===== |
- | rt73: Failed to load Firmware. | + | |
- | rt73: probe of 1-7:1.0 failed with error -71 | + | |
- | Note: Although the example shows RT73, this applies to any USB driver. | + | Monitor mode support is fairly limited in *BSD distributions. FreeBSD has support for capture and injection with a few drivers. |
- | Here are a few things to check: | + | ==== FreeBSD ==== |
- | | + | Among all *BSD, FreeBSD has the **best** support. |
- | | + | |
- | | + | |
- | | + | |
+ | Documentation on how to put wireless cards in monitor mode (and requirements to load the drivers) is explained in the man pages of each driver: | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
- | ==== Laptop Specific ==== | + | More cards/ |
- | Some laptops have a bios setting and/ | + | When installing |
+ | ===== Resources ===== | ||
+ | * Previous version of this page can be found [[install_drivers_old|here]]. | ||
+ | * [[https:// |
install_drivers.txt · Last modified: 2018/10/05 23:27 by mister_x