Ice Box Modifcations and Wardriving Scripts v1.0
Israel Torres, http://www.chroniclesofawardriver.org/wardriving_scripts.txt
(html,
txt)
Aug 08/22/2005
These are modifications that I made to "The Ice Box" so
that upon boot it will automatically login and give me a
fair warning that in 10 seconds we are going into wardrive mode
then configures the system to wardrive. All without
user interaction. Great for when you are running headless! These
modifications took a boot up and start sequence of
something of around 10 minutes of interactive duty to a fully
automated 1 minute and 18 seconds to the 10 second
wardriving mode warning and only 22 more seconds after the
warning is ignored to load up gpsd and kismet. This is
especially useful if your system has a knack of rebooting now and
then during your wardrives.
*** Security Warning ***
These modifications have been made on a wardriving-only unit.
This unit "The Ice Box" has only one purpose, to
wardrive, and wardrive well. DO NOT ATTEMPT THESE
MODIFICATIONS ON A GENERAL PURPOSE MACHINE.
These modifications exist because my wardriving unit is usually
in the trunk or in the rear of the vehicle. It
really is a bother to be running back and forth making sure the
engine is running and interacting with a machine on
a cold boot, or during a warm boot. The audio is being piped to
my vehicle's stereo system using a tape adapter from
the laptop's soundcard. I have added audio feedback to let me
know which stages the wardriving mode process is in.
I get an initial beep when "The Ice Box" is powered on.
I get two more happy beeps when the card drivers are being
loaded.
I get 10 beeps when entering wardriving mode
I get kismet sounds when things are happy.
If this audio sequence does not occur I know something is wrong
and need to pull over and recheck the system.
These are the following modifications I made to my root account
-- please realize that doing this on a general
purpose machine will make your machine less secure and super
vulnerable -- in short do not try this at home.
LOGIN SEQUENCE
0. Adrian J. Chung wrote up this great how-to
on automating logins. Please read "The nuts-n-bolts
method" carefully
and make sure you backup any files before playing with them:
[/usr/local/sbin/autologinroot]
Automated Logins Revisited : The nuts-n-bolts method
http://www.linuxgazette.com/issue72/chung.html
1. I first created the program
"autologinroot.c" from the example provided on Adrian's
site. I am using root,
therefore using "root" as the part of the parameter:
[autologinroot.c]
int main()
{
execlp( "login", "login", "-f",
"root", 0);
}
2. I compiled this simple program with the
suggested syntax:
gcc -o autologinroot autologinroot.c
3. and copied the generated binary
(autologinroot) to the suggested public directory:
cp autologinroot /usr/local/sbin/
4. next I modified my inittab so that it uses
this program upon initialization:
[/etc/inittab]
c1:12345:respawn:/sbin/agetty -n -l
/usr/local/sbin/autologinroot 38400 tty1 linux
5. lastly I updated lilo.conf so that I didn't
have to wait a few minutes before the system defaulted to load
linux.
[/etc/lilo.conf]
timeout = 5
6. I created a .bash_login file since my root
account did not have one. It only has one shell command and that
is to
run the shell script named wardrive.sh:
echo sh wardrive.sh > .bash_login
[.bash_login]
sh wardrive.sh
7. I created wardrive.sh so that upon automatic
login I know that I am about to enter wardrive mode. I did this
because regularly need to offload the log files to another system
and need a totally different network configuration
than its default. I get fair warning 10 audible seconds that I am
about to enter wardrive mode where I can control-c
out of it any time during this warning. If I ignore it it will
configure my system to wardrive and begin logging
automatically. This script is pretty simple. it begins with a for
loop that gives the visual and audible message
that wardrive mode will be initated in 10 seconds with a 1 second
pause in between each beep with a count up to
wardrive mode. It then brings up my wifi card and starts the gps
daemon (as background) (make sure your GPS is
running at the time). Finally kismet is invoked.
[wardrive.sh]
#http://www.chroniclesofawardriver.org
for i in `seq 10 1`;
do
#message
echo wardrive mode in $i seconds...
#beep
echo -e "\a"
#pause for 1 second
sleep 1
done
ifconfig eth0 up
/usr/share/gpsd/gpsd -D2 -p /dev/ttyS0 &
kismet
... please use these modifications for good. If something bad
happens it isn't my fault.
Israel Torres
http://www.chroniclesofawardriver.org