GithubHelp home page GithubHelp logo

dhondta / dronesploit Goto Github PK

View Code? Open in Web Editor NEW
1.4K 51.0 238.0 4.78 MB

Drone pentesting framework console

License: GNU General Public License v3.0

Python 85.76% AGS Script 14.24%
python cli console drone hacking pentest-tools security-tools tinyscript

dronesploit's Issues

DJI Drone version

Hello,

Did it work with the new DJI Mavic's ? For example, DJI Mavic Mini 1/2 or Mavic Air 2 ?

I can see in the code the DJI Phantom :

image

Which DJI Phantom version is required ? The first ?

Scan command not getting any connected drone

hi, i have 2 issues the first the toggle command not putting interface into monitor mode for example "wlan1mon". Toggle coomand just keeps putting "wlan1 set back to managed mode", this happens every time when i ran this command. I basically had to use airmon-ng to put my card into monitor mode.

Secondly "scan wlan1mon"not showing any connected drones, even tho i have a drone connected to a smartphone.

Targets list not accessible on the command line using autocomplete or direct type-in.

Hello :)

It seems that when using the "scan" command targets are not being properly added to the targets list in memory. When using the command line options where it will help auto-complete and fill in 'TARGETS' for example, where you would type something like "set TARGET XX' it will never suggest a target to fill in as a choice.

I did find yesterday that when using the "targets" command to list all targets that I did have some saved, but there was no way to actually set one of them as the active target before running the "run" command on the modules that require a target set. When trying it, I can type "set TARGET" and it will auto-complete with the 'TARGET' choice, but after that it provides no suggestions and using the SSID or MAC address as the target name only shows the error "Not a valid target name" and does not allow you to hit enter.

Overall, it seems the targets list is not accessible when trying to access it on the dronesploit command line.

Below are two exceptions that I got, which may be unrelated but I am including them in case it is helpful, note that I have not found the password for the access point when running these commands, so I am aware I may be using the 'connect' command incorrectly here.

This exception is caused by trying to connect to a target using it's MAC address in the 'emergency_stop' module (without a known password):

dronesploit[myproject] command(dji/tello/emergency_stop) > connect 30:C9:AB:XX:XX:XX                                                           
[-] '30:C9:AB:XX:XX:XX'
Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.8/site-packages/sploitkit/core/console.py", line 361, in run
    obj.run(*args)
  File "/tmp/pip-unpacked-wheel-7eg3f6fr/dronesploit/_src/commands/wifi.py", line 16, in run
  File "/home/myuser/.local/lib/python3.8/site-packages/dronesploit/wifi/mixin.py", line 33, in connect
    pswd = self.console.state['TARGETS'][essid].get('password')
  File "/home/myuser/.local/lib/python3.8/site-packages/tinyscript/helpers/dictionaries.py", line 228, in __getitem__
    return super(ExpiringDict, self).__getitem__(key)
KeyError: '30:C9:AB:XX:XX:XX'
dronesploit[myproject] command(dji/tello/emergency_stop) > run 

This exception is caused by trying to use the 'connect' command on an SSID (without a known password):

dronesploit auxiliary(wifi/find_ssids) > run                                                                                                  
[!] Press Ctrl+C to interrupt
[*] Found ExampleWifiPoint
dronesploit auxiliary(wifi/find_ssids) > connect ExampleWifiPoint                                                                                      
[-] 'ExampleWifiPoint'
Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.8/site-packages/sploitkit/core/console.py", line 361, in run
    obj.run(*args)
  File "/tmp/pip-unpacked-wheel-7eg3f6fr/dronesploit/_src/commands/wifi.py", line 16, in run
  File "/home/myuser/.local/lib/python3.8/site-packages/dronesploit/wifi/mixin.py", line 33, in connect
    pswd = self.console.state['TARGETS'][essid].get('password')
  File "/home/myuser/.local/lib/python3.8/site-packages/tinyscript/helpers/dictionaries.py", line 228, in __getitem__
    return super(ExpiringDict, self).__getitem__(key)
KeyError: 'ExampleWifiPoint'
dronesploit auxiliary(wifi/find_ssids) >

Errors when enabling monitor mode

Hi, when i try to enable the monitor mode i receive this errors:

