2024-05-29 14:55:47 +00:00
# BlueDucky Version 2.1 (for Android) 🦆
exus. Make sure you come join us on VC !
2024-05-12 15:03:37 +00:00
https://discord.gg/HackNexus
2024-03-27 17:11:26 +00:00
2024-05-22 06:32:22 +00:00
NOTES: I will not be able to run this on a laptop or other device outside of a raspberry pi for testing. Due to this, any issues you have will need to be resolved amonsgt each other as I do not have the spare funds to buy an adapter.
2024-03-27 17:08:50 +00:00
1. [saad0x1's GitHub ](https://github.com/saad0x1 )
2. [spicydll's GitHub ](https://github.com/spicydll )
2024-05-15 23:31:20 +00:00
3. [lamentomori's GitHub ](https://github.com/lamentomori )
2024-03-27 17:08:50 +00:00
2024-01-19 09:56:22 +00:00
< p align = "center" >
< img src = "./images/duckmenu.png" >
< / p >
2024-01-17 02:14:31 +00:00
🚨 CVE-2023-45866 - BlueDucky Implementation (Using DuckyScript)
2024-01-17 02:31:10 +00:00
2024-01-17 02:14:31 +00:00
🔓 Unauthenticated Peering Leading to Code Execution (Using HID Keyboard)
2024-01-17 02:16:47 +00:00
[This is an implementation of the CVE discovered by marcnewlin ](https://github.com/marcnewlin/hi_my_name_is_keyboard )
2024-01-16 06:57:05 +00:00
< p align = "center" >
2024-01-19 09:55:14 +00:00
< img src = "./images/BlueDucky.gif" >
2024-01-16 06:57:05 +00:00
< / p >
2024-01-17 02:14:31 +00:00
## Introduction 📢
2024-05-29 14:55:47 +00:00
BlueDucky is an advanced tool designed to exploit vulnerabilities in Bluetooth devices. By leveraging this script, users can:
1. 📡 Load saved Bluetooth devices that are no longer visible but still have Bluetooth enabled.
2. 📂 Automatically save any scanned devices.
3. 💌 Send messages in DuckyScript format to interact with devices.
2024-01-17 02:14:31 +00:00
2024-05-29 14:55:47 +00:00
This script has been successfully tested on a Raspberry Pi 4 using the default Bluetooth module. It is effective against various phones, with the exception of New Zealand brand, Vodafone.
2024-01-17 02:14:31 +00:00
## Installation and Usage 🛠️
2024-05-29 14:55:47 +00:00
### Setup Instructions for Debian-based Systems
2024-01-17 02:14:31 +00:00
```bash
2024-05-29 14:55:47 +00:00
# Update apt
2024-01-17 02:14:31 +00:00
sudo apt-get update
sudo apt-get -y upgrade
2024-05-29 14:55:47 +00:00
# Install dependencies from apt
2024-01-17 02:14:31 +00:00
sudo apt install -y bluez-tools bluez-hcidump libbluetooth-dev \
git gcc python3-pip python3-setuptools \
python3-pydbus
2024-05-29 14:55:47 +00:00
# Install pybluez from source
2024-01-17 02:14:31 +00:00
git clone https://github.com/pybluez/pybluez.git
cd pybluez
sudo python3 setup.py install
2024-05-29 14:55:47 +00:00
# Build bdaddr from the bluez source
2024-05-25 21:04:30 +00:00
cd ~/
git clone --depth=1 https://github.com/bluez/bluez.git
gcc -o bdaddr ~/bluez/tools/bdaddr.c ~/bluez/src/oui.c -I ~/bluez -lbluetooth
sudo cp bdaddr /usr/local/bin/
```
2024-05-29 14:55:47 +00:00
### Setup Instructions for Arch-based Systems
2024-05-25 21:04:30 +00:00
```bash
2024-05-29 14:55:47 +00:00
# Update pacman & packages
2024-05-25 21:04:30 +00:00
sudo pacman -Syyu
2024-05-29 14:55:47 +00:00
# Install dependencies
# Note: libbluetooth-dev included in bluez package for Arch-based systems
2024-05-25 21:04:30 +00:00
sudo pacman -S bluez-tools bluez-utils bluez-deprecated-tools \
2024-05-29 14:55:47 +00:00
python-setuptools python-pydbus python-dbus \
2024-05-25 21:04:30 +00:00
git gcc python-pip \
2024-05-29 14:55:47 +00:00
# Install pybluez from source
2024-05-25 21:04:30 +00:00
git clone https://github.com/pybluez/pybluez.git
cd pybluez
sudo python3 setup.py install
2024-05-29 14:55:47 +00:00
# Build bdaddr from the bluez source
2024-01-17 02:14:31 +00:00
cd ~/
git clone --depth=1 https://github.com/bluez/bluez.git
gcc -o bdaddr ~/bluez/tools/bdaddr.c ~/bluez/src/oui.c -I ~/bluez -lbluetooth
sudo cp bdaddr /usr/local/bin/
```
## Running BlueDucky
2024-05-29 14:55:47 +00:00
2024-01-17 02:14:31 +00:00
```bash
git clone https://github.com/pentestfunctions/BlueDucky.git
cd BlueDucky
2024-01-20 00:01:52 +00:00
sudo hciconfig hci0 up
2024-01-17 02:14:31 +00:00
python3 BlueDucky.py
```
2024-05-29 14:55:47 +00:00
Alternatively,
2024-01-17 02:14:31 +00:00
2024-05-29 14:55:47 +00:00
```python3
2024-05-23 12:08:26 +00:00
pip3 install -r requirements.txt
```
2024-01-17 02:14:31 +00:00
## Operational Steps 🕹️
2024-05-29 14:55:47 +00:00
1. Upon execution, it prompts for the target MAC address.
2024-01-17 02:14:31 +00:00
2. Pressing nothing triggers an automatic scan for devices.
2024-05-29 14:55:47 +00:00
3. Previously found devices are stored in known_devices.txt.
2024-01-17 02:14:31 +00:00
4. If known_devices.txt exists, it checks this file before scanning.
5. Executes using payload.txt file.
2024-05-29 14:55:47 +00:00
6. Successful execution results in automatic connection and script running.
## DuckyScript 💻
2024-01-17 02:14:31 +00:00
🚧 Work in Progress:
2024-05-29 14:55:47 +00:00
- Suggest ideas for improvement
2024-01-19 08:30:21 +00:00
2024-05-15 23:26:08 +00:00
## Version 2.1 🐛
2024-05-29 14:55:47 +00:00
2024-05-15 23:26:08 +00:00
- Updated UI
- Improved User Experience
2024-05-29 14:55:47 +00:00
- Bluetooth Debugger; Checks your Bluetooth adapters and installed dependencies before granting access to the application to prevent unsupported devices.
- Please Note: Numerous changes have been made; please reference the commit history for specific changes.
2024-05-15 23:26:08 +00:00
## What's Planned for the Next Release?
2024-01-17 02:14:31 +00:00
2024-05-29 14:55:47 +00:00
- Integrated DuckyScript Console for attacks that aim to maintain persistence after a payload has been executed.
- Suggest what should be added next! Join [HackNexus Discord Server ](https://discord.gg/HackNexus )
### 📝 Example payload.txt:
2024-01-16 06:57:05 +00:00
```bash
2024-01-19 03:14:28 +00:00
REM Title of the payload
STRING ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()_-=+ \|[{]}; :'",< . > /?
GUI D
2024-01-16 06:57:05 +00:00
```
2024-01-19 07:40:48 +00:00
```bash
2024-01-19 08:27:14 +00:00
REM Opens a private browser to hackertyper.net
DELAY 200
2024-01-19 07:40:48 +00:00
ESCAPE
GUI d
ALT ESCAPE
GUI b
DELAY 700
REM PRIVATE_BROWSER is equal to CTRL + SHIFT + N
PRIVATE_BROWSER
DELAY 700
CTRL l
DELAY 300
STRING hackertyper.net
DELAY 300
ENTER
DELAY 300
```
2024-01-17 02:14:31 +00:00
## Enjoy experimenting with BlueDucky! 🌟