Giter Club home page Giter Club logo

wardriver-pwnagotchi-plugin's Introduction

๐Ÿ›œ Wardriver Pwnagotchi plugin

Discord server GitHub Release GitHub issues GitHub License

A simple plugin for wardriving on your pwnagotchi. It saves all networks seen by bettercap, not only the ones whose handshakes has been collected. In this version all the operations are done through the plugin's webui. Inside of it, you can see the current wardriving session stats, global stats (including your WiGLE profile), all networks seen by your pwnagotchi and also plot the networks on map.

You can still upload automatically the sessions to WiGLE, but you can also uploads them manually using the webui.

Join our crew and start sailing with us! ๐Ÿดโ€โ˜ ๏ธ

Open https://wigle.net/stats#groupstats, search for "The crew of the Black Pearl" and click "join"

๐Ÿš€ Installation

Important

This plugin requires a GPS module attached to your pwnagotchi. You also need to activate and configure the gps plugin (or another plugin that configures bettercap gps function).

If you want to enable WiGLE upload, you need a valid API key.

  1. Login inside your pwnagotchi using SSH:
  1. Go to custom_plugins directory where all custom plugins of your Pwnagotchi are stored:
cd /path/to/custom_plugins/directory
  1. Download the plugin code:
wget https://github.com/cyberartemio/wardriver-pwnagotchi-plugin/archive/main.zip
  1. Extract files and remove useless files:
unzip main.zip &&
mv wardriver-pwnagotchi-plugin-main/wardriver.py . &&
mv wardriver-pwnagotchi-plugin-main/wardriver_assets .&&
rm -r wardriver-pwnagotchi-plugin-main main.zip
  1. Edit your configuration file (/etc/pwnagotchi/config.toml) and add the following:
# Enable the plugin
main.plugins.wardriver.enabled = true
# Path where SQLite db will be saved
main.plugins.wardriver.path = "/root/wardriver"
# Enable UI status text
main.plugins.wardriver.ui.enabled = true
# Enable UI icon
main.plugins.wardriver.ui.icon = true
# Set to true if black background, false if white background
main.plugins.wardriver.ui.icon_reverse = false
# Position of UI status text
main.plugins.wardriver.ui.position.x = 7
main.plugins.wardriver.ui.position.y = 95
# Enable WiGLE automatic file uploading
main.plugins.wardriver.wigle.enabled = true
# WiGLE API key (encoded)
main.plugins.wardriver.wigle.api_key = "xyz..."
# Enable commercial use of your reported data
main.plugins.wardriver.wigle.donate = false
# OPTIONAL: networks whitelist aka don't log these networks
main.plugins.wardriver.whitelist = [
    "network-1",
    "network-2"
]
# NOTE: SSIDs in main.whitelist will always be ignored
  1. Restart daemon service:
sudo systemctl restart pwnagotchi

Done! Now the plugin is installed and is working.

โœจ Usage

Once configured, the plugin works autonomously and you don't have to do anything. Check the sections below to learn more about how it works.

๐Ÿš— Wardriving

Everytime bettercap refresh the access points list (normally every 2 minutes more or less), the plugin will log the new networks seen along with the latitude, longitude and altitude. Each time the service is restarted a new session will be created. If you have enabled it, the plugin will display the total number of networks of the current session on the pwnagotchi display.

If you don't want some networks to be logged, you can add the SSID inside wardriver.whitelist array in the config. Wardriver does not report networks whose SSID is contained within the local and global whitelist.

Note: the SSIDs inside the main.whitelist array will always be ignored.

๐ŸŒ WiGLE automatic upload

If you have enabled it, once internet is available, the plugin will upload all previous session files on WiGLE. Please note that the current session will not be uploaded as it is considered still in progress. Don't worry, it'll be uploaded the next time your pwnagotchi starts with internet connection.

If you just want to upload sessions to WiGLE manually you can still do it. All you have to do, is configuring your api key and use the corresponding button in the sessions tab of the web ui. You can also download the CSV file locally for a specific session.

โค๏ธ Contribution

If you need help or you want to suggest new ideas, you can open an issue here or you can join my Discord server using this invite.

If you want to contribute, you can fork the project and then open a pull request.

wardriver-pwnagotchi-plugin's People

Contributors

cyberartemio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wardriver-pwnagotchi-plugin's Issues

Skip session creation when pwnagotchi is in MANU mode

When pwnagotchi starts in MANU mode, the wardriving session initialization should be skipped because on_unfiltered_ap_list is never called since Bettercap can be used by the user.

Currently the empty session is removed at the next start of the service, but this can be improved by directly skipping the creation instead.

Also, inside the web ui, in the current-session tab, a warning message should be present telling the user that pwnagotchi is in MANU mode and the wifi scan will not be run.

Add plugin web page

Would be cool (and maybe useful) to add wardriver also to pwnagotchi's web ui. In the web ui it can display lot of stuff and stats from WiGLE if enabled.

A list of what can be added (these are just ideas for now, still need to be thought about):

  • previous sessions and their WiGLE status (if sessions_merge is disabled)
  • stats of current wardriving session
  • list of all networks seen (when session_merge is enabled)
  • map with marks (for a session or for all networks seen)
  • WiGLE stats of the user
  • if WiGLE upload is disabled, sessions_merge is disabled and an API key is provided in the config, add a button to upload single sessions file to WiGLE (like a manual upload instead of automatic upload)

Single CSV option

Seen somewhere on Github: would be useful to have the option to merge old previous sessions inside one single CSV file. This way, on the pi where will be only one single file and a bunch of files that still has to be uploaded to WiGLE or, if WiGLE uploading is disabled, one single file and the current session file.

The merging should happen when the plugin is loaded and, maybe, when the sessions files are uploaded to WiGLE (if it's enabled).

GPS: add support for gpsd

Since bettercap seems to be not reliable for GPS coordinates reading when using gpsd, wardriver should be read coordinates directly from gpsd instead of relying on bettercap. Support for bettercap should still be maintained, so a config option should probably be added.

Wardriving Accuracy

I saw you had a comment in your code about calculating accuracy. I noticed for the webgpsmap plugin they used 50 meters for the AP location. That's prob a good guess considering we're using tiny Pi antenna and we're only getting signals that happen to come through walls/windows etc.

But I think Wigle uses GPS accuracy as a variable. I have searched for more info on how they calculate that to no avail.

As a nerdy rabbithole I found this formulae: https://blog.oplopanax.ca/2012/11/calculating-gps-accuracy/

I might try a python script to calculate from some GPS logging. My Pi does not use gpsd but many others do and I'm not sure how that differece wouls matter.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.