![]() |
|
|||||||
| Register | Search | Today's Posts | Mark Forums Read |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#1 (permalink) |
|
Humourless EuroMod.
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. Last edited by Dutch : 02-09-2006 at 10:21 AM. Reason: Missed the ap_manuf/client_manuf info. |
|
|
|
|
|
#2 (permalink) |
|
Humourless EuroMod.
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. Last edited by Dutch : 02-08-2006 at 08:27 PM. |
|
|
|
|
|
#3 (permalink) |
|
Humourless EuroMod.
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... Last edited by Dutch : 02-08-2006 at 08:05 PM. |
|
|
|
|
|
#5 (permalink) |
|
Humourless EuroMod.
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. |
|
|
|
|
|
#6 (permalink) |
|
Humourless EuroMod.
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. |
|
|
|
|
|
#7 (permalink) |
|
SpoonfeederExtraordinaire
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. |
|
|
|
|
|
#8 (permalink) |
|
SpoonfeederExtraordinaire
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.].. |
|
|
|
|
|
#9 (permalink) | |
|
Humourless EuroMod.
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
|
Quote:
Dutch
__________________
All your answers are belong to Google. SEARCH DAMMIT! Warning. Warning. Low C8H10N4O2 level detected. Operator halted.... |
|
|
|
|
|
|
#10 (permalink) |
|
Psychic Amish Stumbler
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. |
|
|
|
|
|
#11 (permalink) | |
|
Did you do the math?
Join Date: Apr 2002
Location: Villa Straylight
Posts: 10,000
|
Quote:
![]()
__________________
Thorn Sex and Violence. You can't enjoy one, if you don't survive the other. (And that works both ways...) |
|
|
|
|
|
|
#13 (permalink) | |
|
Humourless EuroMod.
Join Date: Mar 2004
Location: City of Mermaids, Denmark
Posts: 6,813
|
Quote:
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']);
}
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
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"; 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. |
|
|
|
|
|
|
#15 (permalink) |
|
Not feeling funny...
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 |
|
|
|