Bluetooth deauth kali linux

Гостевая статья Как отследить и подключиться к устройствам Bluetooth с помощью Kali Linux

Хотя многие люди могут использовать Bluetooth каждый день, большинство не знают, как он работает или что его можно взломать. Взлом Bluetooth дает четкое окно в мир цели. Почти каждое устройство имеет возможности Bluetooth, и люди хранят большое количество личной информации на своих телефонах и планшетах. Взломайте их Bluetooth-соединение, и вы сможете получить доступ ко всей этой информации.

Хотя Bluetooth имеет ту же частоту 2,4 ГГц , что и Wi-Fi, его свойства отличаются, так как протоколы не совсем одинаковые. Существует повышенная безопасность, так что популярные инструменты взлома Wi-Fi не будут работать на Bluetooth.

Во-первых, они постоянно перепрыгивают частоты, поэтому если у вас есть два устройства, взаимодействующих по Bluetooth, они оба используют алгоритм, который смещает частоту много раз в секунду. Это означает, что мы не можем просто сидеть на одной частоте и слушать, потому что они будут прыгать повсюду. Это затрудняет атакующему прослушивание разговора в первую очередь.

Другим свойством является то, что Bluetooth не договаривается о ключах каждый раз, как Wi-Fi делает, где это легко для всех, чтобы присоединиться и покинуть Wi-Fi сети. Вместо этого, Bluetooth договаривается о ключе один раз в начале, хранит секретный ключ, а затем ссылается на него каждый раз, когда видит одно и то же устройство. Это означает, что невозможно сидеть там и нюхать ключ, потому что вам нужно быть там в первый раз, когда эти устройства взаимодействуют. В противном случае вы не получите ничего полезного, и невозможно прыгнуть в разговор так, как это возможно с Wi-Fi.

Тем не менее, мы все равно можем отследить ближайшие Bluetooth-устройства, прочитать с них и даже записать специфические характеристики. Поэтому полезно провести рекогносцировку на случай, если мы сможем либо взять устройство под свой контроль, выявить уязвимость, либо позже найти уязвимость, совпадающую с той, что находится поблизости.

Что вам понадобится для Bluetooth-разведки?
Для начала Bluetooth-наблюдения Вам понадобится полностью обновленная версия Kali Linux, потому что мы будем использовать встроенные инструменты Bluetooth. Чтобы сохранить супер-основные вещи, мы не устанавливаем ничего лишнего, и мы можем просто работать с Bluetooth инструментами, которые Kali Linux имеет по умолчанию.

Встроенные инструменты, которые мы рассмотрим ниже, включают hciconfig , hcitool , sdptool , l2ping и btscanner . Многие из этих инструментов включены в BlueZ , стек протоколов Bluetooth по умолчанию почти в каждой версии Linux, включая Kali. (Мы также будем использовать некоторые специализированные инструменты для Bluetooth-разведки в Kali Linux).

Конечно, мы должны быть достаточно близко к тому, чтобы взломать Bluetooth. С помощью отличного Bluetooth-адаптера, который нужен, вы должны быть в состоянии добраться до Bluetooth-устройств в кафе, школьном классе, офисе, а может быть, даже в соседнем доме.

В моем примере мы видим интерфейс Bluetooth. Это то, что мы будем использовать с Bluetooth. Его текущее состояние не работает, и первое, что нам нужно сделать для работы с Bluetooth, это включить наш интерфейс.

Если у нас есть Wi-Fi интерфейс, который подключен, но еще не готов, мы можем ввести ifconfig , затем имя интерфейса, а затем вверх. Так как hciconfig в основном то же самое, что ifconfig , мы можем использовать множество тех же команд, которые вы можете увидеть на странице руководства.

На странице руководства мы видим, что это используется для настройки устройств Bluetooth, поэтому, если у вас есть это внешнее устройство Bluetooth или что-то подключенное, вы также можете использовать это, чтобы увидеть подключенные устройства и настроить их соответствующим образом.

Теперь, когда мы знаем немного больше о hciconfig, давайте продолжим и нажмите Q , чтобы выйти. Нам нужно взять обнаруженное нами устройство Bluetooth и запустить его. Просто введите hciconfig , затем имя устройства, которое мы нашли, и вверх .

Hcitool используется для настройки и выполнения различных задач, таких как сканирование, запросы и извлечение имен. Это действительно полезно, чтобы узнать об устройстве, но некоторые из этих команд требуют MAC-адрес для их использования.

Давайте посмотрим на некоторые из этих команд. Сначала мы сделаем сканирование. Он будет использовать интерфейс Bluetooth для сканирования ближайших устройств Bluetooth и представления их MAC-адресов, чтобы мы могли выполнить дополнительное сканирование, запрос или попытаться получить имя устройства.

