Author Topic: iwlwifi driver vs aireplay-ng = mon0 ch -1 :-(  (Read 17968 times)

kko

  • Guest
on: June 18, 2013, 11:09:03 AM
Hi, i am not able to fix the problem mon0 ch-1

my system is a Lenovo Sl500 with intel 5100 AGN wifi interface and it uses iwlwifi packet of drivers.

this kind of interfaces should to work natively with linux, but i unable to put in ch X the mon0  interface.

i try :

- airmon-ng start wlan1  n°of channel... but not it works.
- Ifconfig mon0 down iwconfig mon0 channel etc etc , but it not works

i tried to follow this links http://wiki.backbox.org/index.php/Compat-drivers_aircrack_patched , nothing...

I don't understand...

Please Help me!!! :-)

ps se c'è qualche buon anima italiana , che mi risponde in italiano mi fa un piacere, perchè parlando inglese ogni 14 anni, mi rimane sempre il dubbio di non aver capito nulla :-)




weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #1 on: June 18, 2013, 12:42:33 PM
Ciao kko,
quando ti trovi in queste situazioni, è indispensabile che tu riporti passo passo quello che hai fatto con tutti gli errori, solo in questo modo ti si può aiutare.... Allora, per risolvere quel problema devi patchare i driver, se tu l'hai fatto ci devi incollare i comandi con gli errori (se ce ne sono)!

una voce libera è sempre liberatrice
under_r00t


kko

  • Guest
Reply #2 on: June 18, 2013, 04:48:40 PM
anche tu in effetti hai ragione... credo di dover prendere la buona abitudine di annotare...

allora prima ho rimosso i drivers


sudo apt-get remove linux-backports-modules-cw-3.8-precise-generic

poi ho seguito con :

sudo apt-get update

sudo apt-get distr-upgrade

con questo esito :

Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


sudo apt-get install linux-backports-modules-cw-3.8-precise-generic



poi provo a seguire come riportato nel link...

sudo airmon-ng check killall
sudo airmon-ng start wlan1
sudo aireplay-ng -9 mon0

17:38:53  Trying broadcast probe requests...
17:38:55  No Answer...
17:38:55  Found 1 AP

17:38:55  Trying directed probe requests...
17:38:55  4C:60:DE:EA:C9:BC - channel: 9 - 'homels'
17:39:01   0/30:   0%

la mia impressione è che ho troppa confusione in testa... e non ho ben capito cosa devo patchare


lancio airodump e mi da come output il canale -1 ....





weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #3 on: June 18, 2013, 06:44:48 PM
Ciao kko,
1) ti sei accorto di aver rimosso e reinstallato le stesse cose???
2) se hai seguito il link che hai riportato ti manca tutta la parte del download dei driver e l'applicazione delle patch:

Quote
Drivers download and zipped files extraction
cd /usr/src/
sudo wget http://www.kernel.org/pub/linux/kernel/projects/backports/stable/v3.9-rc4/compat-drivers-3.9-rc4-2-su.tar.bz2
sudo tar jxvf compat-drivers-3.9-rc4-2-su.tar.bz2
cd compat-drivers-3.9-rc4-2-su
The list of last updated version of compat-drivers driver is available here:
https://www.kernel.org/pub/linux/kernel/projects/backports/stable/
Downloading of patches and apply
sudo apt-get install patch
sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
Installation and Configuration
Before starting the installation procedure, ensure kernel source and headers have been installed on our system .
To install these packages run the following command:
Kernel v.3.2
sudo apt-get install linux-headers-generic build-essential
Kernel v.3.5
sudo apt-get install linux-headers-generic-lts-quantal build-essential
Kernel v.3.8
sudo apt-get install linux-headers-generic-lts-raring build-essential
To determine which driver is currently being used in your system, this page on Aircrack-ng wiki could be useful:
http://www.aircrack-ng.org/doku.php?id=compatibility_drivers#determine_the_driver
an alternative way is checking on your system by typing in terminal the following command:
lshw | grep wireless | grep driver | cut -d"=" -f3 | cut -d" " -f1
Once identified the correct driver, open a terminal, move to the compat-drivers folder extracted before and run:
sudo ./scripts/driver-select drivername
sudo make
sudo make install
Restart pc and everything should work fine.

