Кейлоггер через вай фай

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

License

awesome-pentest-gadgets/wifi-ducky-keylogger

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Keystroke injection and Keylogger with an ESP8266 + Arduino Pro Micro + USB Host Shield

WARNING BASIC WORK IN PROGRESS. DO NOT USE!

image of my DIY Wi-Fi Duck

Support me on Patreon

Support me and my projects on Patreon!

It’s a Wi-Fi controlled BadUSB device to remotely execute Ducky Scripts.

Using a USB device which act as a keyboard to inject keystrokes is well known these days. The USB Rubber Ducky by Hak5 is THE hacker gadget for this kind of attack. It introduced a simple script language called Ducky Script, which this project uses too.

The ESP8266 is a popular Wi-Fi chip used in a lot of projects. Because it’s cheap, small and has its own file system (SPIFFS), it’s perfect for enabling an easy remote connection and holding Ducky Script payloads.

Although the ESP8266 is awesome, it doesn’t have native USB, which means it can’t act as a keyboard 🙁
(cnlohr made a cool project on this and added a USB stack himself: https://github.com/cnlohr/espusb. The problem with that is, that it isn’t compatible with the current SDK version, also I wanted to use Arduino to make it more user friendly.)

Here comes the ATmega32u4 into play!
It can act as keyboard and thanks to Seytonic run Ducky Script (link).
So what I did is connecting the ATmega to the ESP8266 via serial.

Читайте также:  Настроить тп линк вай фай через телефон

The ESP will open up a Wi-Fi access point and host a web interface from what you can upload and manage your scripts.
When you hit run, it will send the script to the ATmega, which then will execute it on the target machine.

The benefits of adding Wi-Fi

But why add Wi-Fi . you might ask.
With Wi-Fi you can upload and run your Ducky Script payloads remotely.
You just need to plug the device in, connect to its Wi-Fi network and you have full control over the target machine.

It also gives you one big advantage over other BadUSBs, you can test your scripts live! You don’t need to copy them onto a micro-sd card or compile them. You can run them live over the web interface, which makes its super easy for testing and improving your scripts.

It also adds a lot of possibilities for different attacks.
You could make the target download executables from the Wi-Fi chip, instead of the internet. Or execute different attacks and send the results back to the Chip. Or open up a reverse shell on the ESP8266s Wi-Fi.
And so on. there are so much possibilities!

Use it only for testing purposes on your own devices!
I don’t take any responsibility for what you do with this project.

Upload the arduino_wifi_duck sketch to your ATmega32u4 and upload the esp8266_wifi_duck sketch to your ESP8266.
Then connect the serial pins (RX and TX (Arduino) to TX and RX (ESP8266)) and GND.

  • ESP8266 Wi-Fi chip
    I recommend using an ESP-12. It’s widely used, cheap, tiny and has 4MB of flash memory.
    However if you’re a beginner you should probably start with a developer board like the NodeMCU or a Wemos d1 mini.
  • ATmega32u4
    The Arduino Micro and Arduino Leonardo use an ATmega32u4 for example. You could also get a Arduino Pro Micro or other cheap Arduino clones which use the ATmega32u4. I will use an ATmega32u4 CJMCU Beetle.
  • (a 3.3V regulator)
    I put that in brackets because you will only need this if your ATMega32u4 board doesn’t provide 3.3V. The ESP8266 only works with 3.3V, so depending on your board you may need a regulator to get 3.3V out of the 5V.
  • Some skill, knowledge and common sense on this topic
    That’s probably the most important part here. This project is not noob friendly! If you are a beginner, please start with other projects and get some knowledge about how Arduino and its code works, how to handle errors and how to work with the ESP8266. I can’t cover every little detail here. Please respect that. Depending on your hardware choices you may need to add or change a bit of the Arduino code.
Читайте также:  Wifi compaq presario cq58

So make your hardware choices!
Also I wouldn’t go straight forward and solder everything together. Test it beforehand, otherwise debugging can be hard!

nodemcu with a leonardo as wifi duck

For an easy start, better debugging, further development or if you just wanna test this project, I recommend using a Nodemcu + an Arduino Leonardo: This is easy to setup, you don’t need any soldering skills and you can still use both the NodeMCU and the Arduino for other cool projects.

First you will need to flash your ESP8266.
You can either flash the bin file directly or compile it yourself using Arduino.

Note: You will only need to flash it once, every new update can then be done over the possibilities.

If don’t use a USB dev board and don’t know how to flash your plain ESP8266, I recommend you to have a look at this instructable: http://www.instructables.com/id/Getting-Started-with-the-ESP8266-ESP-12/?ALLSTEPS

You could also use your Arduino to flash it: https://gist.github.com/spacehuhn/b2b7d897550bc07b26da8464fa7f4b36 (The connections are the same for this project, the only difference is that you need to set GPIO-0 to LOW to enabling a firmware update).

Flash the .bin File
Go to releases and download the right bin file for your ESP8266.
You can flash it with the esptool or the nodemcu-flasher.

Upload using Arduino
Open the esp8266_wifi_duck sketch with Arduino. You need to install the following libraries:

Then compile and upload it to your ESP8266 (check if your settings are right).

Open the arduino_wifi_duck sketch in Arduino and upload it to your Arduino.

Ok so now you need to connect the ESP8266 with the Arduino.
Connect these pins:

Arduino ESP82666
TX RX
RX TX
GND GND
VCC (3.3V) VCC (3.3V)

Like I mentioned before, you’ll need a 3.3V regulator if your Arduino only provides 5V.
Don’t connect the ESP8266 to 5V!

If you use a plain ESP-12 like me, you also have to set the enable pin and to HIGH and GPIO15 to LOW:

PIN Mode
GPIO15 LOW (GND)
CH_PD (EN) HIGH (3.3V)

Update ESP8266 over the Web interface

Once you flashed the software, you can update it over the web interface.
Go to 192.168.4.1/update and upload the new .bin file.
(In Arduino go to Sketch -> Export compiled Binary to compile your own .bin file)

Plug your Wi-Fi Ducky in and connect to the new Wi-Fi network WiFi Duck . The password is quackquack .
Open your browser and go to 192.168.4.1 .

screenshot of the webinterface

There you can now upload, view, delete and run new Ducky Scripts.

PLEASE NOTE that the max length per row for a script is 600 chars.

  • add support for Digispark (ATtiny85) as alternative for the ATmega32u4 Arduino
  • change settings within the web interface (Wi-Fi SSID, password etc.)
  • full support of all Ducky Script commands (DEFAULTDELAY is missing)
  • auto execute scripts
  • add mouse
  • control over the internet
Читайте также:  Microsoft network monitor wifi

This project is licensed under the MIT License — see the license file file for details

Sources and additional Links

Источник

Создан кейлоггер, перехватывающий нажатия клавиш посредством сигнала Wi-Fi

Xakep #289. Взлом в воздухе

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

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

Свой эксперимент исследователи из университетов Мичигана и Нанкина назвали WiKey. В ходе опытов они использовались только стандартные устройства, купленные в магазинах, и никакого кастомного железа. В частности, в экспериментах участвовали роутер TP-Link TL-WR1043ND ноутбук Lenovo X200.

Чтобы перехватить информацию о нажатиях клавиш, исследователи задействовали возможности MIMO (Multiple-Input and Multiple-Output). Данный метод позволяет каждой из антенн устройства передавать несколько сигналов Wi-Fi на одном канале. Эти сигналы исполняют роль сканера: проходя по помещению, они создают своего рода карту окружающей обстановки. Именно поэтому WiKey можно применять только в помещениях, где нет большого скопления людей и движущихся объектов.

Когда человек печатает что-либо на клавиатуре ноутбука, WiKey замечает незначительные искажения Wi-Fi сигнала, спровоцированные движениями его рук, пальцев и самих клавиш.

«При нажатии на определенную клавишу кисть и пальцы пользователя движутся в уникальном порядке и направлении, что создает уникальный паттерн во временном ряде Channel State Information (CSI), который мы называем формой колебаний CSI», — объясняют исследователи.

Группа утверждает, что если научить специальный алгоритм распознавать, какая именно клавиша была нажата пользователем, можно последовательно восстановить весь текст, который тот набирал на клавиатуре.

wifi signals

Исследователи приводят статистку проведенных ими опытов. В помещении, где нет лишних движущихся объектов, а пользователь печатает достаточно медленно, система сумела распознать нажатия с точность 97,5%. Однако лабораторные условия не всегда совпадают с реальностью. Так, в реальном мире, если в помещении присутствуют искажения сигнала, а пользователь печатает быстро, точность системы составляет 77,43% (если системе выделили 30 образцов для тренировки) и 93,47% (если системе выделили 80 образцов).

Если использовать WiKey в полевых условиях, потенциальному злоумышленнику сначала придется потратить время и натренировать систему. Хотя точность у WiKey не стопроцентная, во многих случаях атакующие будут рады узнать хотя бы 3/4 пароля жертвы, ведь это значительно облегчит им последующий взлом. Впрочем, атаку можно испортить, просто посадив рядом двух-трех людей: если все они будут печатать одновременно, WiKey не справится со своей задачей.

С полной версией доклада исследователей можно ознакомиться здесь (PDF).

Источник

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