Pwnagotchi: what about a "wifi location" plugin? - no gps required

Created on 6 Oct 2019  路  15Comments  路  Source: evilsocket/pwnagotchi

A plugin that saves the "wifi location" of every handshake captured in a json file with the mac address and signal of the strongest aps.
The file can then be used with Google Geolocation API or Mozilla Location Service to retrieve the geographic location of the event.

Possible evolution:

  • Save the last location in a wifi location history file, usable to build a path map.
  • Send the last location to an external server through dns tunnel when conditions are good (not busy and with an access point with dns open available. Lot of cities have access points with paywall but the dns still usable). Something like "find my pwnagotchi" LOL

I know that location services can be implemented easily using a gps module or a connection to an external device through bluetooth. But a pwnagotchi that can work alone it's more fun!

What people think? If you like the idea I can work on it. The first two steps should be easy.

enhancement

Most helpful comment

Here some working code:
https://github.com/evilsocket/pwnagotchi/compare/master...zenzen666:geowifi-plugin
At every new handshake it saves a json file with the mac addresses of the 6 strongest aps.
The file is usable with google or mozilla geolocation api services.

All 15 comments

I think this was the first plugin ever created for pwnagotchi^^
See https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/plugins/default/gps.py

See https://github.com/evilsocket/pwnagotchi/blob/master/pwnagotchi/plugins/default/gps.py

yeah but the plugin requires a gps receiver.

the idea is about a way to save location without have a gps receiver or any external device connected to the pwnagotchi.

Now i understand what you mean! The APs are like fix points and can be used as coordination system. Interesting ^.^

@dadav: yes! It's also they way your phone shows you your location when gps is not available or bad.
Take a loot at:
https://location.services.mozilla.com/api
https://developers.google.com/maps/documentation/geolocation/intro

Here some working code:
https://github.com/evilsocket/pwnagotchi/compare/master...zenzen666:geowifi-plugin
At every new handshake it saves a json file with the mac addresses of the 6 strongest aps.
The file is usable with google or mozilla geolocation api services.

here the version that convert the wifi location in geo location when internet is available
https://github.com/evilsocket/pwnagotchi/pull/211/files

@zenzen666 Good work^^ I will test it in the evening!!

We can also use these location data in other plugins like grid or wigle

Like, if .gps.json is present use it, otherwise check for presence of .geo.json

@evilsocket What do you think?

please dont overwrite existing .gps file.
add gps data with timestamp to existing json data.

i see overwriting of the json file in the gps plugin code, instead of adding new gps data.
but i need to check this later, after bring my gps online.

please dont overwrite existing .gps file.
add gps data with timestamp to existing json data.

i see overwriting of the json file in the gps plugin code, instead of adding new gps data.
but i need to check this later, after bring my gps online.

they are not overwritten^^

Here some working code:
master...zenzen666:geowifi-plugin
At every new handshake it saves a json file with the mac addresses of the 6 strongest aps.
The file is usable with google or mozilla geolocation api services.

check my pr plz

@dadav I tested the code with the last image and everything seems fine. thank you!

PR merged with: https://github.com/evilsocket/pwnagotchi/pull/231
thank you @evilsocket and all the people who helped me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evilsocket picture evilsocket  路  8Comments

myasn1k picture myasn1k  路  7Comments

agent932 picture agent932  路  4Comments

mrseeker picture mrseeker  路  7Comments

Shadyman picture Shadyman  路  7Comments