pentestfunctions / blueducky Goto Github PK
View Code? Open in Web Editor NEW🚨 CVE-2023-45866 - BlueDucky Implementation (Using DuckyScript) 🔓 Unauthenticated Peering Leading to Code Execution (Using HID Keyboard)
🚨 CVE-2023-45866 - BlueDucky Implementation (Using DuckyScript) 🔓 Unauthenticated Peering Leading to Code Execution (Using HID Keyboard)
Trying on Pinephone PRO with Kali Linux, with internal and TP-Link UB500 Bluetooth and i have this error with Huawei Y5 2018 in target Android 8.1.0
2024-05-11 21:08:51,616 - INFO - Reconnection required. Attempting to reconnect...
2024-05-11 21:08:55,876 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-05-11 21:08:56,781 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-05-11 21:08:57,331 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 19
2024-05-11 21:08:57,367 - ERROR - ERROR connecting on port 19: [Errno 104] Connection reset by peer
2024-05-11 21:08:57,367 - ERROR - Connection failure: Connection failure on port 19
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (104, 'Connection reset by peer')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 265, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 104] Connection reset by peer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 697, in
main()
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 679, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 626, in setup_and_connect
establish_connections(connection_manager)
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 618, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 158, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 158, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/kali/Pentest/BlueDucky/BlueDucky.py", line 273, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 19
I am having this error when trying to run blueducky.py :
Traceback (most recent call last):
File "/root/tools/BlueDucky/BlueDucky.py", line 7, in <module>
from utils.menu_functions import (main_menu, read_duckyscript, run, restart_bluetooth_daemon, get_target_address)
ModuleNotFoundError: No module named 'utils.menu_functions'; 'utils' is not a package
installation and requirements all met according to the README.md
OS : Kali 2024.1
Chipset : Realtek 0bda:8761 Driver btusb
OS: Fedora Linux 39 (Workstation Edition)
Kernel: 6.7.9-200.fc39.x86_64
Python Version: 3.12.2
I am getting some bluetooth error while trying to run the program:
BlueDucky - Bluetooth Device Attacker
======================================================================
Remember, you can still attack devices without visibility...
If you have their MAC address
======================================================================
Known devices:
1: Device Name: My_Phone, Address: XX:XX:XX:XX:XX:XX
Do you want to use one of these known devices? (yes/no): yes
Enter the number of the device: 1
2024-03-29 18:58:55,259 - INFO - executing 'sudo service bluetooth restart'
2024-03-29 18:58:56,225 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
2024-03-29 18:58:56,284 - INFO - executing 'hciconfig hci0 name'
2024-03-29 18:58:56,307 - INFO - executing 'sudo hciconfig hci0 class 9536'
2024-03-29 18:58:56,362 - INFO - executing 'hciconfig hci0 class'
2024-03-29 18:58:56,372 - INFO - executing 'sudo hciconfig hci0 sspmode 1'
2024-03-29 18:58:58,682 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-03-29 18:59:00,463 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-03-29 18:59:02,269 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 19
2024-03-29 18:59:02,320 - ERROR - [TX-19] Bluetooth error: [Errno 14] Bad address
2024-03-29 18:59:04,320 - INFO - Reconnection required. Attempting to reconnect...
2024-03-29 18:59:08,576 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-03-29 18:59:10,688 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-03-29 18:59:12,378 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 19
2024-03-29 18:59:13,320 - ERROR - [TX-19] Bluetooth error: [Errno 14] Bad address
After that, it continually attempts to reconnect, resulting in errors.
2024-03-29 18:59:04,320 - INFO - Reconnection required. Attempting to reconnect...
2024-03-29 18:59:08,576 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-03-29 18:59:10,688 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-03-29 18:59:12,378 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 19
2024-03-29 18:59:13,320 - ERROR - [TX-19] Bluetooth error: [Errno 14] Bad address
I saw you in comments their and say let me try his tool i used the latest payload you provided and boom it worked and opened the browser
Hi, new user just joined... Hi people.
I've followed the instruction line for line as root on kali but I keep getting an error telling me that 'utils' is not a package.
┌──(root㉿kali)-[~/BlueDucky]
└─# python3 BlueDucky.py
Traceback (most recent call last):
File "/root/BlueDucky/BlueDucky.py", line 7, in
from utils.menu_functions import (main_menu, read_duckyscript, run, restart_bluetooth_daemon, get_target_address)
ModuleNotFoundError: No module named 'utils.menu_functions'; 'utils' is not a package
┌──(root㉿kali)-[~/BlueDucky]
└─# ls
BlueDucky.py README.md init.py images payloads utils
┌──(root㉿kali)-[~/BlueDucky]
└─# cd utils
┌──(root㉿kali)-[~/BlueDucky/utils]
└─# ls
pycache magic_keyboard_hid.py menu_functions.py register_device.py
please help, i'm new at linux only 3 months.
thanks
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (112, 'Host is down')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vilen/BlueDucky/BlueDucky.py", line 264, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 112] Host is down
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/vilen/BlueDucky/BlueDucky.py", line 756, in
main()
File "/home/vilen/BlueDucky/BlueDucky.py", line 729, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vilen/BlueDucky/BlueDucky.py", line 637, in setup_and_connect
establish_connections(connection_manager)
File "/home/vilen/BlueDucky/BlueDucky.py", line 629, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vilen/BlueDucky/BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vilen/BlueDucky/BlueDucky.py", line 157, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/vilen/BlueDucky/BlueDucky.py", line 278, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 1
2024-04-01 22:10:27,385 - ERROR - Failed to enable SSP: Can't set Simple Pairing mode on hci0: Input/output error (5)
2024-04-01 22:10:27,386 - ERROR - Error enabling SSP: Failed to enable SSP
Traceback (most recent call last):
File "/root/Desktop/BlueDucky/BlueDucky.py", line 673, in
main()
File "/root/Desktop/BlueDucky/BlueDucky.py", line 647, in main
adapter.enable_ssp()
File "/root/Desktop/BlueDucky/BlueDucky.py", line 111, in enable_ssp
raise ConnectionFailureException("Failed to enable SSP")
ConnectionFailureException: Failed to enable SSP
``
For the first time it run perfectly. When I try to run again it show error .
I am using Kali Linux
i am on a laptop using kali i have install all the requirements i tried to use this on samsung A2 core on the first attempt it opened google and then the script suddenly stopped and now i am getting this error
Available payloads:
[1]: payload_example_2.txt
[2]: payload_example_1.txt
[3]: wp_payload.txt
Enter the number that represents the payload you would like to load: 1
Selected payload: /home/sujal/BlueDucky/payloads/payload_example_2.txt
2024-05-23 19:43:29,390 - INFO - executing 'sudo service bluetooth restart'
[sudo] password for sujal:
2024-05-23 19:43:34,041 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
2024-05-23 19:43:34,096 - INFO - executing 'hciconfig hci0 name'
2024-05-23 19:43:34,114 - INFO - executing 'sudo hciconfig hci0 class 9536'
2024-05-23 19:43:34,134 - INFO - executing 'hciconfig hci0 class'
2024-05-23 19:43:34,140 - INFO - executing 'sudo hciconfig hci0 sspmode 1'
2024-05-23 19:43:36,412 - INFO - connecting to 38:EA:C1:3B:AE:AB on port 1
2024-05-23 19:43:36,854 - INFO - connecting to 38:EA:C1:3B:AE:AB on port 17
2024-05-23 19:43:37,010 - ERROR - ERROR connecting on port 17: [Errno 111] Connection refused
2024-05-23 19:43:37,010 - ERROR - Connection failure: Connection failure on port 17
-e remove 38:EA:C1:3B:AE:ABoothd...[bluetooth]# Leaf Bass 2
Invalid command in menu main: -e
Use "help" for a list of available commands in a menu.
Use "menu " if you want to enter any submenu.
Use "back" if you want to return to menu main.
[Leaf Bass 2]# Successfully Removed device: 38:EA:C1:3B:AE:AB
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (111, 'Connection refused')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sujal/BlueDucky/./BlueDucky.py", line 264, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/sujal/BlueDucky/./BlueDucky.py", line 755, in
main()
File "/home/sujal/BlueDucky/./BlueDucky.py", line 728, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sujal/BlueDucky/./BlueDucky.py", line 637, in setup_and_connect
establish_connections(connection_manager)
File "/home/sujal/BlueDucky/./BlueDucky.py", line 629, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sujal/BlueDucky/./BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sujal/BlueDucky/./BlueDucky.py", line 157, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/sujal/BlueDucky/./BlueDucky.py", line 278, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 17
How does the keycode hex values work, im trying to find the power off keycode and still never found it.
Can I atleast know how you got these values and any extra information for me to help?
Available payloads:
[1]: payload_example_2.txt
[2]: payload_example_1.txt
[3]: wp_payload.txt
Enter the number that represents the payload you would like to load: 2
Selected payload: /home/kali/BlueDucky-main/payloads/payload_example_1.txt
2024-05-27 15:45:50,483 - INFO - executing 'sudo service bluetooth restart'
2024-05-27 15:45:51,443 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
Traceback (most recent call last):
File "/home/kali/BlueDucky-main/BlueDucky.py", line 755, in
main()
File "/home/kali/BlueDucky-main/BlueDucky.py", line 719, in main
adapter = setup_bluetooth(target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky-main/BlueDucky.py", line 615, in setup_bluetooth
adapter.set_property("name", "Robot POC")
File "/home/kali/BlueDucky-main/BlueDucky.py", line 87, in set_property
self._run_command(command)
File "/home/kali/BlueDucky-main/BlueDucky.py", line 81, in _run_command
raise ConnectionFailureException(f"Failed to execute command: {' '.join(command)}. Error: {result.stderr}")
ConnectionFailureException: Failed to execute command: sudo hciconfig hci0 name Robot POC. Error: Can't change local name on hci0: Network is down (100)
I have tried many times to inject TAB. it showing that it's done but it is not injecting TAB give me solution please
Hello everyone, I have a problem with launching the script which crashes after selecting a target.
I'm on: Linux kali-raspberry-pi 5.15.44-Re4son-v8l+ #1 SMP PREEMPT Debian kali-pi (2022-07-03) aarch64 GNU/Linux
Release: 2024.1
Thanks in advance
Hello, Does anyone knows why android car sterio which supports HID keyboard and mouse can't pair with it and throwing Error 22.
ERROR connecting on port 19: [Errno 22] Invalid argument
[2024-02-03 12:57:14.270] connecting to HID Interrupt
[2024-02-03 12:57:14.271] connecting to DC:FE:23:3A:88:AE on port 19
BlueDucky.txt
IF YOU FACE THIS PROBLEM CONSIDER USING FILE ABOVE
Enter the number of the payload you want to load: 1
Selected payload: /home/smartboy/BlueDucky/payloads/payload_example_1.txt
2024-04-23 04:05:34,694 - INFO - executing 'sudo service bluetooth restart'
2024-04-23 04:05:35,873 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
2024-04-23 04:05:35,943 - INFO - executing 'hciconfig hci0 name'
2024-04-23 04:05:35,952 - INFO - executing 'sudo hciconfig hci0 class 9536'
2024-04-23 04:05:36,005 - INFO - executing 'hciconfig hci0 class'
2024-04-23 04:05:36,019 - INFO - executing 'sudo hciconfig hci0 sspmode 1'
2024-04-23 04:05:40,290 - INFO - connecting to 0C:9A:3C:41:96:5E on port 1
2024-04-23 04:05:41,045 - INFO - connecting to 0C:9A:3C:41:96:5E on port 17
2024-04-23 04:05:41,917 - ERROR - ERROR connecting on port 17: [Errno 103] Software caused connection abort
2024-04-23 04:05:41,918 - ERROR - Connection failure: Connection failure on port 17
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (103, 'Software caused connection abort')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/smartboy/BlueDucky/BlueDucky.py", line 265, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 103] Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/smartboy/BlueDucky/BlueDucky.py", line 697, in
main()
File "/home/smartboy/BlueDucky/BlueDucky.py", line 679, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/smartboy/BlueDucky/BlueDucky.py", line 626, in setup_and_connect
establish_connections(connection_manager)
File "/home/smartboy/BlueDucky/BlueDucky.py", line 618, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/smartboy/BlueDucky/BlueDucky.py", line 158, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/smartboy/BlueDucky/BlueDucky.py", line 158, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/smartboy/BlueDucky/BlueDucky.py", line 273, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 17
2024-03-25 09:15:17,044 - ERROR - ERROR connecting on port 17: [Errno 111] Connection refused
2024-03-25 09:15:17,045 - ERROR - Connection failure: Connection failure on port 17
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (111, 'Connection refused')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/BlueDucky/BlueDucky.py", line 264, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/BlueDucky/BlueDucky.py", line 668, in
main()
File "/BlueDucky/BlueDucky.py", line 650, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/BlueDucky/BlueDucky.py", line 625, in setup_and_connect
establish_connections(connection_manager)
File "/BlueDucky/BlueDucky.py", line 617, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/BlueDucky/BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/BlueDucky/BlueDucky.py", line 157, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/BlueDucky/BlueDucky.py", line 272, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 17
Edit attacking device are a phone with nethunter attacking another android phone with android 10
im using Raspberry pi 4 and Kali linux 2024.1
Known devices:
1: Device Name: Galaxy J4+, Address: 88:9F:6F:6E:D4:BB
Do you want to use one of these known devices? (yes/no): yes
Enter the number of the device: 1
2024-03-27 16:35:28,399 - INFO - executing 'sudo service bluetooth restart'
2024-03-27 16:35:29,352 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line 668, in
main()
File "/home/kali/BlueDucky/BlueDucky.py", line 641, in main
adapter = setup_bluetooth(target_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 603, in setup_bluetooth
adapter.set_property("name", "Robot POC")
File "/home/kali/BlueDucky/BlueDucky.py", line 87, in set_property
self._run_command(command)
File "/home/kali/BlueDucky/BlueDucky.py", line 81, in _run_command
raise ConnectionFailureException(f"Failed to execute command: {' '.join(command)}. Error: {result.stderr}")
ConnectionFailureException: Failed to execute command: sudo hciconfig hci0 name Robot POC. Error: Can't change local name on hci0: Network is down (100)
__
Can't able to start Blueducky.py
❯ git clone https://github.com/pentestfunctions/BlueDucky.git
cd BlueDucky
sudo hciconfig hci0 up
python3 BlueDucky.py
Cloning into 'BlueDucky'...
remote: Enumerating objects: 162, done.
remote: Counting objects: 100% (60/60), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 162 (delta 35), reused 43 (delta 22), pack-reused 102
Receiving objects: 100% (162/162), 803.75 KiB | 3.32 MiB/s, done.
Resolving deltas: 100% (69/69), done.
Traceback (most recent call last):
File "/home/USER/BlueDucky/BlueDucky.py", line 8, in <module>
from utils.register_device import register_hid_profile, agent_loop
File "/home/USER/BlueDucky/utils/register_device.py", line 1, in <module>
import dbus
File "/usr/lib/python3/dist-packages/dbus/__init__.py", line 73, in <module>
import dbus.types as types
File "/usr/lib/python3/dist-packages/dbus/types.py", line 8, in <module>
from _dbus_bindings import (
ModuleNotFoundError: No module named '_dbus_bindings'
2024-05-30 13:34:57,205 - ERROR - [TX-19] Bluetooth error: [Errno 104] Connection reset by peer
Add payload to view messages
i followed all the steps but doesnt work
Traceback (most recent call last):
File "/home/samir/BlueDucky/BlueDucky.py", line 1, in
import binascii, bluetooth, sys, time, datetime, logging
ModuleNotFoundError: No module named 'bluetooth'
Hey when I use the adaptor above I get the following error : Can’t initiate hci0 . Broken pipe (32). Does anyone know that that is and how to fix.?
Does anyone have any more interesting payload ideas or example? Maybe download and open a file from a specific website ?
Hey, there I've literally installed everything step by step from the readme.md file but everytime when I try to run the script even with sudo enabled I get the following error(my bluetooth card(hci0) is perfectly functional and I have no idea why im getting the following error)), I'd be more than thankful if someone could help me out <3
2024-04-04 15:27:57,634 - INFO - executing 'sudo service bluetooth restart'
2024-04-04 15:27:58,496 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
Traceback (most recent call last):
File "/home/andrew/Downloads/BlueDucky/BlueDucky.py", line 673, in
main()
File "/home/andrew/Downloads/BlueDucky/BlueDucky.py", line 646, in main
adapter = setup_bluetooth(target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/andrew/Downloads/BlueDucky/BlueDucky.py", line 603, in setup_bluetooth
adapter.set_property("name", "Robot")
File "/home/andrew/Downloads/BlueDucky/BlueDucky.py", line 87, in set_property
self._run_command(command)
File "/home/andrew/Downloads/BlueDucky/BlueDucky.py", line 81, in _run_command
raise ConnectionFailureException(f"Failed to execute command: {' '.join(command)}. Error: {result.stderr}")
ConnectionFailureException: Failed to execute command: sudo hciconfig hci0 name Robot. Error: Can't change local name on hci0: Network is down (100)
E: Unable to locate package install error
while running
sudo apt install -y python3-pydbus command
log
sudo apt install -y git gcc python3-pip python3-setuptools
sudo apt install -y python3-pydbus
[sudo] password for kali:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package install
E: Unable to locate package install
Hi
It's not an issue, but rather a suggestion.
Can you modify this OMG ducky script to download a metasploit payload on an android device and install it, just like this video
https://twitter.com/i/status/1749726846684455145
ducky script: https://github.com/hak5/omg-payloads/tree/master/payloads/library/mobile/android/meterpreter
Thanks
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line 697, in
main()
File "/home/kali/BlueDucky/BlueDucky.py", line 670, in main
adapter = setup_bluetooth(target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 604, in setup_bluetooth
adapter.set_property("name", "Robot POC")
File "/home/kali/BlueDucky/BlueDucky.py", line 88, in set_property
self._run_command(command)
File "/home/kali/BlueDucky/BlueDucky.py", line 82, in _run_command
raise ConnectionFailureException(f"Failed to execute command: {' '.join(command)}. Error: {result.stderr}")
ConnectionFailureException: Failed to execute command: sudo hciconfig hci0 name Robot POC. Error: Can't change local name on hci0: Network is down (100)
can i run the script on "oracle VM virtual box" kali linux or i need real kali linux operation system to use it ?
python3 BlueDucky.py
Traceback (most recent call last):
File "/root/BlueDucky/BlueDucky.py", line 7, in
from utils.menu_functions import (main_menu, read_duckyscript, run, restart_bluetooth_daemon, get_target_address)
ModuleNotFoundError: No module named 'utils.menu_functions'; 'utils' is not a package
Traceback (most recent call last):
File "/home/nigm/BlueDucky/BlueDucky.py", line 7, in
from utils.menu_functions import (main_menu, read_duckyscript, run, restart_bluetooth_daemon, get_target_address)
ModuleNotFoundError: No module named 'utils.menu_functions'; 'utils' is not a package
Attempting to scan now...
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky/BlueDucky.py", line 697, in
main()
File "/home/kali/BlueDucky/BlueDucky/BlueDucky.py", line 637, in main
target_address = get_target_address()
^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky/utils/menu_functions.py", line 7, in get_target_address
devices = scan_for_devices()
^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky/utils/menu_functions.py", line 126, in scan_for_devices
nearby_devices = bluetooth.discover_devices(duration=8, lookup_names=True, flush_cache=True, lookup_class=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/PyBluez-0.30-py3.11-linux-x86_64.egg/bluetooth/bluez.py", line 19, in discover_devices
OSError: [Errno 19] No such device
please help me
Traceback (most recent call last):
File "/home/kali/Desktop/tools/BlueDucky/./BlueDucky.py", line 1, in
import binascii, bluetooth, sys, time, datetime, logging, argparse
ModuleNotFoundError: No module named 'bluetooth'
hi, can this tool running in macos ?
Im able to detected bluetooth devices on raspbian
but still getting everytime
ERROR - ERROR connecting on port 1: [Errno 103] Software caused connection abort
ERROR - Connection failure: Connection failure on port 1
Traceback (most recent call last):
File "<string>", line 3, in connect
_bluetooth.error: (103, 'Software caused connection abort')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/BlueDucky/BlueDucky.py", line 264, in connect
sock.connect((self.addr, self.port))
File "<string>", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 103] Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/root/BlueDucky/BlueDucky.py", line 668, in <module>
main()
File "/root/BlueDucky/BlueDucky.py", line 650, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/BlueDucky/BlueDucky.py", line 625, in setup_and_connect
establish_connections(connection_manager)
File "/root/BlueDucky/BlueDucky.py", line 617, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/BlueDucky/BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/BlueDucky/BlueDucky.py", line 157, in <genexpr>
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/root/BlueDucky/BlueDucky.py", line 272, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 1
on my mobile phone I briefly get a popup witrh a pairing code but endup with the above error
What may be causing this?
Thank you
I need to pair the device manually to send the keystrokes, I have a Qualcomm Atheros qca9377 Bluetooth driver.
im having this weird issue when trying to execute on a device, im using a raspberry pi zero 2w:
Known devices:
1: Device Name: Hyena's S21 Ultra, Address: XX:XX:XX:XX:XX:XX
Do you want to use one of these known devices? (yes/no): yes
Enter the number of the device: 1
2024-04-01 10:59:00,440 - INFO - executing 'sudo service bluetooth restart'
2024-04-01 10:59:01,478 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
2024-04-01 10:59:01,526 - INFO - executing 'hciconfig hci0 name'
2024-04-01 10:59:01,532 - INFO - executing 'sudo hciconfig hci0 class 9536'
2024-04-01 10:59:01,578 - INFO - executing 'hciconfig hci0 class'
2024-04-01 10:59:01,588 - INFO - executing 'sudo hciconfig hci0 sspmode 1'
2024-04-01 10:59:03,994 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-04-01 10:59:05,294 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-04-01 10:59:05,908 - ERROR - ERROR connecting on port 17: [Errno 103] Software caused connection abort
2024-04-01 10:59:05,908 - ERROR - Connection failure: Connection failure on port 17
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (103, 'Software caused connection abort')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line Select a device by number: 1
2024-04-01 11:22:54,927 - INFO - executing 'sudo service bluetooth restart'
2024-04-01 11:22:55,965 - INFO - executing 'sudo hciconfig hci0 name Robot POC'
2024-04-01 11:22:56,011 - INFO - executing 'hciconfig hci0 name'
2024-04-01 11:22:56,017 - INFO - executing 'sudo hciconfig hci0 class 9536'
2024-04-01 11:22:56,062 - INFO - executing 'hciconfig hci0 class'
2024-04-01 11:22:56,071 - INFO - executing 'sudo hciconfig hci0 sspmode 1'
2024-04-01 11:22:58,482 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 1
2024-04-01 11:22:59,606 - INFO - connecting to XX:XX:XX:XX:XX:XX on port 17
2024-04-01 11:23:00,408 - ERROR - ERROR connecting on port 17: [Errno 103] Software caused connection abort
2024-04-01 11:23:00,409 - ERROR - Connection failure: Connection failure on port 17
Traceback (most recent call last):
File "", line 3, in connect
_bluetooth.error: (103, 'Software caused connection abort')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line 264, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 103] Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line 673, in
main()
File "/home/kali/BlueDucky/BlueDucky.py", line 655, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 625, in setup_and_connect
establish_connections(connection_manager)
File "/home/kali/BlueDucky/BlueDucky.py", line 617, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 157, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 272, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 17, in connect
sock.connect((self.addr, self.port))
File "", line 5, in connect
bluetooth.btcommon.BluetoothError: [Errno 103] Software caused connection abort
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/kali/BlueDucky/BlueDucky.py", line 673, in
main()
File "/home/kali/BlueDucky/BlueDucky.py", line 655, in main
hid_interrupt_client = setup_and_connect(connection_manager, target_address, adapter_id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 625, in setup_and_connect
establish_connections(connection_manager)
File "/home/kali/BlueDucky/BlueDucky.py", line 617, in establish_connections
if not connection_manager.connect_all():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 157, in connect_all
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 157, in
return sum(client.connect() for client in self.clients.values())
^^^^^^^^^^^^^^^^
File "/home/kali/BlueDucky/BlueDucky.py", line 272, in connect
raise ConnectionFailureException(f"Connection failure on port {self.port}")
ConnectionFailureException: Connection failure on port 17
Hello nice work!!
I can't use with external BT adapter (hci1) only works for hci0?
Saludos
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.