dronesploit > toggle wlan0
[*] wlan0 set back to managed mode
[-] name 'Entity' is not defined
Traceback (most recent call last):
File "/home/kali/.local/lib/python3.11/site-packages/sploitkit/core/console.py", line 363, in run
obj.run(*args)
File "/home/kali/.local/lib/python3.11/site-packages/dronesploit/_src/commands/wifi.py", line 154, in run
Entity.check()
^^^^^^

"show options" returns "object of type 'int' has no len()"

Hello,
I am trying to use the software on Tello with a rtl based wireless card in monitor mode. I'm running up to date Ubuntu 20.04.
After doing pip3 install dronesploit then starting dronesploit.
I tried to follow the example and use auxiliary/wifi/find_targets
When I then run show options
I get

[ - ] object of type 'int' has no len()
Traceback (most recent call last):
   File "/usr/local/lib/python3.8/dist-packages/sploitkit/core/console.py", line 361, in run obj.run(*args)
   File "/usr/local/lib/python3.8/dist-packages/sploitkit/base/commands/module.py", line 78, in run print_formatted_text(ANSI(str(self.config)))
   File "/usr/local/lib/python3.8/dist-packages/sploitkit/core/components/config.py", line 491, in __str__ return str(c)
   File "/usr/local/lib/python3.8/dist-packages/sploitkit/core/components/config.py", line 105, in __str__ BorderlessTable(data, "%s options" % prefix).table
   File "/usr/local/lib/python3.8/dist-packages/tinyscript/helpers/layout.py", line 60, in __init__ if len(v) > 0:
TypeError: object of type 'int' has no len()

I get a similar error with auxiliary/wifi/find_ssids

It seems like this would affect the operation, do you know how I would fix this or what I can try next?

Cannot delete existing project, or create multiple projects.

The last remaining bug I have seen is that I seem to be unable to create more than one project, and unable to delete an existing project. The project files themselves are working normally, just the create and delete functions are not working.

Below is a copy of my command line output, with me first trying to delete an existing project, and then trying to create a new one using "select newproject" which should create a new one according to the help file:

dronesploit > show projects                                                                                                                   

Existing projects
=================

   Name      
   ----      
   myproject 

dronesploit > delete myproject                                                                                                                
[-] 'Path' object has no attribute 'rmtree'
Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.8/site-packages/sploitkit/core/console.py", line 361, in run
    obj.run(*args)
  File "/home/myuser/.local/lib/python3.8/site-packages/sploitkit/base/commands/project.py", line 62, in run
    self.workspace.joinpath(project).rmtree()
AttributeError: 'Path' object has no attribute 'rmtree'
dronesploit > select newproject 

                                                                                                 
Command syntax: select project (invalid value)

Thank you again for taking the time to fix this so quickly, I want to test some new drone models and see if I can add them but am still learning to run python again, so knowing my starting environment is all set up correctly is a great help :)

're.Pattern' object is not iterable

I first removed the old version and then installed the latest version of dronesploit today using the pip installer ( not building it from source ) and I am seeing an exception in almost all of the commands, which shows the same stack trace ( same place in code is crashing ), I have the stack trace below:

Trying to scan with stop_video module:

dronesploit auxiliary(wifi/find_ssids) > use command/hobbico/flitt/stop_video                                                                 
[!] No Hobbico Flitt target connected yet ; please use the 'scan' and 'connect' commands
dronesploit command(hobbico/flitt/stop_video) > scan wlan0mon                                                                                 
[!] Press Ctrl+C to interrupt
[-] 're.Pattern' object is not iterable
Traceback (most recent call last):
  File "/home/myuser/.local/lib/python3.8/site-packages/dronesploit/wifi/mixin.py", line 138, in scan
    if self._filter_func(e):
  File "/home/myuser/.local/lib/python3.8/site-packages/dronesploit/wifi/drone.py", line 34, in drone_filter
    for regex in r:
TypeError: 're.Pattern' object is not iterable
dronesploit command(hobbico/flitt/stop_video) > 

Not able to run, any advise?

