| 名前 | 説明 |
| aircrack-ng | WEP,WPA-PSKのキー解析 |
| aireplay-ng | パケットインジェクション |
| airodump-ng | パケットキャプチャ |
| packetforge-ng | パケット作成 |
| airdecap-ng | 入手したキーを元にキャプチャしたデータを解読 |
| airmon-ng | NICのモードを Monitor にするためのシェルスクリプト |
| airtun-ng | 仮想トンネルインターフェースを作成 |
自分の管理下にない無線LANアクセスポイントのWEPキー解析は絶対に行わないこと!!
Atherosチップ用ドライバ
madwifi-ng をインストールするには、カーネルソースが必要となる。
よって、事前にカーネルソースを展開しておく。
# uname -a
Linux wifi-auditor 2.6.9-42.0.8.EL #1 Tue Jan 30 12:10:22 EST 2007 i686 i686 i386 GNU/Linux
#
# wget http://ftp.riken.jp/Linux/centos/4.4/os/SRPMS/kernel-2.6.9-42.EL.src.rpm
#
# rpm -ivh kernel-2.6.9-42.EL.src.rpm
以下警告が大量に出るが問題なし (buildsvnというユーザ・グループがないため表示される)
警告: user buildsvn does not exist - using root
警告: group buildsvn does not exist - using root
# cd /usr/src/redhat/SPECS/
# rpmbuild -bp --target=i686 kernel-2.6.spec
作成中ターゲットプラットフォーム: i686
Building for target i686
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.47637
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf kernel-2.6.9
+ /bin/mkdir -p kernel-2.6.9
+ cd kernel-2.6.9
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/linux-2.6.9.tar.bz2
+ tar -xf -
[snip]
removed `./crypto/api.c.orig’
removed `./crypto/Kconfig.orig’
removed `./crypto/Makefile.orig’
+ find . -name ‘*~’ -exec rm -fv ‘{}’ ‘;’
+ exit 0
#
# lspci
00:00.0 Host bridge: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 01)
00:00.1 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 01)
00:00.3 System peripheral: Intel Corporation 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 01)
00:02.0 VGA compatible controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 01)
00:02.1 Display controller: Intel Corporation 82852/855GM Integrated Graphics Device (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC’97 Modem Controller (rev 01)
02:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5901 100Base-TX (rev 01)
02:01.0 CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 02)
03:00.0 Ethernet controller: Atheros Communications, Inc. AR5212 802.11abg NIC (rev 01)
#
# ifconfig ath0 down
# ifconfig wifi0 down
#
# cd /usr/local/src/
# svn checkout http://svn.madwifi.org/madwifi/trunk/ madwifi-ng
A madwifi-ng/regression
A madwifi-ng/regression/ccmp
A madwifi-ng/regression/ccmp/test_ccmp.c
A madwifi-ng/regression/tkip
[snip]
A madwifi-ng/patch-kernel/README
A madwifi-ng/BuildCaps.inc
U madwifi-ng
リビジョン 2780 をチェックアウトしました。
#
# wget http://patches.aircrack-ng.org/madwifi-ng-r2277.patch
# cd madwifi-ng
# patch -Np1 -i ../madwifi-ng-r2277.patch
patching file ath/if_ath.c
Hunk #1 succeeded at 2406 with fuzz 1 (offset 121 lines).
Hunk #2 succeeded at 2419 with fuzz 2 (offset 120 lines).
#
# ./scripts/madwifi-unload
Unloading “ath_pci”
Unloading “wlan_scan_sta”
Unloading “ath_rate_sample”
Unloading “wlan”
Unloading “ath_hal”
#
# make
# make install
#
# depmod -ae
# modprobe ath_pci
#
# lsmod
Module Size Used by
ds 17605 2
dm_mirror 30893 0
dm_mod 59989 1 dm_mirror
button 6737 0
battery 9029 0
ac 4933 0
wlan_scan_sta 14976 0
ath_rate_sample 11648 1
ath_pci 93092 0
wlan 189668 4 wlan_scan_sta,ath_rate_sample,ath_pci
ath_hal 191696 3 ath_rate_sample,ath_pci
yenta_socket 19009 1
pcmcia_core 63865 2 ds,yenta_socket
uhci_hcd 31321 0
ehci_hcd 31301 0
hw_random 5973 0
snd_intel8x0m 18313 0
snd_intel8x0 34025 0
snd_ac97_codec 64145 2 snd_intel8x0m,snd_intel8x0
snd_pcm_oss 49401 0
snd_mixer_oss 18241 1 snd_pcm_oss
snd_pcm 97225 3 snd_intel8x0m,snd_intel8x0,snd_pcm_oss
snd_timer 30149 1 snd_pcm
snd_page_alloc 9929 3 snd_intel8x0m,snd_intel8x0,snd_pcm
snd_mpu401_uart 8897 1 snd_intel8x0
snd_rawmidi 26853 1 snd_mpu401_uart
snd_seq_device 8265 1 snd_rawmidi
snd 55973 10 snd_intel8x0m,snd_intel8x0,snd_ac97_codec,snd_pcm_oss,.....
soundcore 10017 1 snd
tg3 107077 0
floppy 58609 0
ext3 117193 2
jbd 71385 1 ext3
#
# cd /usr/local/src/
# wget http://download.aircrack-ng.org/aircrack-ng-0.7.tar.gz
# tar xvzf aircrack-ng-0.7.tar.gz
# cd aircrack-ng-0.7
# make
# make install
#
無線LAN上のパケットをモニターするために、NICのモードを Monitorモードに変更する。
PC起動時に作成される Managedモードのインターフェースについては削除する必要がある。
以下手順については、PCの再起動を行った際に再度実行する必要がある。
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:06:1B:C1:F0:4A
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1590 errors:0 dropped:0 overruns:0 frame:0
TX packets:245 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:478437 (467.2 KiB) TX bytes:34496 (33.6 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
#
# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 no wireless extensions.
ath0 IEEE 802.11b ESSID:””
Mode:Managed Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power:0 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
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
#
# wlanconfig ath0 destroy
# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 no wireless extensions.
#
# wlanconfig ath0 create wlandev wifi0 wlanmode monitor
ath0
#
# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
wifi0 no wireless extensions.
ath0 IEEE 802.11b ESSID:””
Mode:Monitor Channel:0 Access Point: Not-Associated
Bit Rate:0 kb/s Tx-Power:0 dBm Sensitivity=0/3
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
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
#
# ifconfig ath0 up
# ifconfig
ath0 Link encap:UNSPEC HWaddr 00-40-96-A4-0D-E3-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth0 Link encap:Ethernet HWaddr 00:06:1B:C1:F0:4A
inet addr:192.168.1.10 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:31491 errors:0 dropped:0 overruns:0 frame:0
TX packets:297 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10683337 (10.1 MiB) TX bytes:38050 (37.1 KiB)
Interrupt:11
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
wifi0 Link encap:UNSPEC HWaddr 00-40-96-A4-0D-E3-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:376 errors:0 dropped:0 overruns:0 frame:341
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:199
RX bytes:624 (624.0 b) TX bytes:0 (0.0 b)
Interrupt:11
#
# tcpdump -i ath0
tcpdump: WARNING: ath0: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on ath1, link-type PRISM_HEADER (802.11 plus Prism header), capture size 96 bytes
13:19:59.502061 [|802.11]
13:19:59.568563 [|802.11]
13:19:59.568875 [|802.11]
13:19:59.613765 [|802.11]
13:19:59.614500 [|802.11]
※[Ctrl]+[C] で停止
#