Wardriver Box

 

howto build your own small wardriver box!


 
it's very easy, but this is not a step by step HOWTO, only a guide to build your own box.
 
See our other new concept, the wardriving bot
 
To start, you need a small up and running OpenBSD System on an Intel based System. This Sytem can run on in VMWare or on a older PC System (i use a 500 Mhz Pentuim System with 4 GB HD and 128 MB Ram)
For installing OpenBSD, Order the CD-Rom's and install OpenBSD. For More detailed Information go tho www.openbsd.org and then RTFM (read the famous manual),
 
Now you need a "BOX". There are two possibilities:
 
1. WRAP Box from PCENGINES
2. SOEKRIS Box from soekris
Both boxes are availible on local resellers in your country. We add a liste later here.
 
for our first prototype, we used a WRAP.1E-1 = 2 LAN / 2 miniPCI, 6" x 6" and for the second test we used a NET4801 Board from Soekris. There are some differences between this two boards, but its easy to move the installation from one to the other, In the view of the hardware, soekris (NET4801) has some benefits, like allready installed USB connector and a second serial port inside and a UltraDMA-33 interface with 44 pins connector for 2.5" Hard Drive. The WRAP Box is smaller and cheaper, but the USB must be installed additionaly (and the is no space in the case), and WRAP box use less power, then the soekis board.
I like both boxes, but for my project to integrate the wdbox in the car, i use the soekris box, because the second serial interface for a LCD Display.
 
And now you need a wireles mini pci card. we have tryed out some cards, and for the begin we use the NL-2511MP Plus. In the future, we try out other cards, if we have some to test. (please send your feedback, i f you have tested a other one)  
for a basic installation, you need some other hardware (remeber this, if you order a box), like a CF-Card (at minimum 64MB), a CF Card Reader (or use PXE Boot), a power supply, RS-232 Null Modem Cable, antenna , LCD Display (if desired), network cable amd some time.....
 
 
View in my Lab
 
For Building a Development envoriemed and a first installation of OpenBSD on the CF card, you mus follow this basic installation and download the newest version of flashdist form http://www.nmedia.net/~chris/soekris/ we used this beautyfull script, to install the BSD on the System.
This describs the installaion of a NET4801, but it can easy convertet to WRAP. i worte some notes for WRAP.  
0064 Mbyte Memory                           CPU 80486 133 MHz
Pri Mas  ATA_FLASH                          LBA 489-4-32   31 Mbyte

In the sample above, 489-4-32 represents the Cylinders-TracksPerCyl(Heads)-SectorsPerTrack, the C-H-S values

Connect your serial console to the Soekris box (19200 baud). Plug in the flash card to your Soekris box, turn it on, and note the C-H-S values in your serial console session. Write them down. Flashdist will ask you for them when you run it.

(If your Soekris box does _not_ display these values, use the instructions at the Soekris web site to upgrade to the 1.15 or newer BIOS)