Si hai un pò di confusione in testa ma se segui passo passo non ti puoi sbagliare, la guida è a prova di nonna_pina devi aver la calma di leggere tutto, se salti subito alla fine non funziona =)
« Last Edit: June 18, 2013, 06:46:53 PM by weVeg »

una voce libera è sempre liberatrice
under_r00t


kko

  • Guest
Reply #4 on: June 18, 2013, 07:16:20 PM
ahha haha haha ahaha no no aspetta non sono così scemo dai  ;D

ho fatto il copia incolla di quando ho riprovato a rifare la procedura ...

cmq provo... e ti faccio sapere

Grazie per la risposta



kko

  • Guest
Reply #5 on: June 18, 2013, 08:24:43 PM
Error :-(

make -C /lib/modules/3.2.0-48-generic/build M=/usr/src/compat-drivers-3.9-rc4-2-su modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-48-generic'
  CC [M]  /usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
                 from <command-line>:0:
/usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here
make[3]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make[2]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat] Error 2
make[1]: *** [_module_/usr/src/compat-drivers-3.9-rc4-2-su] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-48-generic'
make: *** [modules] Error 2

e poi

make -C /lib/modules/3.2.0-48-generic/build M=/usr/src/compat-drivers-3.9-rc4-2-su modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-48-generic'
  CC [M]  /usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
                 from <command-line>:0:
/usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here
make[3]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make[2]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat] Error 2
make[1]: *** [_module_/usr/src/compat-drivers-3.9-rc4-2-su] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-48-generic'
make: *** [modules] Error 2




weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #6 on: June 18, 2013, 10:43:30 PM
hai installato header e build-essential prima di compilare?
Devi riportare i comandi con gli errori, davvero kko, devi imparare ad essere preciso... che kernel hai??
se sei arrivato a compilare significa che sei riuscito ad applicare le patch giusto?
« Last Edit: June 18, 2013, 10:45:50 PM by weVeg »

una voce libera è sempre liberatrice
under_r00t


Malachai

  • Newbie
  • *
  • Posts: 19
    • View Profile
    • Top-Hat-Sec
Reply #7 on: June 19, 2013, 07:27:23 AM
Really!!!!!!!! Question was asked in English and the respond was in a different language... how's that going to help the rest of use that don't know a different language...

WiFi security and pentesters training.  Great Forum For n00bs and advance users.

http://top-hat-sec.com/


weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #8 on: June 19, 2013, 09:32:42 AM
Really!!!!!!!! Question was asked in English and the respond was in a different language... how's that going to help the rest of use that don't know a different language...
Hi malachai, you're right but kko ask also to respond in Italian cause "he doesn't understand", anyway the "ch -1 "  problem is well know about all IT around the world, and bbox forum is full of that......

una voce libera è sempre liberatrice
under_r00t


kko

  • Guest
Reply #9 on: June 19, 2013, 10:54:05 AM
hai installato header e build-essential prima di compilare?
Devi riportare i comandi con gli errori, davvero kko, devi imparare ad essere preciso... che kernel hai??
se sei arrivato a compilare significa che sei riuscito ad applicare le patch giusto?


allora se ti riferisci a questo comando per i kernel 3.2 che era riportato nella guida che ho linkato nel primo post :

sudo apt-get install linux-headers-generic build-essential

l'ho lanciato ancora per sicurezza è mi dice :

che la mia versione è la più recente...


allora il kernel è 3.2.0-48-generic

la procedura è andata tutta a buon fine sino ad arrivare alla compilazione e lì mi ha dato quella serie di errori, non l'ho riportata integralmente perchè ho dato per scontato che essendo filata liscia non vi fossero problemi...

cmq la procedura completa la riporto nel post seguente .

Malachian , i'm sorry, but i need to be sure that problem is problem of IT and not problem of my English...




kko

  • Guest
Reply #10 on: June 19, 2013, 11:11:16 AM
parto dall'installazione della patch... prima è andato download e installazione è andata a buon fine o per lo meno non mi da errori... e header e buidl essential dovrebbero come hai visto su essere correttamente installate.

