NetStumbler.org Forums

Go Back   NetStumbler.org Forums > Software > Windows
Register Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old 02-08-2006   #1 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Visualizing site coverage with Google Earth (slow for dial-up)

In this thread up in the Scripts section, I promised to post a pic of the output from the Google Earth conversion script I posted there.

I've decided to make it into a small how-to use Google Earth for WiFi Site Surveys. The thread will have some large pictures posted, and before people start to complain : RHIP, as well as I got the permission from our very own Voice Of Reason, Thorn.

First of all, you need Google Earth. Pick it up from http://earth.google.com/ , then install it.
Then download and install the PHP5 engine from http://www.php.net/ (For Windows, take hhe full package, not the installer. The installer only have the php-cgi executable, not the php standalone executable).
Finally copy the php script I posted in the above thread and paste it into a notepad document, and save it as kismet-to-kml.php
For the php script to work, you also need to have the ap_manuf and the client_manuf files from kismet in the same folder as the php script. These two files comes with the kismet package, and are normally located with the kismet configuration files (depending on your distro : /etc/kismet, or /usr/share/kismet).

Now you have the tools for generating the output of the site survey. So lets go do one. In this case I've used kismet to check out the local school, who just got WiFi last year.
I fired up Google Earth, and zoomed in on the area of the site I wanted to check, emailed the picture to myself, and opened it in my favourite graphicseditor. I then made an educated guess on what route I needed to go down, in order to see if the school's WiFi radiated down there.

The green area is the school grounds and buildings. The red line is the route I decided to take, based on where there might be LOS to the school buildings and grounds. I then printed out the edited picture, and went to the starting point of my route.
Attached Images
File Type: jpg newuvt-wl1.jpg (74.4 KB, 908 views)

Last edited by Dutch : 02-09-2006 at 10:21 AM. Reason: Missed the ap_manuf/client_manuf info.
Dutch is offline   Reply With Quote
Old 02-08-2006   #2 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
The gear used for the site survey was :
Dell C600 laptop with an Atheros based 802.11b/g PCCard WiFi nic.
No external antenna.
A Holux GM210 USB GPS puck.
Kismet running under Debian Linux.
Laptop placed in a Targus PC Backpack, with the PC card pointing up. GPS Puck placed under one shoulderstrap.

Kismet had been configured to only scan channels 1, 6, 11, 13, with a 4 channels Page Ranking second scan time. (kismet.conf, channelvelocity and sourcechannels statements)
Kismet had been configured to only detect and track the MAC adresses in use at the school, or actually only detect and track the OUI of the equipment that the school uses. In this case Zyxel gear, filtered in kismet.conf with the filtertracker statement - filter_tracker=BSSID(00:A0:0C:C5:8F:00:00/FF:FF:FF:FF:00:00).
These parameters had been checked out in advance, i.e. which channels and which MAC's that the schools WiFi network utilized.

Kismet had also been configured to speak out detected network SSID's as well as sounding off everytime kismet detected a packet. (kismet_ui.conf file, sound, sound_new, sound_traffic, and speech parameters).



After following the route mapped out on the Google Earth picture, I took the resulting kismet.xml, kismet.gps, and kismet.csv files, to post process into a Google Earth kml file.
The first step is to run the php script. In the example below the php engine is installed in \program files\php\, the kismetfiles are in \kismetdata\ and the php script is also in \kismetdata\

Open a command prompt on your windows box.
Enter the following commandlines :

cd \kismetdata<enter>
"\program files\php\php.exe" -f kismet-to-kml.php kismet kmz<enter>

The first command changes to the folder containing the kismet.gps, kismet.xml, kismet.csv and the php script files
The second command executes the PHP5 engine, telling it to compile and run the kismet-to-kml script file, with the filename (without any suffix) of the kismet.gps and kismet.xml files, and to output both a kml and and zipped kmz file.

Please note that if the .gps file contains errors, such as missing the closing </gps-run> tag or having malformed <gps-point=........> lines, there will be warnings and errors.
Remember that kismet .csv, and .xml files are written afresh at every data cycle, but .gps files are appended to. If you didn't exit kismet properly, then chances are high, that the .gps file will contain a malformed <gps-point=....> line and missing the </gps-run>.
Just open the .gps file in any texteditor that can handle large files, move to the bottom of the file, delete the erroneous <gps-point=...> line and add a closing </gps-run> tag on the last line.