root@kali:~/dronesploit# python3 ./main.py 
Traceback (most recent call last):
  File "./main.py", line 4, in <module>
    from dronesploit.lib import DronesploitConsole
  File "/root/dronesploit/dronesploit/lib/__init__.py", line 3, in <module>
    from sploitkit import FrameworkConsole
  File "/usr/local/lib/python3.7/dist-packages/sploitkit/__init__.py", line 4, in <module>
    from .core import *
  File "/usr/local/lib/python3.7/dist-packages/sploitkit/core/__init__.py", line 1, in <module>
    from .console import *
  File "/usr/local/lib/python3.7/dist-packages/sploitkit/core/console.py", line 11, in <module>
    from prompt_toolkit import print_formatted_text, PromptSession
ImportError: cannot import name 'print_formatted_text' from 'prompt_toolkit' (/usr/lib/python3/dist-packages/prompt_toolkit/__init__.py)

Scan option

Hi,

Do you have any idea what could be the problem that I do not recognize the hot spot of the glider?
In the past it worked for me ...

Failed to run, error occured

After running setup.py, I have tried to run script, but an error occurred ;

(rootkali)-[~/dronesploit]
# dronesploit

Traceback (most recent call last):
  File "/usr/local/bin/dronesploit", line 33, in <module>
    sys.exit(load_entry_point('dronesploit==1.1.10', 'console_scripts', 'dronesploit')())
  File "/usr/local/lib/python3.10/dist-packages/dronesploit-1.1.10-py3.10.egg/dronesploit/__main__.py", line 23, in main
    initialize(exit_at_interrupt=False, sudo=True)
  File "/usr/local/lib/python3.10/dist-packages/tinyscript/parser.py", line 114, in initialize
    p = ArgumentParser(glob)
  File "/usr/local/lib/python3.10/dist-packages/tinyscript/argreparse.py", line 263, in __init__
    self._check_requirements(gd.get('__requires__'))
  File "/usr/local/lib/python3.10/dist-packages/tinyscript/argreparse.py", line 343, in _check_requirements
    for m, v in (requires or {}).items():
AttributeError: 'str' object has no attribute 'items'
(rootkali)-[~/dronesploit]
#

Cannot/unknown how to run (Kali Linux)

