sensepost / snoopy-ng

Snoopy v2.0 - modular digital terrestrial tracking framework
Other
429 stars 128 forks source link

Added SSL support for the built-in web server used for syncing #44

Closed maximcherny closed 9 years ago

maximcherny commented 9 years ago

Here is the little enhancement to the built-in Flask server that enables TLS 1.2 on the basis of an existing cert / key pair.

Usage like:

snoopy -v -m server:cert=[/path/to/cert.crt],cert_key=[/path/to/cert_key.key] --dbms=mysql://user:secret@localhost/snoopy_db

For syncing, drones should then use HTTPS:

snoopy --plugin example:x=1 --drone myDrone --key GWWVF --server https://<server_ip>:9001/ --verbose

I am also looking at the Apache option, but a little unsure around how to handle the plugins - i.e. if you want both server and Wigle to be running at the same time.

glennzw commented 9 years ago

Great thanks so much for that. As for Apache my plan is run the webserver component standalone, and then run other plugins separately. Using MySQL (or anything that's not SQLite) we shouldn't have database locking issues.

maximcherny commented 9 years ago

Great, sounds like a plan. I will see if I can get that going as well - with half a dozen drones syncing the data the Flask-based option requires a lot of babysitting already.

glennzw commented 9 years ago

I've found the same. >±12 drones and the server plugin hangs. Flask doesn't like to be too busy.

A dirty hack I have is a bash infinite loop with 'timeout' to kill and restart the server every 30 minutes.