After it has churned away for a bit (1½ min for the 24 networks and 5 Mb data in this example), there will be a kismet.kml and a kismet.kmz file in the \kismetdata\ folder.

Doubleclick the kismet.kmz file to open it in Google Earth. Google Earth will zoom to the location of the first AP, and show the icons for the detected AP's.
They will be way off, as the .xml file only contains the locations coordinates from when Kismet first detected the AP and when it last detected the AP.
Untill I get the the time to change the php script, we need to do some hand editing, in order to get the program to show the location where Kismet had the best signal of the AP, which is as close to the actual location we can get, without doing triangulation.
Enter the kismet.csv file. The last coordinate pair in each record here, is the location where Kismet detected the highest signal level.

Go through each displayed accesspoint in the My Places window in Google Earth, rightclicking the Access point, select Edit, and then click the Advanced checkmark, and then the Location tab, put in the corresponding Lat/Lon coodinates for each AP, then click apply.

Now the icons for the detected AP's will be more correctly placed.
Attached Images
File Type: jpg newuvt-wl2.jpg (48.3 KB, 790 views)

Last edited by Dutch : 02-08-2006 at 08:27 PM.
Dutch is offline   Reply With Quote
Old 02-08-2006   #3 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Now the fun begins.. See the 3D Visualized view entry in the My Places window ? Expand it, and voila, you can mark the individual AP's, to get a visualized display of the coverage of each.
Mark them all off, and you have the area where the school's network is detecable. In this case, the school grounds, a 150 x 87 meter area (492 x 287 feet) is amply covered by the AP deployed.. Actually IMHO they have overdone it, and are bleeding signals much to far away...
Attached Images
File Type: jpg newuvt-wl3.jpg (79.1 KB, 801 views)

Last edited by Dutch : 02-08-2006 at 08:05 PM.
Dutch is offline   Reply With Quote
Old 02-08-2006   #4 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
In this picture I've unchecked the AP icons, thereby being able to see that the any area of the school grounds are covered by more than 1 AP.
Attached Images
File Type: jpg newuvt-wl4.jpg (78.2 KB, 785 views)
Dutch is offline   Reply With Quote
Old 02-08-2006   #5 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
And in the final picture, I've tilted the view closer to the ground, rotated the view so Copenhagen Airport and the bridge to Sweden is in view, selected only two of the AP's and their corresponding coverage maps.
As you can see, the heights of the coverage maps differ, giving a visual clue to the channel in use. Additionally, I've rightclicked on the coveragemap-entry for the second AP in My Places window, and edited the colour of the map to blue.
Attached Images
File Type: jpg newuvt-wl5.jpg (66.3 KB, 793 views)
Dutch is offline   Reply With Quote
Old 02-08-2006   #6 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
If you don't use kismet, fear not.. There are several scripts and applications that can generate Google Earth kml files from netstumbler data. One of the better ones, are made by beakmyn from this forum. His tagline contains a link to his program, and I'd be amazed if he doesn't include the coverage map function in the next version of his great Netstumbler utility.

So there you have it, a quick and easy way to visualize a site's coverage via Google Earth.
Enjoy and have fun...

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....

Last edited by Dutch : 02-08-2006 at 05:59 PM.
Dutch is offline   Reply With Quote
Old 02-08-2006   #7 (permalink)
theprez98
SpoonfeederExtraordinaire
 
theprez98's Avatar
 
Join Date: Jan 2005
Location: Maryland
Posts: 3,613
Nice work Dutch! If only it didn't place my AP in South America! (GPS snafu)

Actually, the rest of the map worked fine. I tried a second series of files, and they worked fine too. The only downside is that Google Earth has crap for State College. The images are worthless at a street level, and I doubt they'll do anything to update that anytime soon.
__________________
:00475160 0E A6 AE A0 19 E3 A3 46 .......F
:00475168 0D 65 17 0C 53 70 6F 6F .e..Spoo
:00475170 6E 66 65 65 64 65 72 2E nfeeder.
:00475178 45 78 74 72 61 6F 72 64 Extraord
:00475180 69 6E 61 69 72 65 5D 3B inaire];
:00475188 8B 9E 92 5A FF 5D A6 F0 ...Z.]..

