Slackware 8.1 ( kernel 2.4.20) and Kismet 2.8.1

documentation version 1.0 Feb-22-03 blackwave@hushmail.com

Notes:

The latest stable kernel at the time of this writing is 2.4.20

The latest stable release of kismet is 2.8.1

The latest version of this document can be located at:

(HTML) http://www.irvineunderground.org/blackwave/blackwavesGuidetoASaneKismet.html

(TEXT) http://www.irvineunderground.org/blackwave/blackwavesGuidetoASaneKismet.txt

The author or sites that host this document are NOT liable for any unwanted occurrances.

Background:

Greetings. Basically I could not find a single source to get kismet working. After doing a weeks worth of research I have finally come up with a complete walkthrough. Feel free to email for comments, questions, suggestions.

Requirements:

Instructions:

0. It is HIGHLY suggested that you backup all the data you find valuable on your system before proceeding.

Walkthrough Index:

ORINOCO System Prep I : Getting it patched and working on the 2.4.20

ORINOCO System Prep II : Getting it patched and working on the 2.4.20

kernel source: Getting it,and Getting it ready for compiliation[using 2.4.20]

kernel recompile: The slackware way [using 2.4.20]

kernel replacement

ORINOCO System Prep III : Getting it patched and working on the 2.4.20

ORINOCO : Verifying the patch works and the wifi card works

Kismet: Getting, Installing Configuring *WIP

Tips'n Tricks:


ORINOCO System Prep I : Getting it patched and working on the 2.4.20

0. base site: http://pcmcia-cs.sourceforge.net/

1. First get the Linux PCMCIA Card Services v 3.2.1. from sourceforge: http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-3.2.1.tar.gz?download

3.2.1 2002-08-21 17:00
pcmcia-cs-3.2.1.tar.gz 1250413 14850 Any Source .gz

1.a using your browser save as file to /usr/src

2. get to the console

2.a. if you aren't already root (#) su and cd /usr/src

3. decompress and extract the gzipped tarball using:

3.a gzip -d pcmcia-cs-3.2.1.tar.gz

3.b tar -xf pcmcia-cs-3.2.1.tar

3.c you now have /usr/src/pcmcia-cs-3.2.1/

4. change directories to the pcmcia subdirectory using cd /usr/src/pcmcia-cs-3.2.1/

4.a. build the pcmcia service using:

4.b make config

4.c make all

4.d make install

4.e your pcmcia module is built and now ready to be patched.


ORINOCO System Prep II : Getting it patched and working on the 2.4.20

0. base site: http://airsnort.shmoo.com/orinocoinfo.html

1. first get the Shmoo Group Orinoco Monitor Mode Patch from http://airsnort.shmoo.com/pcmcia-cs-3.2.1-orinoco-patch.diff

1.b using your browser save as file to /usr/src

2. get to the console

2.a. if you aren't already root (#) su and cd /usr/src

3. now it is important to copy the patch file into the previously created pcmcia source tree /usr/src/pcmcia-cs-3.2.1/ BEFORE attempting to patch it.

3.a copy it over using cp /usr/src/pcmcia-cs-3.2.1-orinoco-patch.diff /usr/src/pcmcia-cs-3.2.1/

3.b change directory to /usr/src/pcmcia-cs-3.2.1/ using cd /usr/src/pcmcia-cs-3.2.1/

3.c now run the patch patch –p0 < pcmcia-cs-3.2.1-orinoco-patch.diff

3. d the output of a successfully patch will be:

patching file wireless/hermes.c
patching file wireless/hermes.h
patching file wireless/orinoco.c
patching file wireless/orinoco.h

3.e if you receive error messages or have to answer prompted questions you have missed a step or have created a typo, go back and try again.

4. if you have been following along correctly your current path should be /usr/src/pcmcia-cs-3.2.1/ you can verify this by typing in pwd

5. change directories to wireless using cd /usr/src/pcmcia-cs-3.2.1/wireless/

6. you now need to rebuild the newly patched files using make all

7. after the rebuild you can copy your build files to a backup directory so you don't have to make them again using mkdir /usr/src/pcmciapatched ; cp ./*.o /usr/src/pcmciapatched

8. okay now comes a tricky part, pay attention carefully please:

8. a If you intend to compile the 2.4.20 kernel please skip to the section labled:

kernel source: Getting it,and Getting it ready for compiliation[using 2.4.20]

else

8.b. If you do not intend to compile a new kernel (such as 2.4.20) please skip to the section labled:

