How to Get Packet Injection Capable Drivers in Linux « Null Byte :: WonderHowTo

In thisNull Byte, we are going to be installing Packet Injection capable drivers in Linux. These are the open-source drivers required to sniff wireless traffic, inject packets to crack a wireless access point, and go into "monitor-mode". These drivers are superior because they are the fastest available drivers.I did this underArch Linux, but I will assume most of you are usingUbuntu, or at least a variant of it. With that said, I'll be using Ubuntu's "apt-get" package manager, rather than the almighty "pacman" package manager that comes with Arch.Step1Downloading & Installing Kernel HeadersTo do these commands, you will need to open up a terminal window and enter them as typed.First, we need to get the Linux kernel-headers installed. These will allow us to modify and add kernel modules (drivers) without actually messing with the kernel itself.In Ubuntu, they should be installed by default, but just to make sure:sudo apt-get install linux-headers-$(uname -r)If that goes through, error free, proceed to the next step. If you get errors, make sure you're updated. In the terminal, type:sudo apt-get updateStep2Downloading Compat-Wireless Driver Package & PatchesCompat-Wireless is a package that contains all the latest and greatest wireless drivers for Linux.Make sure you have "wget" installed:sudo apt-get install wgetMake sure you're in a directory that you want to have the package in. If you're like me, you're an organization freak when it comes to your directory structures! Use wget to download the compat-wireless package:sudo wget http://www.orbit-lab.org/kernel/compat-wireless-2.6/2011/09/compat-wireless-2011-09-27-p.tar.bz2Now, extract your archive after wget finishes downloading it:sudo tar jxvf compat-wireless-2011-09-27-p.tar.bz2 && cd compat-wireless-2011-09-27We need to download patches for fragment attacks and a fix for a glitch that caused your monitor interface to be stuck on "channel -1".sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patchSecond patch:sudo wget http://patches.aircrack-ng.org/channel-negative-one-maxim.patchStep3Patching the PackageNow to actually run the patches on the compat-wireless package:patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patchAnd:patch -p1 < channel-negative-one-maxim.patchStep4Selecting, Compiling & Installing Wireless ModulesThe script below is to select which driver you want, because by default, compat-wireless will install all of the modules. If you don't know which chipset you have, you can omit this part or follow this guide atCyberCiti../scripts/driver-select <driver-name-here>Now, onward to the compilation and installation:sudo make && sudo make installUnload your previous drivers:sudo make wlunloadLoad your wireless module:sudo modprobe <driver-name-here>If you don't know your driver name, don't worry. You can just reboot, and your computer will automatically load the appropriate drivers.Most, if not all of these commands could've been executed in tandem. I wanted break it down for you so it was easier to understand. Also, this way if any issues occur, you can narrow it down to the specific command.Put any questions you have in the Null ByteForums!Want to start making money as a white hat hacker?Jump-start your hacking career with our2020 Premium Ethical Hacking Certification Training Bundlefrom the newNull Byte Shopand get over 60 hours of training from cybersecurity professionals.Buy Now (90% off) >Other worthwhile deals to check out:97% off The Ultimate 2021 White Hat Hacker Certification Bundle99% off The 2021 All-in-One Data Scientist Mega Bundle98% off The 2021 Premium Learn To Code Certification Bundle62% off MindMaster Mind Mapping Software: Perpetual LicensePhoto byDigiTaL~NomAdRelatedHow To:Check if Your Wireless Network Adapter Supports Monitor Mode & Packet InjectionHow To:Buy the Best Wireless Network Adapter for Wi-Fi Hacking in 2019How to Hack Wi-Fi:Choosing a Wireless Adapter for HackingHow To:Select a Field-Tested Kali Linux Compatible Wireless AdapterHow to Hack Like a Pro:Getting Started with MetasploitHow To:Hack WPA WiFi Passwords by Cracking the WPS PINHow to Hack Wi-Fi:Getting Started with the Aircrack-Ng Suite of Wi-Fi Hacking ToolsVideo:How to Crack Weak Wi-Fi Passwords in Seconds with Airgeddon on Parrot OSHow To:Enable Monitor Mode & Packet Injection on the Raspberry PiHow To:How Hackers Steal Your Internet & How to Defend Against ItHow To:Use Wireshark to Steal Your Own Local PasswordsHow To:Bypass a Local Network Proxy for Free InternetHow To:Get Free Wi-Fi from Hotels & MoreHow To:Get Your AMD Graphics, Sound & Other Drivers to Work in Linux on Your LaptopHow To:Play Emulated Games on Linux with Your Xbox 360 ControllerWeekend Homework:How to Become a Null Byte Contributor (3/2/2012)How To:Fix the Channel -1 Glitch in Airodump on the Latest KernelHack Like a Pro:Hacking Samba on Ubuntu and Installing the MeterpreterHow To:Install Linux to a Thumb DriveIPsec Tools of the Trade:Don't Bring a Knife to a GunfightHow To:Spider Web Pages with Nmap for SQLi VulnerabilitiesHow To:How The Internet Works