pentestfunctions / BlueDucky

🚨 CVE-2023-45866 - BlueDucky Implementation (Using DuckyScript) 🔓 Unauthenticated Peering Leading to Code Execution (Using HID Keyboard)
953 stars 162 forks source link

Not completing script and getting stuck #51

Open Hypoonsil opened 1 month ago

Hypoonsil commented 1 month ago

So i was following the tutorial on the readme.md while in the last stage the script doesn't run fully.... Here is a screenshot: Screenshot_2024-05-20_21_38_11

madarauchia7387438 commented 1 month ago

yes you are right ...i am also figuring this issue ...please help me

Roshan-777 commented 1 month ago

Same issue, cant figure out about what to do to resolve this.

Bigyan-009 commented 1 month ago

same isuue please anyone figure it out

coldvisionz commented 1 month ago

fixed this by enabling bluetooth on kali via systemd ctl, because bluetooth daemon is disabled by default for security reasons $ systemctl enable bluetooth $ systemctl start bluetooth

Bigyan-009 commented 1 month ago

fixed this by enabling bluetooth on kali via systemd ctl, because bluetooth daemon is disabled by default for security reasons $ systemctl enable bluetooth $ systemctl start bluetooth

image after doing this i am again facing this issue

pentestfunctions commented 1 month ago

Are you doing this on a raspberry pi as stated in the readme?

Bigyan-009 commented 1 month ago

no i am doing it in kali linux in my laptop with internal bluetooth hardware

mohamedmajid91 commented 1 month ago

!/bin/bash

Script to unblock and restore Bluetooth after a crash of BlueDucky.py

echo "Restoring Bluetooth..." Unblock the Bluetooth device

if ! sudo rfkill unblock bluetooth; then echo "Failed to unblock Bluetooth device." exit 1 fi Bring up the Bluetooth interface

if ! sudo hciconfig hci1 up; then echo "Failed to bring up Bluetooth interface." exit 1 fi Restart the Bluetooth service

if ! sudo systemctl restart bluetooth; then echo "Failed to restart Bluetooth service." exit 1 fi Wait for the service to restart

sleep 5 Use bluetoothctl to configure Bluetooth

{ echo "power on" sleep 1 echo "agent off" sleep 1 echo "agent on" sleep 1 echo "default-agent" sleep 1 echo "scan on" sleep 5 } | bluetoothctl

echo "Bluetooth restored successfully." Delay before running the Python script

sleep 5 Run the Python script

if ! sudo python3 BlueDucky.py; then echo "Failed to run BlueDucky.py." exit 1 fi

exit 0

sudo nano restore_bluetooth.sh

sudo chmod +x restore_bluetooth.sh

Enveeus commented 1 month ago

worked for me, thanks!

Hypoonsil commented 1 month ago

fixed this by enabling bluetooth on kali via systemd ctl, because bluetooth daemon is disabled by default for security reasons $ systemctl enable bluetooth $ systemctl start bluetooth

Well thanks it worked

kali-bard commented 1 month ago

can someone give me a list of all the supported adapters? i am running it in a kali laptop with internal bluetooth adapter like @Bigyan-009 did. thanks

AzhariRamadhan commented 4 weeks ago
#!/bin/bash
# Script to unblock and restore Bluetooth after a crash of BlueDucky.py

echo "Restoring Bluetooth..."

# Unblock the Bluetooth device
if ! sudo rfkill unblock bluetooth; then
    echo "Failed to unblock Bluetooth device."
    exit 1
fi

# Bring up the Bluetooth interface (try hci0)
if ! sudo hciconfig hci0 up; then
    echo "Failed to bring up Bluetooth interface."
    exit 1
fi

# Restart the Bluetooth service
if ! sudo systemctl restart bluetooth; then
    echo "Failed to restart Bluetooth service."
    exit 1
fi

# Wait for the service to restart
sleep 5

# Use bluetoothctl to configure Bluetooth
{
    echo "power on"
    sleep 1
    echo "agent off"
    sleep 1
    echo "agent on"
    sleep 1
    echo "default-agent"
    sleep 1
    echo "scan on"
    sleep 5
} | bluetoothctl

echo "Bluetooth restored successfully."

# Delay before running the Python script
sleep 5

# Run the Python script
if ! sudo python3 BlueDucky.py; then
    echo "Failed to run BlueDucky.py."
    exit 1
fi

exit 0