Sliim / kis2kml

A python script to parse Kismet netxml into a SQL database and query it to generate Google Earth KML files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

kis2kml

A python script to parse wireless networks into a sqlite3 database 'wireless.db' and query this database to generate Google Earth KML files.

The script takes input from the wardriving suite Kismet, saved in netxml format, and produces a kml file that allows easy visualization of the network data inside Google Earth.

kis2kml is essentially a rewrite in Python of some of the functionality of GISKismet (https://github.com/xtr4nge/giskismet), which is written in Perl and comes bundled in with Kali Linux.

I don't mind GISKismet, it does the job relatively well, but I wanted to be able to make use of signal strength information in SQL queries, which GISKismet ignores, to be able to filter networks that one can realistically attach to. I also don't think GISKismet handles clients well. I found Perl too hard to learn, so I taught myself Python and wrote a script to do the job.

When exporting databased networks, you can export the whole database to a kml file, or pass the program an optional SQL query to select networks that conform with the given query. The SQL query must be inside double quotation marks.

The Author in no way advocates the cracking of WiFi encryption or connecting to private networks without permission. Mapping of wireless access points does not violate any laws in the author's area, though I cannot comment on the legality or illegality of wardriving in your country or area. Please keep this in mind before using this program to parse wardriving data.

USAGE:

kis2kml [options]

   Options:
      -i <file-to-import.netxml>        Imports Kismet network data from a
                                        netxml file into a sqlite3 database
                                        ('wireless.db')
      -x <file-to-write-kml-to.kml>     Exports all network data to a Google
                                        Earth KML file.
           -q <'SQL query'>             Optional SQL query to restrict results
                                        to networks matching this query. Query
                                        has to be a valid SQL query and inside
                                        quote marks ('SQL query').
           -c                           Restrict export to networks that have
                                        clients attached.

Usage examples:

kis2kml -i kismet-output-file.netxml

kis2kml -x all-database-contents.kml

kis2kml -x wep-only.kml -q "SELECT * FROM networks WHERE encryption = 'WEP'"

kis2kml -x strong_nets.kml \
        -q "SELECT * FROM networks WHERE max_signal_dbm > -60"

kis2kml -x strong_wep.kml \
        -q "SELECT * FROM networks WHERE max_signal_dbm > -60 AND \
        encryption = 'WEP'" -c

kis2kml -x open_but_cloaked.kml \
        -q "SELECT * FROM networks WHERE cloaked = 'true' AND \
        encryption = 'OPEN'"

Tables in database ('wireless.db')

  • networks
  • clients
  • run

Table columns in networks:

  • 'wn_num'
  • 'bssid'
  • 'essid'
  • 'encryption'
  • 'ssid_wpa_version'
  • 'ssid_type'
  • 'packets'
  • 'beaconrate'
  • 'wps'
  • 'wps_manuf'
  • 'dev_name'
  • 'model_name'
  • 'model_num'
  • 'cloaked'
  • 'manuf'
  • 'channel'
  • 'numclients'
  • 'first_seen'
  • 'last_seen'
  • 'max_speed'
  • 'maxseenrate'
  • 'max_signal_dbm'
  • 'max_noise_dbm'
  • 'peak_lat'
  • 'peak_lon'

Table columns in clients:

  • 'bssid'
  • 'client_mac'
  • 'client_max_sig'

Table columns in run:

  • 'start_time'

About

A python script to parse Kismet netxml into a SQL database and query it to generate Google Earth KML files.

License:GNU General Public License v3.0


Languages

Language:Python 100.0%