PDA

View Full Version : HOW TO FIX Airodump-ng fixed channel -1 Kali kernel 3.12 also on rt2870/3070usb



Devil_D
2014-03-03, 23:25
I noticed that after the latest updates of Kali linux aircrack-ng in some cases has stopped working properly
reading a little, the diff of the new driver backport I noticed that the new wireless driver inhibit the proper functioning of the monitor when an interface up, this in addition to causing the malfunction of airodump-ng (aircrack tool) prevents the use social engineering attacks. For this I have moved in search of a quick and practical solution especially working on the new driver backport because the old patch channel-negative-one-maxim.patch it is no longer usable.Giving an eye on the internet I could not find a patch interesting,http://www.mathyvanhoef.com/2012/09/compat-wireless-injection-patch-for.html,This patch adds a lot of new drivers fix , everything can be read directly from the blog Mathy Vanhoef. thanks to this patch, and another patch that I created to measure following the guidelines of Mathy Vanhoef are able to permanently solve the problem of channel -1
This solution removes the channel -1, on any wireless drivers

here's how to :
Download backport driver 3.12-1 and extract :
1

cd /usr/src/
2

sudo wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.12/backports-3.12-1.tar.bz2
3

sudo tar xvf backports-3.12-1.tar.bz2
4

cd backports-3.12-1
5

sudo apt-get install patch
download and apply patch
6

sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
7

sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
download compatdrivers_chan_qos_frag.patch by Mathy Vanhoef I recommend using this because I have correct offset
8

sudo wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download
9

patch -p1 < compatdrivers_chan_qos_frag.patch
download my patch
10

sudo wget -Ofix-channel-negative-1-on-new-backport-by-Devil_D.patch http://pastebin.com/wPwAJaQC
11

patch -p1 < fix-channel-negative-1-on-new-backport-by-Devil_D.patch

if you do not know what is the proper wireless drivers type and go on step 14
12

make old config
13
if you know your driver type for example i have rt2870/3070 i type
make deconfig-wifi To know which driver you just run in terminal airmon-ng

make defconfig-alx
make defconfig-ar5523
make defconfig-ath10k
make defconfig-ath5k
make defconfig-ath6kl
make defconfig-ath9k
make defconfig-b43
make defconfig-b43legacy
make defconfig-brcmfmac
make defconfig-brcmsmac
make defconfig-carl9170
make defconfig-drm
make defconfig-ieee802154
make defconfig-iwlwifi
make defconfig-media
make defconfig-nfc
make defconfig-regulator
make defconfig-rtlwifi
make defconfig-wifi
make defconfig-wil6210
14

make
15

make install
16

update-initramfs -u
17

reboot


I hope it help :) Happy Hacking
as always :) I apologize for the English mistakes are the fault of google translate :)
and I thank the sources
Mathy Vanhoef http://www.mathyvanhoef.com/2012/09/compat-wireless-injection-patch-for.html
Devil_D
J0K3R-BHS
thanks for the correction of the patch goes to feelingfree

Mad Medik
2014-03-04, 00:51
Devil_D thanks!

I need the driver for the RTL8187L. That doesn't appear in the defconfig list. I *think* I'm supposed to use the rtfwifi? In lines 10 & 11 you have rt28703070. Do I change that to rtlwifi?

eg 9.
sudo wget -Ofix-channel-1-and-fix-rtlwifi-new-backport-Devil_D.patch http://www.pastie.org/pastes/8846775/download

Thanks

dataghost
2014-03-04, 02:49
its working with my ath9k, my usb2800,3070 isnt showing up now, how to I add more then one wireless driver to this? thanks again, this is the only thing thats removed the channel -1 error

Devil_D
2014-03-04, 09:13
Devil_D thanks!

I need the driver for the RTL8187L. That doesn't appear in the defconfig list. I *think* I'm supposed to use the rtfwifi? In lines 10 & 11 you have rt28703070. Do I change that to rtlwifi?

eg 9.
sudo wget -Ofix-channel-1-and-fix-rtlwifi-new-backport-Devil_D.patch http://www.pastie.org/pastes/8846775/download

Thanks


no mad medik you haven't to change the name of the patch, that is a generic name that I gave to the patch
You need to follow the guide up to Step 11
skipping step 12
then you have to keep it that way

make defconfig-rtlwifi

make

make install

reboot

Devil_D
2014-03-04, 14:42
its working with my ath9k, my usb2800,3070 isnt showing up now, how to I add more then one wireless driver to this? thanks again, this is the only thing thats removed the channel -1 error

