Le but de ce topic :
- récapitulatif des commandes de bases
- obtenir des infos sur son matériel
- identifier le problème
- poser une question avec des infos
précises et pas juste "ca marche pas"
commandes de base :
- man
- iwconfig
- ifconfig
- sudo
- grep
on check si notre carte et reconnue
iwconfig
Code:
nagual@BT4-Nag:~$ iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wmaster0 no wireless extensions.
wlan0 IEEE 802.11bg ESSID:""
Mode:Managed Frequency:2.412 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
on monte la carte
Code:
nagual@BT4-Nag:~$ sudo ifconfig wlan0 up
on lance WICD
Code:
nagual@BT4-Nag:~$ sudo /etc/init.d/wicd start
Starting Network connection manager: wicd.
on peut ensuite clicker sur l'icone dans internet ou le lancer en ligne de commande
Code:
wicd-client --no-tray
et la on se connecte
Code:
nagual@BT4-Nag:~$ iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"D3s3rt-0f-s3tH"
Mode:Managed Frequency:2.412 GHz Access Point: 00:11:22:33:44:55
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=98/100 Signal level:-36 dBm Noise level=-66 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
nagual@BT4-Nag:~$ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.1.34 Bcast:255.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::219:7dff:fe6b:19f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3233 errors:0 dropped:0 overruns:0 frame:0
TX packets:2060 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2705258 (2.7 MB) TX bytes:401400 (401.4 KB)
si vous ne voyez pas votre carte
lspci afin d'identier le matériel
Code:
nagual@BT4-Nag:~$ lspci |grep Network
0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
on peut rechercher si un module est
présent
lsmod ou modinfo
Code:
nagual@BT4-Nag:~$ modinfo b43
filename: /lib/modules/2.6.29.4/kernel/drivers/net/wireless/b43/b43.ko
on peut rechercher un firware ou voir ce qu'il y a d'installer sur notre pc
Code:
locate bcm43xx
locate b43
ls /lib/firmware/ |grep b43
voila ce n'est qu'un simple exemple de recherche. Google peut vous aider à affiner votre recherche en fonction du résultat de "lspci".
Vu que le résultat de ces commandes peut être long, vous pouvez trier les réponses afin de ne pas polluer inutilement le forum ou alors utiliser pastebin
Code:
backtrack.pastebin.com
airdriver-ng peut également vous aider
Code:
nagual@BT4-Nag:~$ sudo airdriver-ng
[sudo] password for nagual:
Found kernel: 2.6.29.4
usage: airdriver-ng <command> [drivernumber]
valid commands:
supported - lists all supported drivers
kernel - lists all in-kernel drivers
installed - lists all installed drivers
loaded - lists all loaded drivers
-----------------------------------------------------
insert <drivernum> - inserts a driver
load <drivernum> - loads a driver
unload <drivernum> - unloads a driver
reload <drivernum> - reloads a driver
-----------------------------------------------------
compile <drivernum> - compiles a driver
install <drivernum> - installs a driver
remove <drivernum> - removes a driver
-----------------------------------------------------
compile_stack <stacknum> - compiles a stack
install_stack <stacknum> - installs a stack
remove_stack <stacknum> - removes a stack
-----------------------------------------------------
install_firmware <drivernum> - installs the firmware
remove_firmware <drivernum> - removes the firmware
-----------------------------------------------------
details <drivernum> - prints driver details
detect - detects wireless cards
détection des drivers
Code:
nagual@BT4-Nag:~$ sudo airdriver-ng detect
Found "Broadcom 4300" device: (bcm43xx)
0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
Found "Broadcom 4300" device: (bcm43xx-mac80211)
0c:00.0 Network controller: Broadcom Corporation BCM4312 802.11a/b/g (rev 01)
USB devices (generic detection):
Bus 002 Device 004: ID 413c:8103 Dell Computer Corp. Wireless 350 Bluetooth
check des drivers et firmwares installés
Code:
nagual@BT4-Nag:~$ sudo airdriver-ng installed
Found following stacks installed:
2. mac80211
Found following drivers installed:
2. ADMtek 8211 - mac80211
3. Atmel at76c50x - IEEE80211
7. Cisco/Aironet 802.11 - IEEE80211 Softmac
8. HostAP - IEEE80211
9. Intel Pro Wireless 2100 B - IEEE80211
10. Intel Pro Wireless 2200 (B/G)/2915 (A/B/G) - IEEE80211
13. Intel Pro Wireless 3945 A/B/G - mac80211
15. Lucent Hermes and Prism II - IEEE80211
17. Prism54 - IEEE80211
21. Ralink rt2400 (rt2x00) - mac80211
24. Ralink rt2500 (rt2x00) - mac80211
27. Ralink rt2570 (rt2x00) - mac80211
30. Ralink rt61 (rt2x00) - mac80211
33. Ralink rt73 (rt2x00) - mac80211
36. Realtek rtl8187 - mac80211
39. ZyDAS 1201 - IEEE80211 Softmac
41. ZyDAS 1211rw - IEEE80211 Softmac
Found following firmwares installed:
0. ACX100/111 - IEEE80211
3. Atmel at76c50x - IEEE80211
4. Atmel at76_usb - IEEE80211
9. Intel Pro Wireless 2100 B - IEEE80211
10. Intel Pro Wireless 2200 (B/G)/2915 (A/B/G) - IEEE80211
39. ZyDAS 1201 - IEEE80211 Softmac
40. ZyDAS 1211 - IEEE80211 Softmac
41. ZyDAS 1211rw - IEEE80211 Softmac
Votre carte fonctionne et vous voulez savoir si elle supporte le mode monitor et/ou l'injection
- airmon-ng
- airodump-ng
- aireplay-ng
Passage de la carte en mode monitor
Code:
nagual@BT4-Nag:~$ sudo airmon-ng start wlan0
[sudo] password for nagual:
Found 2 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!
PID Name
10911 wpa_supplicant
10941 dhclient
Process with PID 10911 (wpa_supplicant) is running on interface wlan0
Process with PID 10941 (dhclient) is running on interface wlan0
Interface Chipset Driver
wlan0 Broadcom b43 - [phy0]
(monitor mode enabled on mon0)
scan de réseau
Code:
nagual@BT4-Nag:~$ sudo airodump-ng mon0
CH 10 ][ BAT: 33 mins ][ Elapsed: 0 s ][ 2009-06-22 00:15
BSSID PWR Beacons #Data, #/s CH MB ENC CIPHER AUTH ESSID
00:11:22:33:44:55 -38 11 0 0 1 54 WPA TKIP PSK D3s3r
BSSID STATION PWR Rate Lost Packets Probes
test de l'injection
Code:
nagual@BT4-Nag:~$ sudo aireplay-ng -9 mon0
00:16:29 Trying broadcast probe requests...
00:16:29 Injection is working!
00:16:31 Found 1 AP
00:16:31 Trying directed probe requests...
00:16:31 00:11:22:33:44:55 - channel: 1 - 'D3s3rt-0f-s3tH'
00:16:32 Ping (min/avg/max): 1.303ms/21.898ms/37.887ms Power: -34.23
00:16:32 30/30: 100%
nagual@BT4-Nag:~$
Voici maintenant un exemple de script pour activer votre connexion
nagual@BT4-Nag:~$ cat net
Code:
#!/bin/bash
clear # Clear the screen.
echo " Network menu"
echo " ------- ----"
echo "Choose one of the following options:"
echo
echo "[1] wicd"
echo "[2] dhclient"
echo
read sel
case "$sel" in
# Note variable is quoted.
"1" | "1" )
# Accept upper or lowercase input.
echo
echo "starting WICD"
echo
sudo /etc/init.d/wicd start
wicd-client --no-tray
;;
# Note double semicolon to terminate each option.
"2" | "2" )
echo
echo "Searching for network"
echo
sudo /etc/init.d/networking start
;;
* )
# Default option.
# Empty input (hitting RETURN) fits here, too.
echo
echo "NOTHING TO DO."
;;
esac
echo
exit 0
On test le script
Code:
nagual@BT4-Nag:~$ ./net
Network menu
------- ----
Choose one of the following options:
[1] wicd
[2] dhclient
1
starting WICD
[sudo] password for nagual:
Starting Network connection manager: wicd.
Loading...
Attempting to connect tray to daemon...
Success.
refreshing...
======= D3s3rt-0f-s3tH ========
Avec ceci la carte est montée automatiquement au lancement de WICD ou de networking.