Обратите внимание, что он также отображает смещение часов и класс. Класс указывает, какой это тип устройства Bluetooth, и мы можем посмотреть код, перейдя на сайт Bluetooth . Или, как мы увидим позже, некоторые инструменты сделают это за нас.

Шаг 3 — Сканирование служб с помощью sdptool
Чтобы узнать больше об услугах, мы можем использовать инструмент под названием sdptool, чтобы узнать больше о том, что доступно на устройстве, и узнать о свойствах — возможно, что мы можем и не можем сделать. Нам нужно будет снова использовать MAC-адрес, но сначала давайте проверим его справочную страницу:

Читайте также:  0x80070002 windows 10 microsoft store

Это позволяет нам настраивать, контролировать и опрашивать серверы SDP (протокол обнаружения служб). Так что это то, что позволяет нам делать запросы на устройствах Bluetooth и точно выяснять, что происходит с разрешениями и что мы, вероятно, можем начать делать с этими службами.

Выйдите из man-страницы, наберите sdptool , затем просмотрите , а затем MAC-адрес, который мы захватили.

Здесь мы можем увидеть немного больше информации об обмене данными, протоколах и, возможно, мы могли бы даже начать обнаруживать, есть ли уязвимость в устройстве или мы можем связаться с ним напрямую. Мы можем даже узнать, использует ли он рандомизацию MAC-адреса или что-то в этом роде.

Шаг 4 — Пинг устройств Bluetooth с помощью l2ping
Теперь, когда у нас есть MAC-адреса всех соседних устройств, мы можем проверить их с помощью инструмента под названием l2ping , независимо от того, находятся они в режиме обнаружения или нет, чтобы узнать, доступны ли они. Для меня это всего лишь одно устройство. Прежде чем сделать это, давайте запустим человек страницу для инструмента просто увидеть все , что доступно.

Это указывает на то, что устройство находится в пределах досягаемости и доступно.

Шаг 5 — Сканирование Bluetooth-устройств с помощью btscanner
Теперь пришло время перейти к последнему инструменту, который мы собираемся охватить, — это полноценный графический пользовательский интерфейс, используемый для обнаружения устройств Bluetooth. Он называется btscanner , и как только мы его запустим, мы можем набрать btscanner . Но перед этим, так как мы просмотрели справочные страницы по остальным инструментам, давайте кратко рассмотрим и здесь:

Здесь мы можем увидеть название устройства, когда оно впервые увидено, владельца, который интересен, а затем еще немного информации о различных рекламируемых функциях.

Чтобы вернуться в главное окно, нажмите Q , и по мере обнаружения других устройств, или когда они находятся в пределах досягаемости, мы можем найти их здесь и начать узнавать больше о том, что делают эти устройства, с чем они общаются, что иначе они способны и больше.

Если у вас нет Bluetooth на вашем компьютере, вы всегда можете подключить адаптер Bluetooth, но вы можете проверить его совместимость, прежде чем идти дальше и решать проблемы. Я не уверен, что каждый адаптер Bluetooth будет работать с любой программой Linux.

Выше видно, что мы нашли второе устройство, так что давайте продолжим и нажмем на него.

Мы видим, что это смартфон — устройство Samsung, и у него гораздо больше возможностей и вещей, которые мы могли бы с ним сделать, чем у нашего первого устройства. Уже сейчас мы можем протянуть руку и начать смотреть на различные устройства. Мы можем начать узнавать о них, может быть, о программном обеспечении, которое стоит за ними, и, конечно, видеть сервисы, которые они рекламируют, чтобы понять, представляет ли оно хорошую поверхность для атаки или нет.

Все вышесказанное сделано с помощью полностью обновленной версии Kali Linux, и нам не пришлось ничего устанавливать. Так что, если вы начинаете с Kali Linux заново, то это отличный способ использовать некоторые из встроенных инструментов, чтобы связаться и прикоснуться к Bluetooth-устройствам вокруг вас, и начать узнавать больше о том, на что способен каждый из этих универсальных и мощных инструментов.

То, что мы узнали в статье.
Сегодня мы изучили разведку Bluetooth, и есть несколько более сложных вещей, которые мы можем сделать с этой информацией. Многие устройства Bluetooth не пытаются рандомизировать свой MAC-адрес, а это означает, что он будет одинаковым все время. Это может быть использовано для отслеживания человека с места на место.

Например, трекеры Bluetooth Tile , где вы можете найти потерянный предмет у любого, у кого запущено приложение. Это означает, что человек отслеживается, и его невозможно отключить. Если вы хотите отказаться от такого рода отслеживания, обязательно отключите Bluetooth на таких устройствах, как сотовый телефон. Но для устройств, которые, естественно, включают его, таких как трекер, нет другого выбора, кроме как оставить его дома.