try in this way

cd /usr/src/backports-3.12-1

make uninstall

update-initramfs -u

rm -r /usr/src/backports-3.12-1

reboot
after reboot type

sudo tar xvf backports-3.12-1.tar.bz2

cd /usr/src/backports-3.12-1
follow the guide from step 6 to step 11

make oldconfig
press enter to any question, at the end

make

make install

update-initramfs -u
and

reboot

J0K3R-BHS
2014-03-05, 17:28
well Devil_D nice effort, but i had already made a thread on the forum, there was no need to make another identical

Mad Medik
2014-03-08, 16:31
Thanks for your help Devil_D,

I notice rtlwifi installs drivers for RTL8188, 8192 BUT NOT for RTL8187. Can you make a deconfig to install the drivers for RTL8187 please?

MM

Devil_D
2014-03-09, 10:30
Thanks for your help Devil_D,

I notice rtlwifi installs drivers for RTL8188, 8192 BUT NOT for RTL8187. Can you make a deconfig to install the drivers for RTL8187 please?

MM
Mad Medik you're right,for the rtl8187 driver need to enter the following command

make deconfig-wifi
and not

make deconfig-rtlwifi
and you will see that the installation will be successful I hope will help you

Mad Medik
2014-03-09, 21:31
Thanks for getting back to me. User Mentu says that he tried that but it did not work (https://forums.kali.org/showthread.php?19863-Aircrack-channel-1-after-apt-get-upgrade/page7).

I will try it myself and report back.

dataghost
2014-04-13, 19:04
didnt see this thank you sir


try in this way

cd /usr/src/backports-3.12-1

make uninstall

update-initramfs -u

rm -r /usr/src/backports-3.12-1

reboot
after reboot type

sudo tar xvf backports-3.12-1.tar.bz2

cd /usr/src/backports-3.12-1
follow the guide from step 6 to step 11

make oldconfig
press enter to any question, at the end

make

make install

update-initramfs -u
and

reboot

dataghost
2014-04-13, 21:51
I have tried this and its still now allowing my usb2800 to show up, originally i used make defconfig-ath9k for my internal card, but still no luck on the other card, i would appreciate any help. Thanks so much


try in this way

cd /usr/src/backports-3.12-1

make uninstall

update-initramfs -u

rm -r /usr/src/backports-3.12-1

reboot
after reboot type

sudo tar xvf backports-3.12-1.tar.bz2

cd /usr/src/backports-3.12-1
follow the guide from step 6 to step 11

make oldconfig
press enter to any question, at the end

make

make install

update-initramfs -u
and

reboot

Devil_D
2014-04-17, 14:47
I have tried this and its still now allowing my usb2800 to show up, originally i used make defconfig-ath9k for my internal card, but still no luck on the other card, i would appreciate any help. Thanks so much
please post card model or driver and i try to help you

dataghost
2014-04-17, 15:11
Ok i will do when i am home again, how do i go upon adding a second driver? Bus 003 Device 002: ID 0846:9012 NetGear, Inc, it works nativly on kali and monitor mode is great, its long range 40 dbi adapter. Ralink RT3573 is the adapter and in monitor mode it starts mon0 at 2800 usb. Thanks again

dataghost
2014-04-17, 15:54
i ran airmon-ng and i have the exact same model as you do on my secondary wireless card rt2870/3070, so ath9k is my primary card and i got rid of channel -1 error with your guide, i just now need to figure out the second card as well. Sorry for all the posts I am just trying to get this figured out. Thanks again

dataghost
2014-04-20, 15:14
the only way im getting both cards working is by usimg make oldconfig i still need to use airmon-ng check kill to get rid of channel -1 somethings not right

Devil_D
2014-04-21, 09:44
the only way im getting both cards working is by usimg make oldconfig i still need to use airmon-ng check kill to get rid of channel -1 somethings not right
I'm sorry if I answer only now
I gave a look to the configuration file tries to give

make defconfig-wifi
and not

make old config

I think that this should solve the problem let me know if it is successful for safety uninstall reconfigure and reinstall the driver
sorry again if I answer only now

madmax111
2014-05-02, 19:46
I noticed that after the latest updates of Kali linux aircrack-ng in some cases has stopped working properly
reading a little, the diff of the new driver backport I noticed that the new wireless driver inhibit the proper functioning of the monitor when an interface up, this in addition to causing the malfunction of airodump-ng (aircrack tool) prevents the use social engineering attacks. For this I have moved in search of a quick and practical solution especially working on the new driver backport because the old patch channel-negative-one-maxim.patch it is no longer usable.Giving an eye on the internet I could not find a patch interesting,http://www.mathyvanhoef.com/2012/09/compat-wireless-injection-patch-for.html,This patch adds a lot of new drivers fix , everything can be read directly from the blog Mathy Vanhoef. thanks to this patch, and another patch that I created to measure following the guidelines of Mathy Vanhoef are able to permanently solve the problem of channel -1


I've followed your instructions, the fixed channel -1 is gone now, but my alfa AWUS036NHA with ath9k driver is now stuck on channel 1! airodump-ng can scan only on channel 1 and if I try manually to look for a network on another channel just doesn't show up.. How can I fix it?

pong112
2014-05-03, 07:01
i can't fix channel -`1 masage shown :

sudo make

/--------------
| Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)
\--
make[1]: *** [modules] Error 1
make: *** [default] Error 2

