install_drivers
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
install_drivers [2010/01/04 10:57] – Added tricks for showing dependant drivers, i.e. ath5k depends on mac80211, etc. hatake_kakashi | install_drivers [2018/10/05 23:27] (current) – [Driver compilation] Update links to Kali patches mister_x | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Installing Drivers ====== | ====== Installing Drivers ====== | ||
===== Linux ===== | ===== Linux ===== | ||
- | 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 | + | ==== Open Source |
+ | Nowadays, most open source drivers make use of cfg80211 (and sometimes mac80211). There are 2 types of wireless cards: | ||
+ | * FullMac | ||
+ | * SoftMac | ||
- | Nearly all non-mac80211 drivers that can support injection need to be patched to support injection in **Monitor mode**. | + | Here is a picture on how the different parts, cfg80211/mac80211/nl80211, work together ([[https:// |
- | Remember you cannot use both ieee80211 and mac80211 versions of the same driver at the same time. You must decide | + | {{https://i.stack.imgur.com/ |
- | \\ | + | |
+ | 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:// | ||
+ | |||
+ | ===FullMac=== | ||
+ | |||
+ | Those wireless cards have [[https:// | ||
+ | |||
+ | With a few exceptions, none of those cards support monitor mode and injection. | ||
+ | |||
+ | ===SoftMac=== | ||
+ | |||
+ | SoftMac wireless cards have MLME handled in software with mac80211. | ||
+ | |||
+ | Most of those do support capture | ||
+ | |||
+ | ==== Vendor drivers ==== | ||
+ | |||
+ | Vendor drivers | ||
+ | |||
+ | |||
+ | 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. | ||
* 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 the latest patches | + | * Always use the latest patches |
- | \\ | + | * [[https://git.kali.org/gitweb/? |
- | Note: if you're using drivers provided by your distribution, | + | |
- | \\ | + | |
- | 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/ | ||
- | | + | **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:// | ||
- | ===== Compat-Wireless Alternative Approach ===== | + | As mentioned previously, the mac80211 drivers quite often support injection out of the box in recent kernels. |
- | As mentioned previously, | + | For full details see the Aircrack-ng |
- | For full details see [[http:// | ||
- | ===== Windows ===== | + | ==== Troubleshooting ==== |
- | + | ||
- | Windows is **NOT** supported. | + | |
- | + | ||
- | + | ||
- | ===== 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 78: | Line 81: | ||
- | ==== 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 | + | === View iwconfig output === |
- | Run the " | + | Run the " |
- | A common problem is that your system has both ieee80211 and mac80211 versions of the drivers. | ||
- | + | === View dmesg output === | |
- | ==== View dmesg output | + | |
Run the " | Run the " | ||
- | See the next entry of a problem commonly seen: " | + | Two common issues are: |
+ | |||
+ | | ||
+ | * Missing firmware | ||
+ | |||
+ | === Missing firmware === | ||
+ | |||
+ | Some wireless cards require a firmware to work. | ||
+ | |||
+ | The message is very clearly detailed in dmesg, it will tell what filename is missing and where it is expecting it. In some cases, the driver can fall back and try previous version of the firmware. | ||
+ | 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 118: | Line 129: | ||
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 130: | Line 146: | ||
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 141: | Line 160: | ||
- | ==== View lsmod output | + | === View lsmod output === |
Run the " | Run the " | ||
Line 148: | Line 167: | ||
- | ==== View modinfo output | + | === View modinfo output === |
Run " | Run " | ||
+ | === Laptop Specific === | ||
- | ==== Blacklisting ==== | + | Some laptops have a BIOS setting and/or a physical switch to enable/ |
- | 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. | + | This can be verified in userspace using //rfkill// tool: |
- | Specifically for madwifi-ng, do a locate or find for ath5k.ko. | + | To list wireless devices |
- | Same for the other way around: if you want to load ath5k, but madwifi-ng gets loaded instead, add " | + | |
+ | rfkill list all | ||
- | ==== Reload Driver ==== | + | A hard block refers to the physical/ |
- | Although it is not very " | + | |
- | For b43 and b43legacy, it might also be necessary to reload | + | In order to disable a soft block, the following command will enable wireless functions |
- | 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. | + | rfkill unblock |
- | 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' | + | Notes: |
- | 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. | + | - A specific wireless interface can be unblocked. |
+ | - For obvious reasons, only a soft block can be disabled. | ||
+ | ===== Windows ===== | ||
- | ==== mac80211 versus ieee80211 stacks ==== | + | Two solutions |
- | 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 is not working to your satisfaction then you will have to blacklist it and then use the ieee80211 legacy version. The wiki driver section on this page has links to the various drivers. | + | |
- | 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.1262599069.txt.gz · Last modified: 2010/01/04 10:57 by hatake_kakashi