Last edited by theprez98 : 02-08-2006 at 07:17 PM.
theprez98 is offline   Reply With Quote
Old 02-08-2006   #8 (permalink)
theprez98
SpoonfeederExtraordinaire
 
theprez98's Avatar
 
Join Date: Jan 2005
Location: Maryland
Posts: 3,613
How do I crack wep with Google Earth?

Please help me, I can't find the "crack this AP" button.

__________________
:00475160 0E A6 AE A0 19 E3 A3 46 .......F
:00475168 0D 65 17 0C 53 70 6F 6F .e..Spoo
:00475170 6E 66 65 65 64 65 72 2E nfeeder.
:00475178 45 78 74 72 61 6F 72 64 Extraord
:00475180 69 6E 61 69 72 65 5D 3B inaire];
:00475188 8B 9E 92 5A FF 5D A6 F0 ...Z.]..
theprez98 is offline   Reply With Quote
Old 02-08-2006   #9 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by theprez98
How do I crack wep with Google Earth?

Please help me, I can't find the "crack this AP" button.

You are SOOOOO banned....

Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....
Dutch is offline   Reply With Quote
Old 02-08-2006   #10 (permalink)
streaker69
Psychic Amish Stumbler
 
streaker69's Avatar
 
Join Date: Jul 2004
Location: Virginville, BlueBall, Bird In Hand, Intercourse, Paradise, PA
Posts: 11,638
How does GoogleEarth know the exact location of all these AP's?

Do you think you could use it to find Blackwave or Devine?
__________________
"One of these days, I'm going to cut you to pieces."

If you're offended by this post, please feel free to report it to one of the many helpful moderators of this forum.

Thank you.
streaker69 is offline   Reply With Quote
Old 02-08-2006   #11 (permalink)
Thorn
Did you do the math?
 
Thorn's Avatar
 
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,000
Quote:
Originally Posted by streaker69
Do you think you could use it to find Blackwave or Devine?
You're next.
__________________
Thorn
Sex and Violence. You can't enjoy one, if you don't survive the other. (And that works both ways...)
Thorn is offline   Reply With Quote
Old 02-08-2006   #12 (permalink)
Scruge
Nyuk nyuk!
 
Scruge's Avatar
 
Join Date: Jan 2005
Location: TX
Posts: 1,354
Dutch, that's damn slick.

After I get my desk cleared of my back log of projects I'd like to see how you did the 3ds.
Scruge is offline   Reply With Quote
Old 02-08-2006   #13 (permalink)
Dutch
Humourless EuroMod.
 
Dutch's Avatar
 
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
Quote:
Originally Posted by Scruge
Dutch, that's damn slick.

After I get my desk cleared of my back log of projects I'd like to see how you did the 3ds.
Not my work.. See the info in the script. I just made some minor changes and bugfixes so far.
The polygons aren't that hard to figure out.
Collate the gps-point data for each BSSID, and use them to make the boundaries of the polygon.
Code:
/*******************
* parse .gps file and build gps coordinates index
********************/
foreach($gps->{'gps-point'} as $value)
{
$coordinates[(string) $value['bssid']][] = array((string) $value['lon'], (string) $value['lat']);
}
Then make the polygon :
Code:
/*******************
* assemble polygon placemark
********************/