Sam fpr the WRAP Box: ((38400 Baud)

PC Engines WRAP.1C/1D/1E v1.08
640 KB Base Memory
130048 KB Extended Memory

01F0 Master 848A Flash Card                              
Phys C/H/S 1002/16/32 Log C/H/S 1002/16/32
ROM segment 0xe000 length 0x8000 reloc 0x00020000
Etherboot 5.3.12 (GPL) http://etherboot.org
Drivers: NATSEMI   Images: NBI PXE   Exports: PXE   
Relocating _text from: [00089370,0009b230) to [07eee140,07f00000)
Boot from (N)etwork (D)isk or (Q)uit? 
here you must writre down following numbers:
(C/H/S) 1002/16/32

  • Unpack base3X.tgz and etc3X.tgz into a directory, say, /tmp/openbsd

    (Be sure to use the p option with tar or else files will not be extracted with the correct permissions and your installation [at least sshd and login] will not work properly!)

    mkdir /tmp/openbsd
    cd /tmp/openbsd
    tar xzpf /path/to/base31.tgz
    tar xzpf /path/to/etc31.tgz
     
    (alternately, you can specify / rather than /tmp/openbsd below to install from your current OS image) NET4801 file can be found on flashdist distribution or here NET4801"
  • Compile the NET4801 kernel
    cp /path/to/NET4801 /usr/src/sys/arch/i386/conf/NET4801
    cd /usr/src/sys/arch/i386/conf
    config NET4801
    cd ../compile/NET4801
    make
     
    (alternately, you can specify / rather than /tmp/openbsd below to install from your current OS image) WRAP file can be here WRAP"
  • Compile the WRAP kernel
    cp /path/to/WRAP /usr/src/sys/arch/i386/conf/WRAP
    cd /usr/src/sys/arch/i386/conf
    config WRAP
    cd ../compile/WRAP
    make
     
    Of course, whatever kernel you compile should be built the same source as that of the userland you install. Or, if you are using a snapshot to install from, at least try to build a kernel using sources from a close date to that of the snapshot build.

  • Edit the rc file from flashdist directory to suit your tastes. (You should at least change the IP addresses, default route, hostname, etc...)
    tar xvf flashdist.tar
    cd flashdist
    vi rc
    
  • Use flashdist.sh to install onto your CF media (assuming here that you are using a USB-CF adapter with flash at sd2). Be sure to run flashdist.sh from the flashdist directory so flashdist.sh can access other files from its archive.
    ./flashdist.sh sd2 flashsmall.txt /usr/src/sys/arch/i386/compile/NET4801/bsd /tmp/openbsd
     
  • Edit /etc/rc and configure your network parameters (interface IPs, default routes, etc). Turn on ntpd if you want to use it (recommended). Turn on dhcpd if you want it. Edit ntpd.conf, dhcpd.conf, pf.conf, etc. If you are are using nsh, you can configure through nsh to save your network parameters.

    That should get you a bootable CF media for your net4801. If you have problems booting, you need to follow the instructions at the top of the script to get the right geometry.

    Modifying the flash after boot

    While you are logged into the net4801's serial console, you can use vi and other curses applications by setting your terminal type, such as:
    export TERM=vt220
    
    For all use, if you want to make changes to the read-only media while logged in, do this:
    mount -o rw,noatime /dev/wd0a /
    

    Make your changes, and then mount it read-only again:

    mount -o ro /dev/wd0a /
    

    WRAP hints

    Modifying Files on flashdist directory:
    file for correct display speed on startup:
    boot.conf
    set tty com0
    stty com0 38400
    
    ttys, change only this line
    tty00	"/usr/libexec/getty std.38400"	vt100	on  secure
    
    for LED and Button Function, add "sh MAKEDEV gpio" in the flasdist.sh file, or/and "sh MAKEDEV usb" for usb support
     
     
    WRAP Box
     

    NET4801 hints

    Modifying Files on flashdist directory:
    file for correct display speed on startup:
    boot.conf
    set tty com0
    stty com0 19200
    
    ttys, change only this line
    tty00	"/usr/libexec/getty std.19400"	vt100	on  secure
    
    in the flasdist.sh file, or/and "sh MAKEDEV usb" for usb support
     
     
    4801 with add. LCD Display
     

    Kismet Config Files

    Download kismet source and build kismet on the master system.after that, copy the files to the Wardriving Box, and modify the kismet config files, for propper work.
    here our files:
    kismet.conf
    kismet_ui.conf
    without anny warranty, we are trying to tune the configuartion, fpr reducing the size of dump files etc..

    More after WHAT THE HACK,

    there we plan to complete the WHOTO, and build some add. scripts and config files for the box come and join to us.....
    for feedback, send a mail to us. wardriver@wardriving.ch

    Creating a virtual disk image with flashdist

    If you want to use flashdist to create a disk image, rather than work on an actual flash disk, use vnconfig(8). This method will only work if you manually specify the geometry to flashdist. First, you need to create an image of the correct size for your flash cards:
    dd if=/dev/zero of=flashimg bs=512 count=125440
    
    Where bs, the blocksize, is equal to the bytes per sector used on the flash media (almost always 512), and count as the total number of sectors. In this example, the total number of sectors is 125440, but of course this differs with each type of flash card or hard disk. It is calculated as C*H*S, where C is Cylinders, H is Heads (tracks per cylinder), and S is Sectors per track.

    Once you have the image file, you need to make it look like a regular disk.

    
    vnconfig -c svnd0 flashimg
    
    Now you can use the svnd0 device with flashdist, instead of sd0 or another actual disk on the system. When you are done installing to the the flash image, you need to unconfigure it from the kernel before you use it.
    vnconfig -u svnd0
    
    Now the file 'flashimg' is your disk image and it is ready to be written to flash.
    dd if=flashimg of=/dev/sd0c
    

     

  • 13.6.2005
    By chw + stoege