ORINOCO System Prep III : Getting it patched and working on the 2.4.20


kernel source: Getting it,and Getting it ready for compiliation[using 2.4.20]

0. base site: http://www.kernel.org/

1. 2.4.20 kernel url: http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.20.tar.gz

1.a. listed as: linux-2.4.20.tar.gz 28-Nov-2002 15:53 32.4M

1.b using your browser save as file to /usr/src

2. get to the console

2.a. if you aren't already root (#) su and cd /usr/src

3. decompress and extract the gzipped tarball using:

3.a gzip -d linux-2.4.20.tar.gz

3.b tar -xf linux-2.4.20.tar

3.d you now have your 2.4.20 kernel source tree in the subdirectory /usr/src/linux-2.4.20/

4. to check out your current kernel ls -l

4.b you will most likely see a soft symbolic link to the linux directory:

linux- -> /usr/src/linux-2.x.x/

4.c since you are going to be using another kernel remove this soft symolic link using rm linux

4.d now create a new link to your latest kernel source tree using ln -s /usr/src/linux-2.4.20/ linux

4.e now you can keep your older kernel source tree (/usr/src/linux-2.x.x/)for backup, or you are free to remove it, though there is no longer any need for it since you have just replaced it with /usr/src/linux-2.4.20/

4.f since we are here you are also free to remove your older generated modules from /lib/modules/2.x.x/ since we are going to make new ones for your new source tree in the recompile.

5. you are now ready to recompile your kernel


kernel recompile: The slackware way [using 2.4.20]

0. if you aren't root (#)already, su and cd /usr/src/linux

1. make mrproper

2. make xconfig (you can use whichever config you want: config, menuconfig, oldconfig)

2.a load your favorite saved config file: (personally I save my configs and just load them)

2.a.1 here is a sample config file that I use on one of my laptops: config.bw.sample

2.a.2 Take a good look at the sample provided above, it gets around the issue of not having the pcmcia/orinoco support in the kernel (YOU MUST HAVE IT AS A MODULE). If it is in the kernel you will be unable to patch it as described in the ORiNOCO System Prep Walkthrough.

3. make dep

4. make clean

