DDoS attacks on Bluetooth. How to disable annoying portable speakers

Date: 04/08/2020

Gangs of teenagers with portable Bluetooth speakers playing loud music drive me nuts. Today, I will explain how to neutralize this ‘natural disaster’ without (OK, almost without) committing a criminal offense.

Modern Wi-Fi routers can filter out unwanted packets, but the majority of Bluetooth adapters are dumb, to say the least. They neither care what packets you send, nor what is their size and number. Therefore, you can increase the information volume of a ping packet in Linux to a tremendous size and then send 1000 such packets to a Bluetooth device.

First, you have to find a suitable device within the range using the command

$ hcitool scan

The command displays the list of available Bluetooth devices and their MAC addresses. If your system cannot see a Bluetooth adapter, try installing a Bluetooth manager for Linux. For instance, in Kali, I use gnome-bluetooth installed by the command:

$ apt-get install gnome-bluetooth

Alternatively, you can use the blueman utility:

$ apt-get install blueman

After getting the list of potential victims, attack them using one of the methods below:

Method 1. l2ping

Enter the command:

$ l2ping -i hci0 -s  -f 

It will generate packets with the size specified by the parameter and send them to the MAC address specified by the parameter. As a result, you will observe the following situation: the response time in the terminal is steadily growing, and the Bluetooth function on the attacked device stops working. After a while, it will turn on again – but the annoying loud music would be off for some time bringing you malicious satisfaction.

INFO

The above scheme works fine if the attacked device (e.g. a smartphone) us connected to headphones or a speaker via Bluetooth. After the attack, the two devices won’t be able to reconnect with each other.

Method 2. Websploit

There is also a more elegant way to silence a speaker producing rap sounds. Launch the Websploit utility:

$ websploit

Enter the following command in the console:

$ show modules

It will display all modules compatible with this utility; there are plenty of Wi-Fi components, but you need the bluetooth/bluetooth_pod module.

$ use bluetooth/bluetooth_pod

Now you have to set up the parameters and specify the attacked device:

$ show options
$ set bdaddr 

To make sure that Bluetooth is killed, change the size of the outgoing packet:

$ set size 999

Time to launch the ‘silence machine’:

$ run

The resultant picture is the same: the ping duration increases, and the music stops. Terrific!

The above two methods are effective against nearly all Bluetooth speakers, headphones, and other similar devices. This is because their manufacturers are too lazy to release firmware updates enabling the filtering of incoming packets. Therefore, if you have a Linux laptop, you can silence any speaker within its range.

If the speaker withstands the attack, you may try sending packets to the phone connected to it. I tested this method on a powerful JBL Xtreme speaker, and it withstood the load. But cheap made-in-China devices are effectively silences by this attack.

Ready-to-use jammers

Online stores offer exciting devices, including jammers operating at certain frequencies. Such gadgets may cost good money and offer various capabilities. Some of them kill all mobile signals, including Wi-Fi and Bluetooth, at once, while others cannot even jam H+.

If you really need such a device, I strongly recommend to research the respective articles in the national legislation prior to purchasing it. In some countries, you have to register your jammer with the authorities; failure to do so results in administrative or criminal liability.

Connecting to another device.

As discussed above, simple speakers and headphones almost never filter out the received packets. But what if you send to such a device not a just ping packet, but a packet containing a connection request? Or many such packets?

Not all manufacturers take precautions against the buffer overflow error. What happens if the received packets are lined up, and no space is left to store new requests? In such a situation, the speaker would try to execute the command and concurrently clear the buffer.

Therefore, use the standard Bluetooth communication protocol, rfcomm. Too bad, the utility controlling this protocol doesn’t allow to send a thousand of such requests. So, I am going to write a short Python script automating the process.

#!/usr/bin/env python
import subprocess

cmd=['rfcomm', 'connect', '', '1']

for i in range(0, 1001):
subprocess.call(cmd)
print('Connecting...')

Before running the script, you have to find out the MAC address of the device. Use the above mentioned hcitool scan command and insert the retrieved address into the script instead of the . Save the script and execute it:

$ python 

The success or failure of the script execution will depend on the model of the attacked device (to be specific, on the time required to fill its buffer). If the buffer becomes full prior to the flushing, the command will be executed, and you connect to the speaker simultaneously with its legitimate user. However, if the buffer is flushed first, you will have to run the script again.

After the successful execution of the script, you can throw your own disco party or disable the device. My experiments with JBL Xtreme resulted in its shutdown, while JBL Flip 2 has passed under my full control.

Let the silence be with you! Good luck!

Related posts:
2022.06.01 — F#ck AMSI! How to bypass Antimalware Scan Interface and infect Windows

Is the phrase "This script contains malicious content and has been blocked by your antivirus software" familiar to you? It's generated by Antimalware Scan Interface…

Full article →
2022.06.01 — Cybercrime story. Analyzing Plaso timelines with Timesketch

When you investigate an incident, it's critical to establish the exact time of the attack and method used to compromise the system. This enables you to track the entire chain of operations…

Full article →
2023.07.29 — Invisible device. Penetrating into a local network with an 'undetectable' hacker gadget

Unauthorized access to someone else's device can be gained not only through a USB port, but also via an Ethernet connection - after all, Ethernet sockets…

Full article →
2022.06.01 — Routing nightmare. How to pentest OSPF and EIGRP dynamic routing protocols

The magic and charm of dynamic routing protocols can be deceptive: admins trust them implicitly and often forget to properly configure security systems embedded in these protocols. In this…

Full article →
2022.06.02 — Climb the heap! Exploiting heap allocation problems

Some vulnerabilities originate from errors in the management of memory allocated on a heap. Exploitation of such weak spots is more complicated compared to 'regular' stack overflow; so,…

Full article →
2022.02.16 — Timeline of everything. Collecting system events with Plaso

As you are likely aware, forensic analysis tools quickly become obsolete, while hackers continuously invent new techniques enabling them to cover tracks! As…

Full article →
2022.04.04 — Elephants and their vulnerabilities. Most epic CVEs in PostgreSQL

Once a quarter, PostgreSQL publishes minor releases containing vulnerabilities. Sometimes, such bugs make it possible to make an unprivileged user a local king superuser. To fix them,…

Full article →
2023.03.03 — Infiltration and exfiltration. Data transmission techniques used in pentesting

Imagine a situation: you managed to penetrate the network perimeter and gained access to a server. This server is part of the company's internal network, and, in theory, you could…

Full article →
2022.01.01 — It's a trap! How to create honeypots for stupid bots

If you had ever administered a server, you definitely know that the password-based authentication must be disabled or restricted: either by a whitelist, or a VPN gateway, or in…

Full article →
2022.06.03 — Playful Xamarin. Researching and hacking a C# mobile app

Java or Kotlin are not the only languages you can use to create apps for Android. C# programmers can develop mobile apps using the Xamarin open-source…

Full article →