if($network['channel'] != '0') //we don't display networks with no height
{

$poly .= "<Placemark>\n<name><![CDATA[";
if(empty($network['SSID'])) $poly .= "no ssid";
else $poly .= $network['SSID'];
echo "SSID:".$network['SSID']." BSSID:".$network['BSSID']."\n";
$poly .= "]]></name>\n<visibility>0</visibility>\n<open>0</open>\n";
$poly .= "<Style>\n\t<LineStyle>\n\t<width>1.5</width></LineStyle>\n\t<PolyStyle>";

if($xml->{'wireless-network'}[$key]['wep'] == 'true') //set color 
$poly .= "<color>8f00ff00</color>\n"; //green, closed
elseif($meta[$key]['cloaked'] == 'true')
$poly .= "<color>7dff0000</color>\n"; //blue, cloaked
else
$poly .= "<color>7d00ff00</color>\n"; //red, open

$poly .= "</PolyStyle>\n</Style>\n<Polygon>\n<extrude>1</extrude>\n<tessellate>0</tessellate>\n";
$poly .= "<altitudeMode>relativeToGround</altitudeMode>\n<outerBoundaryIs>\n<LinearRing>\n<extrude>0</extrude>";
$poly .= "<tessellate>0</tessellate>\n<altitudeMode>clampToGround</altitudeMode>\n<coordinates>";

$poly_alt = $network['channel']*10;

foreach($coordinates[$network['BSSID']] as $index => $gpoints)
{
if($gpoints[0] != $coordinates[$network['BSSID']][$index-1][0]
&& $gpoints[1] != $coordinates[$network['BSSID']][$index-1][1]) //remove duplicates
$poly .= $gpoints[0].", ".$gpoints[1].", ".$poly_alt." ";
}

$poly .= $coordinates[$network['BSSID']][0][0].", ".$coordinates[$network['BSSID']][0][1].", ".$poly_alt." "; //finish polygon at first coordinate
$poly .= "</coordinates>\n</LinearRing>\n</outerBoundaryIs>\n</Polygon>\n</Placemark>";

}
} //end foreach
and finally output it to the kml file
Code:
//output 3D visualized polygons
$kml_final .= "<Folder>\n<name>3D visualized view</name><open>0</open>\n";
$kml_final .= $poly;
$kml_final .= "</Folder>\n";
Converting the above snippets of code to the language of your choice shouldn't be to hard, albeit I'm not so sure dBase 7.5 has the constructs for easy looping and temporary arrays.


Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT!
Warning. Warning.
Low C8H10N4O2 level detected. Operator halted....

Last edited by Dutch : 02-08-2006 at 08:01 PM.
Dutch is offline   Reply With Quote
Old 02-08-2006   #14 (permalink)
wiresalot
Registered Member
 
wiresalot's Avatar
 
Join Date: Mar 2005
Location: Slightly off center.
Posts: 483
Dutch, You the man!!!, Great job!!, thats awesome.

wiresalot
wiresalot is offline   Reply With Quote
Old 02-09-2006   #15 (permalink)
Monitr7
Not feeling funny...
 
Monitr7's Avatar
 
Join Date: Jan 2003
Location: Rebrandsoftware's mom's house...
Posts: 1,699
So if I'm in the coverage area, it's okay to use the inturweb, right?
__________________
WTOTD Industries - Where quality is Job #3.

G8tK33per doesn't care about the tarded people!
-Kanye West
Monitr7 is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Google
 
Web NetStumbler.org

All times are GMT -7. The time now is 10:11 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 ©2007, Crawlability, Inc.


All messages express the views of the author and are for entertainment purposes only. Netstumbler.org cannot be held responsible for the authenticity of the content or the actions of its members. By using this site and its services, you warrant that you will not post any messages that are discriminating, obscene, hateful, threatening, or otherwise violates any laws and you release Netstumbler.org from any future claims of any kind whatsoever including, but not limited to, addiction and loss of productivity. All forum messages, private messages and any other content are properties of Netstumbler.org. Even if publicly available, personal or copyrighted information are not to be posted without the consent of the owner. Distribution of licensed and copyrighted materials in any way not endorsed by the copyright owner is strictly prohibited. You may not use this site and its resources to spam other sites or individuals or perform any action that violates any law. Items sold or bought in the For Sale forum are sold as is and no warranty or insurance of any kind is provided. Netstumbler.org cannot be held responsible for the outcome of any transactions and no warranty of any kind is provided, either express or implied. Vulgar words are not allowed in the subject lines ; they may be used in the message body in any forum. The Administrator, Super Moderators and Moderators of Netstumbler.org have the right to remove, edit, move or close any thread for any reason and to reveal your identity and other known information in the event of a complaint or legal action arising from any message posted by you.