Hello, I am greatly interested by this project and I wanted to test it out, but I received an error (It's probably me).

So first I installed dronesploit with: pip3 install dronesploit that was without error. But when I tried to run it python3 dronesploit it came to this error:

python3: can't open file '/home/kali/dronesploit': [Errno 2] No such file or directory

I know this is probably a simple mistake on my end but what is the solution to this?

No module enabled at startup

Hello,

I am not used to building projects with Python and after following the installation instructions I am only left with the same folder I initially downloaded with no additional files, and then when trying to run 'dronesploit' as a command I cannot get this to recognize anything in any of the folders, I just get the error message:
dronesploit: command not found

I beieve I have installed all of the dependencies as well before trying the test run / building.

Is there some kind of expicit command to bulid this project assuming the environment does not have any assumptions about buliding like env variables, etc? I have asked this same questions to a couple of other projects also that I had to pause because I cannot figure out how to build them, so if the installations steps could be more verbose that would be great, as I see a lot of other people lost also on this question, but nobody has been able to answer it yet at least on these other projects I was trying to run.

( The one-line install scripts are visually tidy and nice but I think anybody who is missing a certain dependency or environment variable is never able to run things like composer packages or this Python package because we do not know what to start and there are no answers because it is "too simple" of a question maybe? )

Crash - when starting up framework

When typing in dronesploit...you see the framework for a millisecond, then it crashes back to console with the message --> " Erase is control-H "

Also the wi-fi disconnects and reconnects every time.

Any clue ?

root@kali-linux:# pip3 show prompt_toolkit
Name: prompt-toolkit
Version: 3.0.3
Summary: Library for building powerful interactive command lines in Python
Home-page: https://github.com/prompt-toolkit/python-prompt-toolkit
Author: Jonathan Slenders
Author-email: None
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages
Requires: wcwidth
Required-by: sploitkit
root@kali-linux:
# pip3.7 show prompt_toolkit
Name: prompt-toolkit
Version: 3.0.3
Summary: Library for building powerful interactive command lines in Python
Home-page: https://github.com/prompt-toolkit/python-prompt-toolkit
Author: Jonathan Slenders
Author-email: None
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages
Requires: wcwidth
Required-by: sploitkit

Fresh install through pip3 throws errors on startup.

Hello,

I just installed dronesploit using the "pip3 install dronesploit" command on a new installation of Ubuntu 20 and am getting the following exception, I have tried with and without sudo privileges, and wanted to post the error here in case it is a new issue.

Thanks!

amrita@localhost:~$ dronesploit
Traceback (most recent call last):
  File "/home/amrita/.local/bin/dronesploit", line 5, in <module>
    from dronesploit.__main__ import main
  File "/home/amrita/.local/lib/python3.8/site-packages/dronesploit/__init__.py", line 3, in <module>
    from sploitkit import FrameworkConsole
  File "/home/amrita/.local/lib/python3.8/site-packages/sploitkit/__init__.py", line 11, in <module>
    from .core import *
  File "/home/amrita/.local/lib/python3.8/site-packages/sploitkit/core/__init__.py", line 1, in <module>
    from .console import *
  File "/home/amrita/.local/lib/python3.8/site-packages/sploitkit/core/console.py", line 13, in <module>
    from prompt_toolkit.application.current import get_app_session
ImportError: cannot import name 'get_app_session' from 'prompt_toolkit.application.current' (/usr/lib/python3/dist-packages/prompt_toolkit/application/current.py)
amrita@localhost:~$

Add a setup.py for pybuild standard

Hi dhondta!

I really really love your project and i want to add it to Parrot OS. Can you please add the setup.py file (with pybuild standard as the title) so it can be packaged easily with build standard? The setup.py will be easier not for packaging for Parrot OS only but other platforms (Debian, Kali Linux, ...).

Thanks in advance!

No module loaded after installing in a virtual environment

After installing as root (because without root requires xvfb-run for sudo to work), dronesploit shows no modules loaded and no issues. Where are the modules?

# python3 -m venv ds
# . ./ds/bin/activate
# pip3 install -U pip pyyaml sploitkit dronesploit
# /root/ds/bin/dronesploit
dronesploit > show modules
[!] No module loaded
# tail -5 .dronesploit/logs/main.log
06/08/20 19:28:25 [ 8574]    DEBUG dronesploit_console - Starting DronesploitConsole[1950023056]
06/08/20 19:28:30 [ 8574]  WARNING dronesploit_console - No module loaded
06/08/20 19:30:15 [ 8574]    DEBUG dronesploit_console - Exiting DronesploitConsole[1950023056]

Tracing the startup, it appears to be searching for a "local" directory at the root of my python venv that doesn't exist:

readlink("/root/ds/lib/python3.7/site-packages/sploitkit/base/modules", 0x7ee7f4d4, 4096) = -1 ENOENT (No such file or directory)
stat64("/root/ds/lib/python3.7/site-packages/sploitkit/base/modules", 0x7ee807c0) = -1 ENOENT (No such file or directory)
readlink("/root/ds/local/dronesploit/modules", 0x7ee7f4d4, 4096) = -1 ENOENT (No such file or directory)
stat64("/root/ds/local/dronesploit/modules", 0x7ee807c0) = -1 ENOENT (No such file or directory)

If a create a local link back to the root of the venv:

# cd /root/ds
# ln -s . local

Then it can find some modules. Not sure if that is the right thing to do or not?

ModuleNotFoundError: No module named 'six'

Please check the update carefully knowing that the tool does not work with the parrot system. I got an error when running the [???]

Traceback tool (most recent call last):
  File "main.py", line 2, in <module>
    from tinyscript import *
  File "/home/anonymous/.local/lib/python3.8/site-packages/tinyscript/__init__.py", line 9, in <module>
    from .handlers import *
  File "/home/anonymous/.local/lib/python3.8/site-packages/tinyscript/handlers.py", line 10, in <module>
    from .helpers.inputs import user_input
  File "/home/anonymous/.local/lib/python3.8/site-packages/tinyscript/helpers/__init__.py", line 8, in <module>
    from .attack import *
  File "/home/anonymous/.local/lib/python3.8/site-packages/tinyscript/helpers/attack.py", line 9, in <module>
    from .compat import b, ensure_str
  File "/home/anonymous/.local/lib/python3.8/site-packages/tinyscript/helpers/compat.py", line 5, in <module>
    from six import binary_type, string_types, text_type, u
ModuleNotFoundError: No module named 'six'

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.