spacehuhn / wifi_ducky

Upload, save and run keystroke injection payloads with an ESP8266 + ATMEGA32U4
MIT License
1.28k stars 294 forks source link

Just showing #40

Open supersjimmie opened 7 years ago

supersjimmie commented 7 years ago

Here's my result: Supersjimmie USB WiFi Ducky

supersjimmie commented 7 years ago

The 2 buttons and the 3-pin header are just extra's and can be removed.

adamff-dev commented 7 years ago

Hi, I've got some questions about your creation. Have you got Discord account or... email?

0xCoto commented 7 years ago

img_0788

I win. ;)

adamff-dev commented 7 years ago

Oh, man. You evil guy.

Mr-iX commented 7 years ago

@0xCoto Could you share, how you made this?

0xCoto commented 7 years ago

@Mr-iX Connected all the Pins, uploaded the USB-to-Serial Arduino Code to the SS Micro, flashed the ESP-12E with the esp-flasher.exe and uploaded the Arduino-Ducky code to the SS Micro.

tobozo commented 7 years ago

So this build solves the problem of not being able to flash after soldering, am I right ?

Mr-iX commented 7 years ago

img_0712

@0xCoto Is that the right circuit diagram for this build? Where have you hidden all the required cables?

adamff-dev commented 7 years ago

@Mr-iX I think your diagram is completely wrong. He has hidden the cables under the ESP-12E, there is enough space.

Mr-iX commented 7 years ago

@BlueArduino20 I just draw the diagram side-by-side only for simplicity. You have to move the right side (ESP-12E) over the left side (Arduino SS Micro), to have the real construction.

0xCoto commented 7 years ago

@Mr-iX Then why are you asking where I hid the cables?

And no, that is not the correct diagram.

Mr-iX commented 7 years ago

@0xCoto I haven't known if there is enough space. But now I know ;) What is wrong with the diagram? I thought this would be right for flashing the ESP module.

0xCoto commented 7 years ago

These are the correct connections: TX to RX RX to TX 3.3v to VCC GND to GND GND to GPIO15 D14 to GPIO0 D15 to EN

adamff-dev commented 7 years ago

@Mr-iX I wasn't saying that the cables are the problem of the diagram.

Mr-iX commented 7 years ago

Now this should be the correct one. Maybe it helps someone in the future. img_0713

@BlueArduino20 Sorry I understood you wrong

adamff-dev commented 7 years ago

@Mr-iX Yeah, that should be the right diagram. Also you need to modify the first two lines of the serial code. From:

int program_pin = 12;
int enable_pin = 13;
To:
int program_pin = 14;
int enable_pin = 15;
supersjimmie commented 7 years ago

@BlueArduino20 what do you mean you have a question and want my mail?

@0xCoto yeah you win with that picture. but I have now a complete working combination of both @spacehuhn Keylogger and @spacehuhn wifi_ducky together in one code and one piece of hardware built into an HP keyboard. I could place a picture here, but that would just be a pic of an HP keyboard. :) So here's the keyboard opened: img_3971

This nifty thing is capable of logging keystrokes, making them visible over it's own hidden wifi, and then attacking with a Ducky-script over that wifi again. I made a small demo here with my friends with a clean W10 pc. The pc was not connected to any network. One person was asked to change the local password and lock the pc. Then I took that password out of the keylogger-data and placed it into a Ducky script that unlocked the pc. After unlocking another Ducky script started notepad and typed the text:

You have been Ducked.
Your password is...  (showing the password here)

Even after I told them that is was "some kind of hardware" it took them a lot of time and several hints to discover it.

0xCoto commented 7 years ago

@supersjimmie That's awesome! I would love to learn more, since Spacehuhn's Keylogger is pretty large and not as incognito as this ^. Been trying to make such hardware for a long time. What's your Discord/Skype/Twitter?

careyer commented 7 years ago

@BlueArduino20 : Where can this Serial-Code be found? int program_pin = 14; int enable_pin = 15;

Cannot find these variables in any of those files? Thanks!

0xCoto commented 7 years ago

@careyer https://gist.github.com/spacehuhn/b2b7d897550bc07b26da8464fa7f4b36

careyer commented 7 years ago

@0xCoto thank you very much.... i did not realize that I had to flash a completely different sketch to the arduino ;-). I thought that there must be a way to do it via the Update function in the GUI (Info Tab --> Update).