Источник

Deauthentication attack using Kali Linux

Hello Duthcode Hackers, this is how i am going to be calling you from now on. In this article i am going to be talking about a hack attack called deauthentication.
In my humble opinion, when a hacker learns about a new attack, he or she has the obligation to also learn how to prevent it. So, this is not going to be a simple how to, this article will be divided in 4 parts:

  1. | What is a Deauth Attack
  2. | Why would you want to attack in that way
  3. | How to do it
  4. | How to prevent the attack and take the necessary precautions

Feel free to skip steps of course.

1 | What is a Deauth Attack ?

Deauthentication attack is a type of denial of service attack that targets communication between a user ( or all users ) and a Wi-Fi access point.
This attack sends disassociate packets to one or more clients which are currently associated with a particular access point. Of course, this attack is totally useless if there are no associated wireless client or no fake authentications.
The cool thing about this attack is that even in 2019 where all networks are using a WPA2 encryption you can still easily deauth anything or anyone without even being inside the network!

  • Why does a deauth attack work on WPA2 despite encryption?
    • The use of encryption in 802.11 is limited to data payloads only. Encryption does not apply to the 802.11 frame headers, and cannot do so as key elements of 802.11 headers are necessary for normal operations of 802.11 traffic.
      Since 802.11 management frames largely work by setting information in the headers, management frames are not encrypted and as such are easily spoofed.
      To prevent deauthentication/disassociation attacks, the IEEE implemented the 802.11w amendment to 802.11. This provides a mechanism to help prevent the spoofing of management frames, but both client and infrastructure need to support it (and have it enabled) for it to function. (source)
Читайте также:  При установке принтера не видит usb порт windows 10

2 | Why would one attack a network in that way?

A deauth attack is, most of the times, a step of a greater attack! Hackers usually need to deauth a user off of a network so they can:

  • Capture WPA/WPA2 4-Way Handshakes by forcing a user to reconnect to the network
  • Force users to connect to their own Rogue access point (search : Evil Twin Attack)
  • Force users to connect to a Captive Portal

I will be writing articles and tutorials demonstrating every single one of the aforementioned attacks so stay tuned.

You can also deauth users in your network for way simpler reasons, like:

  • Kick a sibling or a friend off the network just because they are slowing your connection down
  • Frustrate people and laugh
    • example, let’s say your best friend is a waiter, and he takes his orders from customers with a PDA connected to the Cafe’s Wi-Fi connection, deauth his PDA and drive him mad. (You didn’t read that from me).

Ok, enough with the Theory! Practice!

3 | How to Deauth

For this attack we need a tool called aircrack-ng, aircrack-ng is more of a suite actually containing many tools to assess Wi-Fi network security, I have a list of the aircrack tools in my Introduction to Kali Linux article, tool #5.
Since aircrack-ng suite comes pre-installed inside the Kali Linux Distribution, the whole tutorial is on Kali Linux, if you don’t have Kali installed on your computer or on a Virtual Machine take a look at my Kali Linux bootable USB — A Hacker’s Swiss army knife article and get ready!

Ok! one last thing, since we are talking about sending packets we will need a wireless adapter both able to work in monitor mode and be a packet injector!

  • What is Monitor Mode? | For listening and Capturing
    • Monitor mode allows you to capture data sent and received by wireless devices and networks nearby. Without it you can not see which devices are active and what is happening inside the network.
  • What is Packet Injection? | For transmitting and Attacking
    • Packet injection allows you to craft and inject or send data to wireless devices and networks nearby. Without it you can not intercept or manipulate any activity from within the network.

My favourite wireless adapter, and the one I’ll be using for this tutorial, is Alfa AWUSO36NH High Gain USB Wireless G / N Long-Rang WiFi Network Adapter , it has never failed me thus far.

DANGER : 2020 Update, Tp Link Adapters have been updated to the V2 (Version 2) and they don’t work with Kali anymore! So go ALFA!

Step 1 | Fire up Kali and open up a Terminal

By typing ifconfig and the enter key on your terminal you get the following output :

At the eth0 section in my ifconfig output you see that i have inet 10.0.2.15, this is because i am running Kali Linux on a Virtual Machine and i have it connected on a nat network. Don’t worry about it, you do not even have to care!

All YOU have to care about is the wlan0 section that is your wireless adapter and as you can see mine in not even connected to a network.

Now, if we type to our terminal iwconfig and execute it we see:

Mode : managed, our first goal is to put our wireless adapter on monitor mode.

Step 2 | Setting wireless adapter in monitor mode with airmon-ng

