or how to beat your head against a wall….
So to simplify this post - 8.04 comes with Kernel 2.6.24… all kernels at this level and above come with a new set of built in kernel wifi drivers - while this is great to get the average user up and running it can be a PITA to get rid of these drivers to backrev the system to work with more “hacking friendly” drivers for the various tools out there.
I just got finished beating my install into submission to get the following tools running on Ubuntu 8.04 (all at the latest version) - Kismet, Aircrack-ng, driftnet (patched for wifi), wireshark, metasploit3, Freeradius-WPE, Karma, Airpwn, and cowpatty. At this point i’ve taken notes on tweaks that are needed and figured i’d drop them in here.
Packages installed via apt-get:
bin86 sharutils kismet wpasupplicant openssl libssl-dev curl libcurl3 libcurl4-openssl-dev python-pycurl lynx ncftp libnet-ssleay-perl libwhisker-perllibwww-perl libnetaddr-ip-perl libhtml-table-perl sox liblist-moreutils-perl libtext-diff-perl libnet-snmp-perl libnet-ldap-perl libdbi-perl mono libxml-simple-perl libpopt0 sablotron p0f dhcpcd libnet-dns-perl libnet-telnet-perl libnet-ssh-perl libdata-dumper-simple-perl libxml-dumper-perl libcrypt-des-perl libpcap-dev libungif4-dev libjpeg62-dev libpng12-dev libgtk2.0-dev gftp wireshark subversion libnet1-dev libpcre3-dev ruby libruby rdoc libyaml-ruby libzlib-ruby libopenssl-ruby libdl-ruby libreadline-ruby libiconv-ruby rubygems libgtk2-ruby libglade2-ruby libncurses-dev
Yes I cheated and let apt-get install a few things like wireshark and kismet. ![]()
— Notes for system configuration and tool usage —-
Wifi Notes - Ubuntu 8.04 - Kernel 2.6.24
add the following to /etc/modprobe.d/blacklist
# replace kernel with hack driver
blacklist rt73usb
blacklist rtl8187
blacklist rt2x00usb
blacklist rt2500usb
Driver install RT73 USB Card:
wget http://homepages.tu-darmstadt.de/~p_larbig/wlan/rt73-k2wrlz-3.0.0.tar.bz2
tar -xjf rt73-k2wrlz-3.0.0.tar.bz2
cd rt73-k2wrlz-3.0.0/Module
make
then, as root, type
make install
modprobe rt73
Driver install RTL8187 - Alfa Networks USB Card:
ifconfig wlan0 down
rmmod rtl8187
wget http://dl.aircrack-ng.org/drivers/rtl8187_linux_26.1010.zip
unzip rtl8187_linux_26.1010.zip
cd rtl8187_linux_26.1010.0622.2006/
wget http://patches.aircrack-ng.org/rtl8187_2.6.24v3.patch
tar xzf drv.tar.gz
tar xzf stack.tar.gz
patch -Np1 -i rtl8187_2.6.24v3.patch
make
make install
Driver install EEEPC Atheros 5007EG - Madwifi:
wget http://www.offensive-security.com/madwifi-r3406-hdm-032608.tar.gz - Patched for injection and Karma
Extract
cd
make
make install
depmod -ae
modprobe ath_pci
Driver install DWL-G122 USB (RT2570):
Broken for now in kernels 2.6.24 and higher - kernel drivers kinda work!
Enable/Disable Monitor Mode - After installing latest 1.XX Aircrack-ng:
airmon-ng (lists cards)
USB Cards - airmon-ng start/stop rausb0 or wlan0/1
Madwifi - airmon-ng stop ath0 & airmon-ng start wifi0
(This will start a new Virtual interface - labled ath0 the next one would be ath1, etc)
Kismet Sources:
source=madwifi_g,wifi0,madwifi
source=rt73,rausb0,rt73
source=rt8180,wlan1,ALFA
Airpwn Compile fix:
edit /usr/include/linux/wireless.h
add the this line to the very top.
should lookk like this.
#include <linux/if.h>
#ifndef _LINUX_WIRELESS_H
#define _LINUX_WIRELESS_H
quit and save - compile works now
Airpwn Instructions:
configure Wifi interface to network you will inject on
airmon-ng
airmon-ng start wifi0
aireplay-ng --test athX
airpwn -c conf/airpwned_img -i athX -d rtl8180 -vvv -F
FreeRadius-WPE:
wget http://www.athomeprd.com/~jimb/eeepc/PEAP/freeradius-server-2.0.2.tar.gz
wget http://www.athomeprd.com/~jimb/eeepc/PEAP/freeradius-wpe-2.0.2.patch
tar -zxvf freeradius-server-2.0.2.tar.gz
cd freeradius-server-2.0.2/
patch -p1 < ../freeradius-wpe-2.0.2.patch
./configure && make && sudo make install && sudo ldconfig
Once FreeRADIUS is built and installed with the WPE patch, you can build your certificates. We assume you use “sudo” for root access:
cd freeradius-server-2.0.2/raddb/certs
./bootstrap
cp -r * /usr/local/etc/raddb/certs
FreeRadius-WPE Usage:
All set, now run “radiusd” (you can optionally run “radiusd -X -f” to get verbose debugging information printed to the screen) and you can monitor your log file using tail:
radiusd
tail -f /usr/local/var/log/radius/freeradius-server-wpe.log
Configure your AP with the SSID you’ll be spoofing, And the radius servers IP and handshak password (test).
Karma Install and Usage - Taken from KarmaUbuntu.pdf - Pauldotcom.com:
wget http://www.theta44.org/software/karma-20060124.tar.gz
tar –zxvf karma-20060124.tar.gz
Now, we aren’t going to run the full boat of Karma for this test, so lets set up our test:
#cd karma-20060124/etc
# cp karma.xml my.xml
Now we need to edit my.xml to just start up AccessPoint. Everything after that is a matter
of preference, so lets get the basics working.
Edit the my.xml and in the < ! - - Run modules - - > section and remove all of the lines in
the section EXCEPT:
<run module=”ACCESS-POINT” />
Save my.xml. We are almost there. Now, karma makes some assumptions as to where
some tools are located such as iwconfig, ifconfig, etc. Unfortunately, the assumptions are
wrong in this case, but it is an easy fix:
# cd
# cd karma-20060124/modules/servers/AccessPoint
Now we need to edit the module.xml file. You will notice that on the first page for this
file, there is a section titled < ! - - Command-line tool and file paths - - >. In this section,
there are references to paths for several commands. Under Ubuntu 6.06 LTS ifconfig,
iwconfig, iwpriv and iwevent are allocated under /sbin, and not /usr/sbin. Make the
changes to reflect the appropriate path (/sbin/<filename>), and save the file.
We also need to do some path updates to the script that sets monitor mode as well:
# cd
# cd karma-20060124/bin/
Now, edit the monitor-mode.sh script, and update the path to iwconfig
to be /sbin/iwconfig instead of /usr/sbin/iwconfig. Save the file.
It would be a good thing if Karma worked, so let us give it a try. Insert your Atheros card
and perform the following:
# iwpriv ath0 karma 1 (updated digininja.org driver)
# cd
# cd karma-20060124
# bin/karma etc/my.xml
If everything worked as planned, you should be “Delivering Judicious Karma”, and
AccessPoint should be running, and responding to probe requests. Now go play with all
of the other Servers, Modules and Exploits, oh my!
recent comments