supersjimmie commented 7 years ago

@0xCoto just use my Github name at gmail dot com (I'm not reading that account daily though)

br0k3nilluzion commented 7 years ago

@supersjimmie are you going to share that bby on your github?

0xCoto commented 7 years ago

@supersjimmie I sent you a mail.

supersjimmie commented 7 years ago

@br0k3nilluzion would love to do so, but I just started at my new job so I don't have much time. But I did start thinking about it... @0xCoto replied. ;)

br0k3nilluzion commented 7 years ago

@supersjimmie yeah I feel you on that.. all work and no play. Would love to see it when you get a chance to share.

GarethWright commented 7 years ago

I second that @br0k3nilluzion, @supersjimmie is exactly....down to the keyboard what I'm going for

Mr-iX commented 7 years ago

Now I have built the WiFi Ducky from @0xCoto. I have connected all the wires (picture above) and uploaded this to the Arduino: int program_pin = 14; int enable_pin = 15;

void setup() { Serial1.begin(115200); Serial.begin(115200); pinMode(enable_pin, OUTPUT); pinMode(program_pin, OUTPUT); digitalWrite(program_pin, LOW); digitalWrite(enable_pin,HIGH); }

void loop() { while(Serial1.available()){ Serial.write((uint8_t)Serial1.read()); }

if(Serial.available()){ while(Serial.available()){ Serial1.write((uint8_t)Serial.read()); } } }

But when I try to flash the esp8266_wifi_duck_4mb.bin file to the ESP8266, I get following error message: sh-3.2# esptool.py --port /dev/cu.usbmodem3A21 write_flash -fm dio 0x00000 esp8266_wifi_duck4mb.bin esptool.py v2.0.1 Connecting........____............................................._____

A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header

I have tried a second ESP and Arduino, but I get the same error. Can you give me a hint what I'm doing wrong?

0xCoto commented 7 years ago

@Mr-iX Have you tried with the esp-flasher.exe? It worked for me.

Mr-iX commented 7 years ago

@0xCoto You mean that tool? https://github.com/nodemcu/nodemcu-flasher

It worked with that, but after all steps, I cannot find a WiFi Network

adamff-dev commented 7 years ago

@Mr-iX You have to modify the "arduino_wifi_duck.ino" file too. From:

  pinMode(13,OUTPUT);
  digitalWrite(13,HIGH);
**To:**
  pinMode(15,OUTPUT);
  digitalWrite(15,HIGH);
Mr-iX commented 7 years ago

@BlueArduino20 Thank you so much, that was the solution!

careyer commented 7 years ago

I have re-wired my hardware according to how @0xCoto suggested (and @Mr-iX depicted, thanks). It does not work with the original Wifi-Ducky code though. You have to alter the following lines in the arduino_wifi_duck.ino code:

pinMode(13,OUTPUT); digitalWrite(13,HIGH);

to

pinMode(15,OUTPUT); digitalWrite(15,HIGH);

otherwise the Enable-PIN will not be set HIGH and the ESP8266 will not be activated.

Furthermore I wonder what needs to be added to the code in order to make the update-process via the webinterface possible. In the INFO tab of the Web Interface there is a possibility to upload a .bin file that is supposed to update the ESP8266 firmware (regarding to the readme.md of this project). However I cannot see any update code on the Teensy side at all. I think the teensy somehow has to put the ESP8266 module into programming mode by raising a PIN to HIGH. Has anyone an idea?

careyer commented 6 years ago

@supersjimmie: more and more I like the idea of your combined keylogger+ducky solution. Would you mind to share the combined code and/or document how you build the hardware? That HP keyboard looks neat ;-)

supersjimmie commented 6 years ago

@careyer see https://github.com/supersjimmie/wifi_ducky_keylogger The code is there, only missing the readme.md.

careyer commented 6 years ago

@supersjimmie : Great thank you very much! Could you please also add a short description on how to wire things up? Just giving very basic direction! That would really help! Thank you very much!

supersjimmie commented 6 years ago

@careyer Sure I can... (mubles something about time...)

supersjimmie commented 6 years ago

Ah well.. Found just enough time to add the basics. Let me know how it goes with that?

careyer commented 6 years ago

@supersjimmie : Thank you very much! That makes things much clearer! =) Well done! I will give it a shot! :)