Skip to content

110835958705212655

Run kismet on yo’ router and kismet client on Windows XP

I’m quoting everything here in case I end up loosing the link someday.

February 03, 2005
WRT54G running kismet and kismet client on Windows XP

There was a question on a wireless network mailing list if there was any experience
with Kismet on the WRT54G running OpenWRT.

This idea played around in my head for some time but I was stopped
because you had to run the kismet server part on your server or pc
and I could not find a kismet client for Windows XP.

Till I got that email and decided to go on a Tech-Quest :
WRT54G with OpenWRT + kismet-drone + kismet-server
and kismet_client for windows (XP) running on Cygwin.

Mentioned in the email was Rop’s OpenWRT software repository

When I read (t)his page at the bottom was mentioned something very interresting to me,
Rop has kismet-server running on the WRT and had a kismet_client for ‘windows’ zip file listed.

A big light bulb started flashing above my head :)

So I went on a Tech-Quest and this is the result.

So, how did I get that working ? Read on !

- I have an WRT54G with OpenWRT and OLSRD 1.4.8 on ETX

- Laptop with XP SP2

I logged in with ssh on my WRT and verified it was actually connected to the internet
(using another ANC member as my uplink to the internet, OSLR rocks !!!)

- First I added Rop his software repository to my /etc/ipkg.conf using vi I added this line :
src rop http://www.xs4all.nl/~rop/openwrt
and ran on the prompt the command : ipkg update

- I decided to be not too bold and first install an ‘easy’ package just to get myself familiar with ipkg and the system and after reading rop’s page I decided to go for : settime

~ First because I already noticed that booting the WRT makes it forget the date and time but more important because I saw settime did not have any dependencies.

- I ran the command : ipkg install settime
and magic happened, using an ANC member his internet uplink (not mine…)
the package was downloaded then decompressed, installed and it got started. Zero problems !

[OLSR network users only]
I did notice though that because settime is started as /etc/init.d/S48ntp and OLSR is started as /etc/init.d/S53olsrd the OLSR network is not ‘up’ when settime runs.

The settime package also creates /etc/init.d/S48cron that runs settime through an also created by the settime package crontab pretty frequently so it should correct itself, but still :)
[/OLSR network users only]

As even after a reboot everything still worked (hehe, paranoia mode = on)) I decided to go for it
and install rop his kismet-drone and kismet-server packages.

- I ran the command :
ipkg install kismet-drone
This downloaded, decompressed, installed and got kismet-drone started.

NOTE :
As kismet and OLSRD both want to do different things with the wireless environment of the WRT they start interfering with each other. Pretty logical to me.

As my WRT his main task is to do OLSR I decided to make sure kismet gets installed but not run at boot. For that I moved /etc/init.d/S60kismet_drone to /etc (and just to be complete copied /etc/init.d/S53olsrd to /etc )

- Now I killed the kismet_drone process that was started by the ipkg install and got OLSRD working on the WRT again as I needed my uplink to work for the install of the kismet-server package :)

- So I ran the command :
ipkg install kismet-server
This downloaded, decompressed, installed and got kismet-server started.

NOTE :
just to be double sure I had a second ssh session to my WRT and the moment the kismet-server package got decompressed by ipkg I started kismet-drone by running : ./etc/S60kismet_drone on the command line.

Why ?
I figured that very maybe kismet-server had a dependency when configuring or starting itself and needed kismet-drone to be already running… (Yeah, I am kinda carefull..)

Installing kismet-server took several minutes and it worked like a charm. Just wait a bit.

Again, as I do not want kismet-server to start at boot I moved the script /etc/init.d/S62kismet_server to /etc

- Now I killed the kismet_drone -and- the kismet_server processes and got OLSRD working on the WRT again as I wanted to see if OLSR was still behaving as it should and even rebooted once more to see if OLSR was started by default and kismet-drone and kismet-server were not.

Eveything was as it should be. Happy me :)

Now I wanted to see if kismet was able to work on my WRT and if the windows client that rop supplied could connect to the kismet-server.

- I downloaded the kismet_client_win32.zip and quickly discovered this was a Cygwin client
(not a MS windows client).

Not a big problem, I know Cygwin from some past dealings with it and though I think Cygwin is an pretty unholy idea and project, certainly as you -still- have to recompile your code to get things working under Cygwin, it -does- work and I am very impressed by the quality and spirit of the Cygwin people. We need more people like them.

Anyway on with the installation :)

- To get Cygwin working on my XP SP2 laptop I went to the Cygwin website and downloaded and ran the Cygwin installation wizard.

~ I installed it pretty straight forward, took all the defaults, had Cygwin install its suite of tools and packages standard out of the box and just defaulted everything to the end.

- I unzipped the kismet_client_win32.zip to c:\Program Files\Kismet Client and configured the “host” line in the kismet_ui.conf file as the the internal IP-address of my WRT is not 192.168.1.1. I like to be able to move all my equipment into each others networks and only my home core router has a .1 address. My WRT has 192.168.1.2

- It was time to start kismet on the WRT, using ssh I logged into my WRT, killed OLSRD and started kismet-drone and kismet-server with
./etc/SS60kismet_drone
and
./etc/SS62kismet_server

You can see this on the JPG in the upper left black box, Yeah at the time of the screenshot I was still tinkering with the location of the kismet startup scripts, at the moment they -are- in /etc

The WRT did not crash and no huge errors so on with the show !

- Now lets start kismet_client.exe and for that you first have to start the Cygwin ‘environment’, for that purpose you have a shortcut on your desktop. When you start that you get into a unix shell lookalike.

As I like to be organized I ‘installed’ (unzipped really) kismet-client in
C:\Program Files\Kismet Client
in Cygwin you have to first move to C: before you can ‘dive’ into the directory structure of your disk, so first : cd C: and then an : cd Program Files\Kismet Client there you start kismet_client with :
./kismet_client

You can see this on the JPG in the middle white box.

And what do you know, it actually all works !! Fantasic !!!

See the black box in the lower right corner of the JPG for the result.

I got the usual ugly terminal window with very quickly lots and lots of basestations in my neigborhood, at the time of the screen shot I was playing around with the options of the kismet_client for about 30min and it already found 19 (!) base stations, fun! (My WRT is connected to a 4 meter high antenna pole on top of my 3 stories appartment building but still it is a lot…)

So finally I can run kismet client on windows :) :) :)

And the unix peeps can now install kismet-server on the WRT and only need to run the kismet_client on their unix desktops…

ps, because of my setup of the kismet startup scripts outside /etc/init.d I now only had to reboot to get my WRT back in OLSR and connected again to the anc-etc network.

Joy ! :)

pss,
I guess I will have a second WRT on my roof that will be 100% dedicated to kismet pretty soon as with both OLSR and Kismet-drone and Kismet-server installed on the box I have 60 KB left for things like logging and that is kinda very very little.

It’s always nice to see someone else with so much time on their hands.

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*