By running the airmon-ng start wlan0 (or whatever your adapter is called, it could be wlan1 or wlan2) you are setting your adapter to monitor mode! Check out the output :

See the above iwconfig result. Mode:Monitor and the name is wlan0mon! You are ready to go.

Step 3 | Searching for Victims with airodump-ng

Run on your terminal => airodump-ng wlan0mon

You will get a bunch of different access points with a lot of info you don’t understand! Let’s break them down.

  • BSSID | MAC address of the access point. In the Client section, a BSSID of “(not associated)” means that the client is not associated with any AP. In this unassociated state, it is searching for an AP to connect with.
  • PWR | Signal level reported by the card. Its signification depends on the driver, but as the signal gets higher you get closer to the AP or the station. If the BSSID PWR is -1, then the driver doesn’t support signal level reporting. If the PWR is -1 for a limited number of stations then this is for a packet which came from the AP to the client but the client transmissions are out of range for your card. Meaning you are hearing only 1/2 of the communication. If all clients have PWR as -1 then the driver doesn’t support signal level reporting.
  • Beacons | Number of announcements packets sent by the AP. Each access point sends about ten beacons per second at the lowest rate (1M), so they can usually be picked up from very far.
  • # Data | Number of captured data packets (if WEP, unique IV count), including data broadcast packets.
  • #/s | Number of data packets per second measure over the last 10 seconds.
  • CH | Channel number (taken from beacon packets).
    Note: sometimes packets from other channels are captured even if airodump-ng is not hopping, because of radio interference.
  • MB | Maximum speed supported by the AP. If MB = 11, it’s 802.11b, if MB = 22 it’s 802.11b+ and higher rates are 802.11g. The dot (after 54 above) indicates short preamble is supported. Displays “e” following the MB speed value if the network has QoS enabled.
  • ENC | Encryption algorithm in use. OPN = no encryption,“WEP?” = WEP or higher (not enough data to choose between WEP and WPA/WPA2), WEP (without the question mark) indicates static or dynamic WEP, and WPA or WPA2 if TKIP or CCMP is present.
  • CIPHER | The cipher detected. One of CCMP, WRAP, TKIP, WEP, WEP40, or WEP104. Not mandatory, but TKIP is typically used with WPA and CCMP is typically used with WPA2. WEP40 is displayed when the key index is greater then 0. The standard states that the index can be 0-3 for 40bit and should be 0 for 104 bit.
  • AUTH | The authentication protocol used. One of MGT (WPA/WPA2 using a separate authentication server), SKA (shared key for WEP), PSK (pre-shared key for WPA/WPA2), or OPN (open for WEP).
  • ESSID | Shows the wireless network name. The so-called “SSID”, which can be empty if SSID hiding is activated. In this case, airodump-ng will try to recover the SSID from probe responses and association requests.
Читайте также:  Nvidia inspector ��� linux

My target is me. TP-LINK_AP_4CE8! I am highlighting me because i am trying very hard not to break any laws, so should you!

Step 4 | Specific Targeting for better information gathering

Now that we know all that we need to know about our target we have to find any devices connected to the network, to do that we run the following command.

The commands structure is airodump-ng -d «target’s BSSID» -c «target’s channel number» «wireless adapter monitor mode name»
In our case the full command is:

Now we are monitoring SPECIFICALLY our target, and not many targets in general. Also we can see that there are two devices currently inside the network, one of which is my phone!

Step 5 | Deauthenticating Device from the network

This is our final command!

  • -0 means deauthentication.
  • 0 is the number of deauths to send 0 means send them continuously, you can send 10 if you want the target to disconnect and reconnect.
  • -a 50:C7:BF:DC:4C:E8 is the MAC address of the access point we are targeting.
  • -c E0:B5:2D:EA:18:A7 is the MAC address of the client to deauthenticate; if this is omitted then all clients are deauthenticated.
  • wlan0mon is the interface name.

The command continuous output:

And its immediate result :

4 | Prevent the attack and take the necessary precautions

You are now well familiar with the attack and know all the theory a beginner may need! But how could one prepare himself for defending against a deauthentication attack?

You can not stop a bad guy from sending deauth packets. Instead you should make sure your network is configured in a way that the deauth attack doesn’t enable an attacker to compromise your network.

  • Make sure your network is using WPA2 encryption.
  • Your Wi-Fi passphrase should be very long and strong.
  • Once you have been disconnected from your network, make sure that you connect back to a WPA2 secure network and not an open one with the same name as yours! IMPORTANT.

That was it! Thank you for reading! Here are some other Articles you might like:

You can show your support by liking our Facebook Page ! Support our efforts on Ko-Fi ! And you can get in contact with us either by sending us a message on Facebook or via the e-mail on the footer of the Page!

Источник

Оцените статью