sudo make install

/--------------
| Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)
\--
make: *** [install] Error 1

nukemonk
2014-05-04, 10:11
i can't fix channel -`1 masage shown :

sudo make

/--------------
| Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)
\--
make[1]: *** [modules] Error 1
make: *** [default] Error 2

As it said you need to install kernel headers:

sudo apt-get install linux-headers-$(uname -r)


That should fix.


I've followed your instructions, the fixed channel -1 is gone now, but my alfa AWUS036NHA with ath9k driver is now stuck on channel 1! airodump-ng can scan only on channel 1 and if I try manually to look for a network on another channel just doesn't show up.. How can I fix it?

Same problem here. I've had this -1 error since the first release of backtrack 5. Been able to fix with compat-wireless and patch but now with backports and your fix I get channel one.
I have Ralink 2561 PCI module. (RT61PCI driver)

kali900
2014-05-06, 13:14
I got the same problem, after patched the backportsfiles - run make defconfig-rtlwifi - I get this error:

Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)


sudo apt-get install linux-headers-$(uname -r) - does not fix the error? (no linux-headers3.12-kali1-amd64 found ) How can I fix that problem?

Jerome
2014-05-18, 15:00
I've followed your instructions, the fixed channel -1 is gone now, but my alfa AWUS036NHA with ath9k driver is now stuck on channel 1! airodump-ng can scan only on channel 1 and if I try manually to look for a network on another channel just doesn't show up.. How can I fix it?

Hi, same issue here! Same card as well. Did you manage to fix it?

seen_bawl
2014-05-22, 00:47
i follow your steps
when i inter command make old config

i got this