root@wolf:/usr/src# cd compat-drivers-3.9-rc4-2-su
root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# apt-get install patchReading package lists... Done
Building dependency tree       
Reading state information... Done
patch is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# sudo wget http://patches.aircrack-ng.org/mac80211.compat08082009.wl_frag+ack_v1.patch
--2013-06-19 11:56:10--  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: 1049 (1.0K) [text/plain]
Saving to: `mac80211.compat08082009.wl_frag+ack_v1.patch.2'

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

2013-06-19 11:56:10 (56.8 MB/s) - `mac80211.compat08082009.wl_frag+ack_v1.patch.2' saved [1049/1049]

root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# cd /usr/src/compat-drivers-3.9-rc4-2-su
root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# ./scripts/driver-select iwlwifi
Processing new driver-select request...
Backup exists: Makefile.bk
Backup exists: drivers/net/wireless/Makefile.bk
Backup exists: Makefile.bk
Backup exists: net/wireless/Makefile.bk
Backup exists: drivers/ssb/Makefile.bk
Backup exists: drivers/bcma/Makefile.bk
Backup exists: drivers/misc/eeprom/Makefile.bk
Backup exists: Makefile.bk

root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# make
make -C /lib/modules/3.2.0-48-generic/build M=/usr/src/compat-drivers-3.9-rc4-2-su modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-48-generic'
  CC [M]  /usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
                 from <command-line>:0:
/usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here
make[3]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make[2]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat] Error 2
make[1]: *** [_module_/usr/src/compat-drivers-3.9-rc4-2-su] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-48-generic'
make: *** [modules] Error 2


root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# make install

make -C /lib/modules/3.2.0-48-generic/build M=/usr/src/compat-drivers-3.9-rc4-2-su modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-48-generic'
  CC [M]  /usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
                 from <command-line>:0:
/usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here
make[3]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make[2]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat] Error 2
make[1]: *** [_module_/usr/src/compat-drivers-3.9-rc4-2-su] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-48-generic'
make: *** [modules] Error 2
root@wolf:/usr/src/compat-drivers-3.9-rc4-2-su# make install

make -C /lib/modules/3.2.0-48-generic/build M=/usr/src/compat-drivers-3.9-rc4-2-su modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-48-generic'
  CC [M]  /usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o
In file included from /usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-2.6.h:71:0,
                 from <command-line>:0:
/usr/src/compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h:49:32: error: redefinition of ‘kref_get_unless_zero’
include/linux/kref.h:47:32: note: previous definition of ‘kref_get_unless_zero’ was here
make[3]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat/main.o] Error 1
make[2]: *** [/usr/src/compat-drivers-3.9-rc4-2-su/compat] Error 2
make[1]: *** [_module_/usr/src/compat-drivers-3.9-rc4-2-su] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-48-generic'
make: *** [modules] Error 2




weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #11 on: June 19, 2013, 11:11:29 AM
Ok, è un problema noto, han cambiato una funzione negli header del kernel e la compilazione non va a buon fine, devi commentare la parte di codice in compat-drivers-3.9-rc4-2-su/include/linux/compat-3.8.h, alla riga 49 (leggendo l'errore), e trovare dove viene definita la funzione
Code: [Select]
static inline int __must_check kref_get_unless_zero(struct kref *kref)
{
        return atomic_add_unless(&kref->refcount, 1, 0);
}
quindi la commenti:
Code: [Select]
/*static inline int __must_check kref_get_unless_zero(struct kref *kref)
{
        return atomic_add_unless(&kref->refcount, 1, 0);
}*/
a sto punto ricompili e speri :)

una voce libera è sempre liberatrice
under_r00t


kko

  • Guest
Reply #12 on: June 19, 2013, 12:08:29 PM
ok allora provo... e come si dice chi visse sperando...



weVeg

  • Hero Member
  • *****
  • Posts: 737
    • View Profile
Reply #13 on: June 19, 2013, 12:18:19 PM
ciao, ho riletto quello che hai fatto e non hai applicato la patch, l'hai solo scaricata....
hai dimenticato questo:
Code: [Select]
sudo patch -p1 < mac80211.compat08082009.wl_frag+ack_v1.patch
anche se vedo che fai le cose da root e il sudo non ti serve...

una voce libera è sempre liberatrice
under_r00t


kko

  • Guest
Reply #14 on: June 19, 2013, 02:32:59 PM
no no l'ho fatto quel passaggio, ma nel copiare e incollare tutto il procedimento ho dovuto spezzarlo perchè il server non me lo faceva postare... quindi è saltato... cmq ora provo a fare quella variazione e ti faccio sapere.