5.a make zImage (if you don't think it will be a tiny kernel, skip otherwise it never hurts to hope)

5.b make bzImage (because my kernel is always too big)

6. make modules

7. make modules_install (this is a very important step if you just got the latest kernel and have no modules for this version)


kernel replacement

*if you are lazy, just use the script below

0. alright now that the kernel is fat dumb and happy it is time to use it. After jacking around enough here is the process you want to use to make sure all works well in the long run.

1. Use soft symbolic links (ln -s) for things you use a lot, and things that may change. This greatly helps out in making your scripts generic as can be.

2. in my /boot I have soft symbolic links to System.map and config

2.a (System.map->System.map-test) from /boot (ln -s System.map-test System.map)

2.b (config->config-test) from /boot (ln -s config-test config)

3. you want to copy your existing config that you used for your kernel compiliation (during make xconfig (step 2 above)) to your /boot directory

3.a cp /usr/src/linux/.config /boot/config-test (note that the file is "dot config" .config )

4. you want to copy your freshly compiled kernel to your /boot directory

4.a cp /usr/src/linux/arch/i386/boot/bzimage /boot/bzImage-test (you will notice that my lilo has an optional bzImage-test for repeated test compiles)

4.b. *warning* you never want to just overwrite your existing kernel, in case something loads that causes a hang or panic.

5. using your favorite editor open up /etc/lilo.conf and make sure this is added if it isn't already (/dev/hda2 is what I use, make sure it matches your current root in your /etc/lilo.conf):

# Linux bootable partition config begins
image = /boot/bzImage-test
root = /dev/hda2
label = 2.4.20.test
read-only
optional
# Linux bootable partition config ends

6. once you have saved /etc/lilo.conf use /sbin/lilo -v to update your system and get ready to use the fresh kernel.

7. go ahead and reboot to get the new kernel running by using /sbin/shutdown -r now

8. LILO should present 2.4.20.test, choose it and give it a whirl. If it hangs, or panics there is something loading that conflicts with your new kernel...

8.a you can start by troubleshooting your /etc/rc.d/rc.modules file (personally i load only what i need into my kernel, which is usually only what I want to load, so my rc.modules file is only a few lines)


ORINOCO System Prep III : Getting it patched and working on the 2.4.20

0. Continued from: ORINOCO System Prep II : Getting it patched and working on the 2.4.20

1. The reason we waited until we recompiled is that if you were compiling a new kernel such as 2.4.20 it creates a new matching /lib/modules/2.4.20 and if you were following the directions it is possible that the modules would not be in the correct directory until after you recompiled... causing the problem of where do I put my patched files...

2. Now we copy our patched files into the modules tree:

2.a. From /usr/src/pcmciapatched : cp /usr/src/pcmciapatched/*.o /lib/modules/2.4.20/pcmcia

2.b. From /usr/src/pcmcia-cs-3.2.1/wireless/ : cp /usr/src/pcmcia-cs-3.2.1/wireless/*.o /lib/modules/2.4.20/kernel/drivers/net/wireless/

3. go ahead and reboot to get the new patched modules running by using /sbin/shutdown -r now

4. during post insert your ORiNOCO PCMCIA card into the pcmcia slot, eventually you should hear a beep-beep sound... if you hear a beep-bong sound something has gone wrong... start from the beginning.

4.a you can start by troubleshooting your /etc/rc.d/rc.modules file (personally i load only what i need into my kernel, which is usually only what I want to load, so my rc.modules file is only a few lines)

5. Let's see if your card is recognized by typing /sbin/cardctl ident you should see something like:

Socket x: (x being whatever sock your card is in)
product info: "Lucent Technologies", "WaveLAN/IEEE", "Version 01.01", ""
manfid: 0x0156, 0x0002
function: 6 (network)

6. You are now ready to verify if your wifi card works.


ORINOCO :Verifying the patch works and the wifi card works

0. After booting up and hearing the beep-beep you know your card is being recognized time to test it out.

1. if you aren't root (#)already, su:

1.a we want to see what our current configuration looks like using ifconfig

2. if you do not see your ORiNOCO card listed type ifconfig eth1 up (eth1 being whatever you suspect your wifi card being)

3. check the config again with ifconfig if all is well you should see a new network device added that matches the mac for the card you inserted.

4. now we want to check if the patch we applied was truly successful using iwpriv or iwpriv eth1 (eth1 being whatever you suspect your wifi card being)

4.a. at the bottom of the list you should see monitor if you do not, the patch was not applied successfully and you must start from ORINOCO System Prep I : Getting it patched and working on the 2.4.20. You may or may not have to involve recompiling your kernel, since it is possible that you skipped taking pcmcia out of the kernel and into a module.

5. **WARNING** Currently the card look good make sure you are either using your own (Access Point) AP or using an AP that you have previously authorized before proceeding. You do not want to connect to someone's AP that had not been previously authorized, doing so may result in severe penalties in accorandce to local/state/federal laws.

6. Make sure your AP is on and configured correctly for your client wifi card.

6.a to check which AP you are currently detecting and will inadvertently use type iwconfig verify the ESSID "xxxxxxx" matches the one your AP is using and you can also verify the Access Point: xx:xx:xx:xx:xx:xx: mac address.

6.a. if you have your AP using DHCP let's see if we can get an IP from it using dhcpcd eth1 (eth1 being whatever you suspect your wifi card being)... you should now be ready to surf if your AP is connected and allowed to communicate with the Internet. If you have your ethernet cable plugged in, unplug it test your wifi out.


Kismet :Getting, Installing, and Configuring

*Work in Progress*

... actually I have been sitting here writing this document from the ground up since 10pm Sunday Feb 23rd 2003... I had gone to a birthday party and when I came back I had a few emails wanting this document, which i only had in written notes: I know...ewww... anyway I will finish the rest as soon I as get a few projects out of the way this week *after March 1st 2003. My hands are hurting and swollen and I need to pass out for some time before working on something due tomorrow... ack! :) anyway thanks for reading this document i hope it helps, If you have a question please check out the resources listed below before emailing me! :)

also note that no spell checker was harmed during this first draft....

- blackwave


Tips'n Tricks:

If you are lazy like me, or do this recompilation at least 20 times a day while fiddling around you may want to help script out your process noted above.

#!/bin/bash
# blackwave's lazy script
# i have already ln -s config-test config
cp /usr/src/linux/.config /boot/config-test
# i have already ln -s System.map-test System.map
cp /usr/src/linux/System.map /boot/System.map-test
#
cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage-test
# I already /etc/lilo.config image = /boot/bzImage-test
# and have it optional
/sbin/lilo -v
# end


Slackware Walkthroughs available:

Toshiba 2800-s201: Quirks

USB-Serial Hell : - How to use USB-SERIAL for gpsd, gpsdrive, and kismet

Tux is lost!: Find him and keep him there.

Kismet : Slackware 8.1 ( kernel 2.4.20) and Kismet 2.8.1 (*this document)


Online Resources:

Slackware 8.1 Hermes Configuration by Russ Rogers : http://www.securitytribe.com/whitepapers/orinoco.html

LinuxQuestions.org : http://linuxquestions.org/questions/index.php

Slackware Linux Essentials: http://www.slackware.com/book/

The Unofficial Revised Slackware Book Project: http://slackbook.yoshiwara.org.uk/

The Linux Kernel HOWTO: http://www.tldp.org/HOWTO/Kernel-HOWTO.html

Linux PCMCIA HOWTO : http://www.tldp.org/HOWTO/PCMCIA-HOWTO.html

Orinoco Monitor Mode Patch Page : http://airsnort.shmoo.com/orinocoinfo.html

Linux PCMCIA Information Page: http://pcmcia-cs.sourceforge.net/

wirelessleiden: http://www.wirelessleiden.nl/wcl/cgi-bin/moin.cgi/KisMet

Kismet: http://www.kismetwireless.net/documentation.shtml

The linux-wlan(tm) Company: http://lists.linux-wlan.com/

Netstumbler Forums: http://forums.netstumbler.com/

Google: http://www.google.com/


Suggested Reading Material:

Running Linux, Publisher: O'Reilly & Associates, Incorporated, ISBN: 0596002726

Linux in a Nutshell, Publisher: O'Reilly & Associates, Incorporated, ISBN: 0596000251


Personal Thanks:

I'd like to thank these individuals for the enlightenment they have shared in my journey (and putting up with me), hopefully this document will be of some use to others.

SecurityTribe.com : Chris, Russ

LinuxQuestions.org: Excalibur, SlackFan

EFNet #netstumbler: rambopfc

The Church of WiFi (http://www.ChurchOfWiFi.com/)


-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Hush 2.2 (Java)

mQGiBDy7CJcRBACmS12GxIjVhkhLV/V+42S6RgcJWUyBsx0cIQJ0b6wBiKCODrjMXkqL
jeoKRj+CH3ZMKNpjyQMz/iUik93YHMKpfZ7tmZcx+08jvHI01xM83N6dAORA/nc7ZIsj
+AUHAiHOopKFOIg8MdBkaqZr9jMSZ5qZeKknm1c2ctifGPWpnQCgwANjll5Dj7tv/E1d
vCMn2dB1nQUEAJC4A/bdjL23jMdPfaYv6c8dV0LwRzDp25RltF6aKKXDRhsezxpjFray
RDr5WSh9A0M6AGnCMSfN4cQHTI7EiTHYVKztwfwjriedDR4m5EOLG3fIeo+89BDvjI0R
TLsCXoCfmJBJkZzHvXYn/23AjuoomPD54abjp9hzWA5Jt2AaA/9KUWxhGidnq8HPLQt1
JgLcO8Qbbz3K/zLvx5XHtHQe7iey3/Bq2VsLZG3h0rpjfgf+pMw/bYHi53KwRNoUa2QP
cfk3MyRuPeK6cGpRPNa8QtHz6/JwaoJ5kSSaIwUNvM4M08xrYrkzPeyi2suaDzAlEWQs
Vt8OlWD+G7f49kzQTsJhBB8RAgAhBQI8uwiXAgcBFwyAEYpgZW/CY0uc2qKnPHoC+ecn
TLYpAAoJEFAeFEJV82ewe0sAn2WVw4MeIuTQgPwFK1cykBzAUPHaAKChYj4yJiqHxoNW
thOWYKRknY4CIbQWYmxhY2t3YXZlQGh1c2htYWlsLmNvbcJZBBMRAgAZBQI8uwiXBQkB
4TOABQsJCAcDAhUCAxYBAAAKCRBQHhRCVfNnsNE1AJ9lSSTnC7jj15+3D1eUr2E5roB5
CACggEiMI28gxLV+A2cNNc677+YPXoLCbAQTEQIALAUCPLsIbAMWAQAFGwAAAAAbHEh1
c2ggQ29tbXVuaWNhdGlvbiBERU1PIENBAAoJEHoC+ecnTLYpuAgAn16JV2LimRXJUo6R
i6+aql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