root@kali:/usr/src/backports-3.12-1# make deconfig-wifi
/--------------
| Your kernel headers are incomplete/not installed.
| Please install kernel headers, including a .config
| file or use the KLIB/KLIB_BUILD make variables to
| set the kernel to build against, e.g.
| make KLIB=/lib/modules/3.1.7/
| to compile/install for the installed kernel 3.1.7
| (that isn't currently running.)
\--
make: *** [deconfig-wifi] Error 1

seen_bawl
2014-05-22, 02:41
here is a fast way to fix work for me

ifconfig wlan0 down
iwconfig wlan0 mode monitor
ifconfig wlan0 up
iwconfig wlan0

feelingfree
2014-06-09, 02:17
Dear Devil_D

I found mistake in your patch
it cause patch failed and probleam not fix correctly.
I upload new patch to

http://pastebin.com/wPwAJaQC

please check.

Devil_D
2014-06-09, 17:20
Dear Devil_D

I found mistake in your patch
it cause patch failed and probleam not fix correctly.
I upload new patch to

http://pastebin.com/wPwAJaQC

please check.
many thanks feelingfree for letting me know, I will update the link in the guide thanks a lot

dataghost
2014-06-20, 02:26
how do you fix this with the new 3.14 kernel, i have tried using this method using https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.14/backports-3.14-1.tar.gz kernel and i am having no luck, previously you said to not use make oldconfig but instead to use make-defconfig-wifi and i am having no luck at all. Please help if you can, Thank you

cubdukat
2014-06-25, 23:49
So far I've tried to do this at least six times with Kali 1.0.6, and every single time I have managed to bork my wireless to the point where I have to reinstall. The last time I did it, I just reinstalled Kali 1.0.7 over it hoping that the problem would be fixed. Needless to say, it wasn't. I've tried using the "-ignore-negative-one" flag when I capture, but it doesn't seem to work.

One thing I had noticed is that when I applying the patches, I was getting errors. Unfortunately, the only way I could show what errors I got was if I attempted it again, and I finally got my install to where I like it, so needless to say, that's all but a non-starter.

Is it possible there's something I'm missing? I can't understand why it's not working for me when it's working for everyone else.

dataghost
2014-06-28, 14:35
what type of card are you using cubdukat


So far I've tried to do this at least six times with Kali 1.0.6, and every single time I have managed to bork my wireless to the point where I have to reinstall. The last time I did it, I just reinstalled Kali 1.0.7 over it hoping that the problem would be fixed. Needless to say, it wasn't. I've tried using the "-ignore-negative-one" flag when I capture, but it doesn't seem to work.

One thing I had noticed is that when I applying the patches, I was getting errors. Unfortunately, the only way I could show what errors I got was if I attempted it again, and I finally got my install to where I like it, so needless to say, that's all but a non-starter.

Is it possible there's something I'm missing? I can't understand why it's not working for me when it's working for everyone else.

freq
2014-06-28, 19:00
I've been struggling with this for a week now. I just did a complete reinstall, updated & upgrade. Confirmed that reaver doesnt work, aireplay gets stuck on channel -1, but airodump does properly hop through channels.

Following the instructions for this driver backport port at step 9 I get:
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 succeeded at 1490 (offset 8 lines).
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 480 with fuzz 1

anyone have any suggestions?

thanks in advance

freq
2014-06-28, 19:19
heres the reject file, the only part of which I understand is the comment:

cat net/mac80211/cfg.c.rej
--- net/mac80211/cfg.c Tue May 28 16:57:23 2013 -0400
+++ net/mac80211/cfg.c Tue May 28 17:16:15 2013 -0400
@@ -826,7 +826,8 @@
ret = ieee80211_vif_use_channel(sdata, chandef,
IEEE80211_CHANCTX_EXCLUSIVE);
}
- } else if (local->open_count == local->monitors) {
+ // Patch: Always allow channel change, even if a normal virtual interface is present
+ } else /*if (local->open_count == local->monitors)*/ {
local->_oper_channel = chandef->chan;
local->_oper_channel_type = cfg80211_get_chandef_type(chandef);
ieee80211_hw_config(local, 0);

dataghost
2014-07-05, 12:57
I too am looking for a fix as well, have not been able to fix channel -1 issue in Parrot os, and Ralink RT2870/3070 driver when running reaver has issues, failed to associate, even used airplay to authenticate, my ath9k driver seems to work thought im confused.


heres the reject file, the only part of which I understand is the comment:

cat net/mac80211/cfg.c.rej
--- net/mac80211/cfg.c Tue May 28 16:57:23 2013 -0400
+++ net/mac80211/cfg.c Tue May 28 17:16:15 2013 -0400
@@ -826,7 +826,8 @@
ret = ieee80211_vif_use_channel(sdata, chandef,
IEEE80211_CHANCTX_EXCLUSIVE);
}
- } else if (local->open_count == local->monitors) {
+ // Patch: Always allow channel change, even if a normal virtual interface is present
+ } else /*if (local->open_count == local->monitors)*/ {
local->_oper_channel = chandef->chan;
local->_oper_channel_type = cfg80211_get_chandef_type(chandef);
ieee80211_hw_config(local, 0);

socal93
2014-07-06, 19:41
I have been having the same issuewith the aircrack suite, I was reading somewhere that it was the libpcap0.8 and i downgraded it and it ended up uninstalling a bunch of tools.


I have the 3.14 kernal, I just upgraded from backtrack to kali..


Interface Chipset Driver

wlan1 Ralink RT2870/3070 rt2800usb - [phy1]
wlan0 Unknown rtl8192ce - [phy0]



Will the patch work with 3.14 kernal or do i need another patch ?

dataghost
2014-07-09, 21:32
I am still having issues with backports on almost every distro after updating, im hoping to hear back from Devil as he seems to be one of the guru's

dataghost
2014-07-20, 16:18
i reinstalled kali, and now with no luck at all at getting this to work, the new kernel in kali 1.07 3.14 i cant seem to make this meathod work. I have tried different backports, 3.14.1 and 3.16.5 and have followed the same steps, I was told before to use make defconfig-wifi instead of make oldconfig, i have tried both, ive tried make menuconfig etc with no luck, i still am getting the channel -1 error. Any input would be great i cant get past this issue. Please and thanks, Also Devil when i apply your negative one patch it fails to patch correctly.

Please help, thanks in advanced

forumkali@yopmail.com
2014-07-27, 17:11
does kali 1.0.8 fix the problem? thanks

Devil_D
2014-07-31, 17:17
notice to all soon post the updated guide I apologize to everyone if I do not answer but I have no way excuse me because I'm on vacation all the time driving on the new kernel does not work because the patch must be corrected offsett



ALIEN ARENA

mmg
2014-08-02, 19:30
well Devil_D nice effort, but i had already made a thread on the forum, there was no need to make another identical

make[7]: *** [/usr/src/backports-3.12-1/drivers/net/wireless] Error 2
make[6]: *** [_module_/usr/src/backports-3.12-1] Error 2
make[5]: *** [sub-make] Error 2
make[4]: *** [all] Error 2
make[3]: *** [modules] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make: *** [default] Error 2

I got the above error in kali 1.0.8 adn my card is here Ralink RT2870/3070 rt2800usb - [phy1]

Anyone help me out. please .

mmg
2014-08-02, 19:41
I got make error for my card Ralink RT2870/3070 rt2800usb - [phy1]
I using kali 1.0.8
Linux kali 3.14-kali1-686-pae #1 SMP Debian 3.14.5-1kali1 (2014-06-07) i686 GNU/Linux

help me out , please.

dataghost
2014-08-06, 03:10
apt-get install gcc make linux-headers-$(uname -r) try that first

what backport are you trying, propaply the old 3.12 kernel which isnt working for me try this. This is copy and pasted from the backbox forums

I saw so many pain in the *** with same issue, over, and over again. I'm sure that you are just lazy like any *** on summer day.

Maybe our wiki is not good for you, or it can't click and make copy/paste in your place.

This tutorial was tested with "Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter" some China SignalKing adapter. Same ralink run with Alfa AWUS036NH version.

I will try to resolve all this mess from last few months with one line of command (or two, first need reboot), if you you have some issues, keep me posted or move your *** and give some solution. I don't have time to write bash script for this. First run system update.

Quote
sudo -i; apt-get update; apt-get upgrade; apt-get install linux-headers-generic-lts-saucy build-essential; reboot

Run this if you are not already root:

sudo -i

Then:

Quote
cd /usr/src/;wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.15.1/backports-3.15.1-1.tar.gz; tar -zxvf backports-*; cd backports-*; apt-get install patch; wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch; patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch; wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download; patch -p1 < compatdrivers_chan_qos_frag.patch; make defconfig-wifi; make; make install; update-initramfs -u; echo "REBOOT"; sleep 5; reboot

And you are done ! If this don't help you, then do something better, like fishing Smiley

If you want to remove all what you just made before and start from 0 run this command:

Quote
sudo -i; cd /usr/src/backports-*; make uninstall; cd .. ; sudo rm -rf /usr/src/backports-*

ATH5K same lines just last one is (run as root, type sudo -i)

Quote
cd /usr/src/;wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.15.1/backports-3.15.1-1.tar.gz; tar -zxvf backports-*; cd backports-*; apt-get install patch; wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch; patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch; wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download; patch -p1 < compatdrivers_chan_qos_frag.patch; make defconfig-ath5k; make; make install; update-initramfs -u; echo "REBOOT"; sleep 5; reboot

I tested this with my laptop with Atheros AE242x / AR542X Wireless Adapter, scanning and injection are working Wink

ATH9K same lines just last one is (run as root, type sudo -i to get your root)

Then:


Quote
cd /usr/src/;wget https://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.15.1/backports-3.15.1-1.tar.gz; tar -zxvf backports-*; cd backports-*; apt-get install patch; wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch; patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch; wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download; patch -p1 < compatdrivers_chan_qos_frag.patch; make defconfig-ath9k; make; make install; update-initramfs -u; echo "REBOOT"; sleep 5; reboot

Tested on adapter with Atheros AR9280 chipset.

Cheers!


Edit:
Swearing

zafkopoulo
2014-09-03, 18:52
hi guys, can someone help me?
code patch -p1 < compatdrivers_chan_qos_frag.patch

patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 succeeded at 1490 (offset 8 lines).
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 480 with fuzz 1.

dataghost
2014-09-05, 22:25
I had the same issue, for channel -1 fix what worked and saved loads of headaches was after monitor mode is started just bring that wireless device down so if wlan1 is your device, use this. airmon-ng start wlan1 and after mon0 is created, use ifconfig wlan1 down. That was all I had to do and things work great not negative 1 issue and no problems


hi guys, can someone help me?
code patch -p1 < compatdrivers_chan_qos_frag.patch

patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 succeeded at 1490 (offset 8 lines).
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 480 with fuzz 1.

tkd-alex
2014-09-06, 19:26
Hello I have this error when i applying the patch:


patch -p1 < fix-channel-negative-1-on-new-backport-by-Devil_D.patch
(Stripping trailing CRs from patch.)
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 FAILED at 252.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/wireless/rtl818x/rtl8187/dev.c.rej
(Stripping trailing CRs from patch.)
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
(Stripping trailing CRs from patch.)
patching file net/mac80211/tx.c
Hunk #1 FAILED at 1482.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/tx.c.rej
(Stripping trailing CRs from patch.)
patching file net/wireless/chan.c
Reversed (or previously applied) patch detected! Assume -R? [n] r
Apply anyway? [n] y
Hunk #1 FAILED at 480.
1 out of 1 hunk FAILED -- saving rejects to file net/wireless/chan.c.rej
patch unexpectedly ends in middle of line


and when I use the make command I have this error:


make[8]: *** [/usr/src/backports-3.12-1/drivers/net/wireless/mac80211_hwsim.o] Error 1
make[7]: *** [/usr/src/backports-3.12-1/drivers/net/wireless] Error 2
make[6]: *** [_module_/usr/src/backports-3.12-1] Error 2
make[5]: *** [sub-make] Error 2
make[4]: *** [all] Error 2
make[3]: *** [modules] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2


anyone can help me? sorry for my bad english

crypts3c
2014-09-09, 21:25
apt-get install gcc make linux-headers-$(uname -r) try that first

what backport are you trying, propaply the old 3.12 kernel which isnt working for me try this. This is copy and pasted from the backbox forums

I saw so many pain in the *** with same issue, over, and over again. I'm sure that you are just lazy like any *** on summer day.

Maybe our wiki is not good for you, or it can't click and make copy/paste in your place.

This tutorial was tested with "Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter" some China SignalKing adapter. Same ralink run with Alfa AWUS036NH version.

I will try to resolve all this mess from last few months with one line of command (or two, first need reboot), if you you have some issues, keep me posted or move your *** and give some solution. I don't have time to write bash script for this. First run system update.

Quote
sudo -i; apt-get update; apt-get upgrade; apt-get install linux-headers-generic-lts-saucy build-essential; reboot

Run this if you are not already root:
!
<<<<<<<<<<<<<<snipp>>>>>>>>>>>>>>>>>>



I appreciated dataghost reply.... despite the fact that it was rather surly, he did summarize a lot of things with enough detail to remove some prior confusion.

However.... I encounter the same issue as others in this thread... Namely when it comes to running the apparent "custom patch" , or -Ocompatdrivers_chan_qos_frag.patch from http://www.pastie.org/pastes/8846771/download.

When I patch using this patch file, I get the following:

root@kali - $ patch -p1 < compatdrivers_chan_qos_frag.patch
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 succeeded at 251 (offset -1 lines).
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 FAILED at 1482.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/tx.c.rej
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 689 with fuzz 1 (offset 209 lines).


Now iirespective of the output of the remaining steps, I highly question the integrity of any of it since I get this error (shown above).

And...just as an FYI... this exact same problem has happened to me since the beginning of the thread.... I always get an error when patching with this "custom" patch.

Thanks you for an advice in advance. By the way, I am using this for airbase-ng, and other items, primarily in trying to (once again) fine-tune an easy-cred type script based on some recent defcon presentations.

Thanks!
Paul

PS: I am using ath9K (AR9271 chipset).


Edit: Quote Swearing

pedropt
2014-09-11, 18:57
Code:


root@kali - $ patch -p1 < compatdrivers_chan_qos_frag.patch
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 succeeded at 251 (offset -1 lines).
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 FAILED at 1482.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/tx.c.rej
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 689 with fuzz 1 (offset 209 lines).

that is problably hapenning because who created the thread does now know very well how things work .

these are his instructions ::
Downloading a frag+ack patch
sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch

applying that patch :
sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch

and then he tells everybody to download another frag+ack patch because it have the correct offset !!!
Downloading
sudo wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download

patching again !!!!
patch -p1 < compatdrivers_chan_qos_frag.patch

so why did he write the first patch ?

and to terminate he tells to download the patch to ignore the negative channel on airodump-ng
sudo wget -Ofix-channel-negative-1-on-new-backport-by-Devil_D.patch http://pastebin.com/wPwAJaQC

and patch it .

patch -p1 < fix-channel-negative-1-on-new-backpo

this is the most confuse explanation in this forum .
I downloaded the latest backports 3.17 rc3 , and i am figuring out how to do it correctly , but i think you only need these patches : 1 & 3 , or 2 & 3 , and not 1,2,3 .

PePeLeGal
2014-09-13, 13:48
When I get this bug, channel -1, I run these commands:
airmon-ng check kill
ifconfig wlan0 down
airmon-ng start wlan0
airbase-ng <your commands>

I don't know why, but works.

digaogt
2014-09-14, 02:46
Hi everyone!
I'm trying to patch my rtl8188eu. Is there any patch for this available? How can I find it? I figured out that this is a pretty recent driver, right? It's never shows up when I run airmon-ng after I try to patch it as suggested at the beginning.
That's important to say that I'm trying this with a Kali installed in a VirtualBox.

pedropt
2014-09-15, 11:34
patches results


root@kali:/usr/src# cd backports-3.14-1
root@kali:/usr/src/backports-3.14-1# sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
--2014-09-15 17:10:42-- http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
Resolving patches.aircrack-ng.org (patches.aircrack-ng.org)... 213.186.33.2, 2001:41d0:1:1b00:213:186:33:2
Connecting to patches.aircrack-ng.org (patches.aircrack-ng.org)|213.186.33.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `mac80211.compat08082009.wl_frag+ack_v1.patch'

[ <=> ] 1,049 --.-K/s in 0s

2014-09-15 17:10:43 (44.4 MB/s) - `mac80211.compat08082009.wl_frag+ack_v1.patch' saved [1049]

root@kali:/usr/src/backports-3.14-1# sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
patching file net/mac80211/tx.c
Hunk #1 succeeded at 784 (offset 107 lines).
root@kali:/usr/src/backports-3.14-1# sudo wget -Ocompatdrivers_chan_qos_frag.patch http://www.pastie.org/pastes/8846771/download
--2014-09-15 17:11:25-- http://www.pastie.org/pastes/8846771/download
Resolving www.pastie.org (www.pastie.org)... 162.159.243.119, 162.159.244.119, 2400:cb00:2048:1::a29f:f477, ...
Connecting to www.pastie.org (www.pastie.org)|162.159.243.119|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `compatdrivers_chan_qos_frag.patch'

[ <=> ] 3,049 --.-K/s in 0.001s

2014-09-15 17:11:25 (3.52 MB/s) - `compatdrivers_chan_qos_frag.patch' saved [3049]

root@kali:/usr/src/backports-3.14-1# patch -p1 < compatdrivers_chan_qos_frag.patch
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 succeeded at 251 (offset -1 lines).
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 succeeded at 1542 (offset 60 lines).
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 633 with fuzz 1 (offset 153 lines).
root@kali:/usr/src/backports-3.14-1# sudo wget -Ofix-channel-negative-1-on-new-backport-by-Devil_D.patch http://pastebin.com/wPwAJaQC
--2014-09-15 17:11:58-- http://pastebin.com/wPwAJaQC
Resolving pastebin.com (pastebin.com)... 141.101.112.16, 190.93.243.15, 190.93.240.15, ...
Connecting to pastebin.com (pastebin.com)|141.101.112.16|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `fix-channel-negative-1-on-new-backport-by-Devil_D.patch'

[ <=> ] 26,680 --.-K/s in 0.03s

2014-09-15 17:11:58 (966 KB/s) - `fix-channel-negative-1-on-new-backport-by-Devil_D.patch' saved [26680]

root@kali:/usr/src/backports-3.14-1# patch -p1 < fix-channel-negative-1-on-new-backport-by-Devil_D.patch
(Stripping trailing CRs from patch.)
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 FAILED at 252.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/wireless/rtl818x/rtl8187/dev.c.rej
(Stripping trailing CRs from patch.)
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
(Stripping trailing CRs from patch.)
patching file net/mac80211/tx.c
Hunk #1 FAILED at 1482.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/tx.c.rej
(Stripping trailing CRs from patch.)
patching file net/wireless/chan.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file net/wireless/chan.c.rej
patch unexpectedly ends in middle of line
root@kali:/usr/src/backports-3.14-1# make defconfig-wifi
Generating local configuration database from kernel ... done.
cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o conf.o conf.c
cc -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -c -o zconf.tab.o zconf.tab.c
cc conf.o zconf.tab.o -o conf
boolean symbol HWMON tested for 'm'? test forced to 'n'
boolean symbol HWMON tested for 'm'? test forced to 'n'
#
# configuration written to .config
#

Nick_the_Greek
2014-09-15, 21:05
To get rid of negative channel you can:
1) Kill-stop network-manager

