Wednesday, September 9, 2009
network tools for wireless and wired
Other than this you can find some other tools which are available. have look...
Tuesday, September 8, 2009
how to install madwifi driver for linux with and with out resend packets option.
It is a open source but depends on the proprietary Hardware Abstraction Layer (HAL).
Download and Check
$ wget http://ufpr.dl.sourceforge.net/sourceforge/madwifi/madwifi-0.9.4.tar.bz2
$ tar -zxvf madwifi-0.9.4.tar.bz2
$ cd madwifi-0.9.4/
$ cd scripts/
$ ./madwifi-unload.bash
$ ./find-madwifi-modules.sh $(uname -r)
$ cd ..
Build and comment
$ make
Checking requirements… ok.
Checking kernel configuration… ok.
make -C /lib/modules/2.6.18-92.1.13.el5/build SUBDIRS=/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.1.13.el5-i686′
CC [M] /home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/ath/if_ath.o
In file included from:1:
/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/ath/../include/compat.h:140: error: redefinition of ’skb_end_pointer’
….
….
….
make[3]: *** [/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/ath/if_ath.o] Error 1
make[2]: *** [/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/ath Error 2
make[1]: *** [_module_/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.18-92.1.13.el5-i686′
make: *** [modules] Error 2
$ cd include
$ cp compat.h compat.h.old
$ vim compat.h
$ diff -U 3 -dHrN -- compat.h compat.h.old
$cat compat.h.diff
— compat.h 2009-03-19 02:02:49.000000000 -0400
+++ compat.h.old 2009-03-18 19:09:37.000000000 -0400
@@ -134,7 +134,7 @@
#define IRQF_SHARED SA_SHIRQ
#endif
-/* #if LINUX_VERSION_CODE <>mac.raw = skb->data;
}
-#endif */
+#endif
#if LINUX_VERSION_CODE <>
$ cd ../
$ make
Checking requirements… ok.
Checking kernel configuration… ok.
make -C /lib/modules/2.6.18-92.1.13.el5/build SUBDIRS=/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4 modules
make[1]: Entering directory `/usr/src/kernels/2.6.18-92.1.13.el5-i686′
CC [M] /home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/ath/if_ath.o
…
…
…
make[1]: Entering directory `/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/tools’
gcc -o athstats -g -O2 -Wall -I. -I../hal -I.. -I../ath athstats.c
gcc -o 80211stats -g -O2 -Wall -I. -I../hal -I.. 80211stats.c
gcc -o athkey -g -O2 -Wall -I. -I../hal -I.. athkey.c
gcc -o athchans -g -O2 -Wall -I. -I../hal -I.. athchans.c
gcc -o athctrl -g -O2 -Wall -I. -I../hal -I.. athctrl.c
gcc -o athdebug -g -O2 -Wall -I. -I../hal -I.. athdebug.c
gcc -o 80211debug -g -O2 -Wall -I. -I../hal -I.. 80211debug.c
gcc -o wlanconfig -g -O2 -Wall -I. -I../hal -I.. wlanconfig.c
gcc -o ath_info -g -O2 -Wall ath_info.c
make[1]: Leaving directory `/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/tools’
# make install
sh scripts/find-madwifi-modules.sh 2.6.18-92.1.13.el5
for i in ath/ ath_hal/ ath_rate/ net80211/; do \
make -C $i install || exit 1; \
done
…
…
…
install -d /usr/local/man/man8
install -m 0644 man/*.8 /usr/local/man/man8
make[1]: Leaving directory `/home/rafa/0_Down/1_Source/WireLess/madwifi-0.9.4/tools’
Configuration and re-boot
# modprob ath_pci
# iwconfig
lo no wireless extensions.
eth1 no wireless extensions.
eth2 no wireless extensions.
sit0 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=1/1
Retry:off RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=0/70 Signal level=-256 dBm Noise level=-256 dBm
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
# wlanconfig ath0 list scan
show all available bssid's
--------------------------------------------------------------------------------------------------------------
If your doing protocol test and you want to have control how many packets are going from your wifi interface. You need to do simple two steps before compiling.
step 1:-
In madwifi-0.9.4/ath/if_athvar.h file change line '#define ATH_TXMAXTRY 11' to '#define ATH_TXMAXTRY 1'.
step 2:-
In madwifi-0.9.4/ath/if_ath.c file change line 'sc -> sc_mrretry = ath_hal_setupxtxdesc(ath, NULL, 0,0,0,0,0,0);' with 'sc-> sc_mrretry=0'.
In place of '0' you can write FALSE and add macro for it.
Now start compilation.
--------------------------------------------------------------------------------------------
installing pcap2air and other airbase tools for wifi
Lorcon is a bookshop specializing in frame insertion for 802.11 (Wi-Fi standard) and is on suite that supports the Airbase. The suite is created in C + + and is formed by applications, Airware-test, fuzz-e pcap2air,pcap-match, pcap-tac, pcap-wepcrypt, prism-strip simple-replay.
Currently, some programs use functions Airbase Lorcon bookstores that are considered obsolete (Deprecated).We'll see how to modify the code to fit the new libraries.
Download and install Lorcon (SVN):
$ svn co https://802.11ninja.net/svn/lorcon/trunk/
(If svn client is not isntalled on your machine just do #yum install subversion)
$ cd trunk/
$ ./configure
$ make
# make install
Download Airbase 2.40: http://www.802.11mercenary.net/downloads/Files to modify:
airbase-svn-223/80211fp/jc-CTS-printer/src/boring.cpp airbase-svn-223/80211fp/jc-CTS-printer/src/boring.cpp
airbase-svn-223/80211fp/jc-duration-printer/src/duration_pcap_preprocessor.cpp
airbase-svn-223/libs/lib802finger/src/station-lister.cpp: airbase-svn-223/libs/lib802finger/src/station-lister.cpp:
airbase-svn-223/tools/pcap2air/boring.cpp: airbase-svn-223/tools/pcap2air/boring.cpp:
airbase-svn-223/tools/simple-replay/boring.cpp airbase-svn-223/tools/simple-replay/boring.cpp
airbase-svn-223/tools/fuzz-e/boring.cpp airbase-svn-223/tools/fuzz-e/boring.cpp
We just replace these lines of code file containing:
tx80211_setmode
By:
tx80211_setfunctionalmode
Installing Airbase-release-2.40:
$ tar -zxvf airbase-release-2.40.tar.gz
$ cd airbase-svn-223
$ cd libs/libairware/
$ make
# make install
$ cd ../../tools/
$ ./build.sh
# ./install.sh
# ln -s /usr/local/bin/airbase/* /usr/sbin/
If any tools complain about missing shared library liborcon-1.0.0.so then
cp /usr/local/lib/liborcon-1.0.0.so /usr/lib
Now bellow airbase tools will be available
Airware-test
fuzz-e
pcap2air
pcap-match
pcap-tac
pcap-wepcrypt
prism-strip
simple-replay