Patching WiFi Drivers for Wireless Network Security Analysis


*A linux box with aircrack-ng installed and the proper unpatched drivers installed for your wireless NIC

*Command line Interface

There are a few things to keep in mind when doing this (as I am sure most of you already know):
*Card compatibility:
-Some chipsets or firmwares do not support either packet injection or monitor mode. Some unsupported adapter brands are:Hermes, Aironet and Marvell
-A compatibility matrix and driver table can be found here:
-you need these things installed to enable certain features.
>you need kernel headers that match your current kernel version
>you need the same gcc version as what was used to compile your kernel
+example gcc 3.4.6 can be used with a kernel that was compiled with gcc 3.4.2. The 3.4 being the focus and most important to pay attention to.
>Use the latest patches for your card that you can find. They can be found here:
These are generic instructions on patching wireless drivers
specific instructions for your card can be found on this page:
you will be working by command line to compile and install these patches
you want to run all the commands as root if possible

Step 1:

Download the patch for your driver
**command line command**
"wget "url to patch"
example: "wget"

Once you have downloaded the patch you need to move it to the appropriate directory. The "appropriate directory can be determined in one of three ways:

> The Same directory as the driver(s) to be patched.
> On directory above the latter.
> /usr/src/linux or similar when patching kernel modules

Step 2:

Run the patch command:
patch -Np0

$> -N means don't apply the patch if it has already been installed
$> -p0 means the number of directories to strip from the file names within the patch. You may need to use -p1, -p2, -p3, etc. to fit the directory structure of your system

If you want to test the patching process you can use:

patch -Np0 --dry-run --verbose -i

<*Troubleshooting guide in the works, stay tuned for more info*>

This is only a generic patching tutorial and is in no way fully complete or suitable to all systems. it is a jumping off point on the road to wireless network security analysis.

if you want to read more visit the links above.