service network-manager stop
or as PePeLeGal wrote above:

airmon-ng check kill
or to exclude the interface that you want to use from controlling by network manager:
https://forums.kali.org/showthread.php?22612-Airbase-ng-hangs-with-TP-LINK-WN722N-USB-Card&p=36962&viewfull=1#post36962

exxy
2014-09-18, 23:44
first off big thanks to everyone who has attempted to fix this over the last couple of months.

I run kali and keep it upto date on a separate laptop (just a compaq of all things) and use both the internal wifi card (ath9k) and a Danets NextG Yagi (rt2870/3070usb).

i beleive that i have pretty much ran into the same errors as everyone else but from following this thread, this link (http://black-hat-sec.org/index.php/topic,175.0.html) (Black Hat Sec Forum) and then following it up with this link (http://black-hat-sec.org/index.php/topic,63.0.html) Auto Script by D4RkNiK0l4s.

Between these 3 activities i have managed to get my internal card (ath9k) back and working well without the need for --ignore-negative-one switches however the RT2870/3070 is now not recognised at all.

I have read also that the patch detailed above, only resolves issues with 1 card and cant work where multiple cards are present on the one machine. Not sure of the validity of that however thought i would put it out there.

If anyone who has successfully resolved the issue with the rt2870/3070 drivers has information on how to proceed then it would be greatly appreciated, however from the findings i have seen it looks like i should be best off getting another card which is backports compatible?

thanks

exxy

Northern Lights
2015-01-02, 00:05
I tried this, but it didn't work due to various errors when patching after that when running make.

Also my RT2870/3070 card sometimes is able to inject packages, but then I run reaver or airodump-ng for example and after that it gets the No Answer... 0 APs found error.
It's quite obvious that reaver CAN'T work for me, if packet injection suddenly stops working; because of that I tried to run the patch, but obviously failed terribly.


I'm really confused about Kali in general aswell. After I installed it freshly, it works fine, but then I run the general updates & upgrades and after that it gets fsck error when booting up - reinstalled Kali 4 times so far, but that's just a side now really.

brunoaduarte
2015-12-12, 22:34
I'm not able to install these patches on Kali 2.0. I get error on "compatdrivers_chan_qos_frag" and "fix-channel-negative-1-on-new-backport-by-Devil_D"

Is it normal ?



root@kali:~/Downloads/regulatory/backports-3.12-1# ls
COPYING
Kconfig
MAINTAINERS
Makefile
Makefile.build
Makefile.kernel
Makefile.real
backport-include
compat
compatdrivers_chan_qos_frag.patch
defconfigs
drivers
fix-channel-negative-1-on-new-backport-by-Devil_D.patch
include
kconf
mac80211.compat08082009.wl_frag+ack_v1.patch
net
scripts
udev
versions

root@kali:~/Downloads/regulatory/backports-3.12-1# patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
patching file net/mac80211/tx.c
Hunk #1 succeeded at 763 (offset 86 lines).

root@kali:~/Downloads/regulatory/backports-3.12-1# patch -p1 < compatdrivers_chan_qos_frag.patch
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
patching file net/mac80211/tx.c
Hunk #1 succeeded at 1490 (offset 8 lines).
patching file net/wireless/chan.c
patch unexpectedly ends in middle of line
Hunk #1 succeeded at 480 with fuzz 1.

root@kali:~/Downloads/regulatory/backports-3.12-1# patch -p1 < fix-channel-negative-1-on-new-backport-by-Devil_D.patch
(Stripping trailing CRs from patch; use --binary to disable.)
patching file drivers/net/wireless/rtl818x/rtl8187/dev.c
Hunk #1 FAILED at 252.
1 out of 1 hunk FAILED -- saving rejects to file drivers/net/wireless/rtl818x/rtl8187/dev.c.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file net/mac80211/cfg.c
Hunk #1 FAILED at 826.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/cfg.c.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file net/mac80211/tx.c
Hunk #1 FAILED at 1482.
1 out of 1 hunk FAILED -- saving rejects to file net/mac80211/tx.c.rej
(Stripping trailing CRs from patch; use --binary to disable.)
patching file net/wireless/chan.c
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n] y
Hunk #1 FAILED at 480.
1 out of 1 hunk FAILED -- saving rejects to file net/wireless/chan.c.rej
patch unexpectedly ends in middle of line