spacehuhn/wifi_ducky

Just showing

supersjimmie opened this issue ยท 39 comments

Here's my result:
Supersjimmie USB WiFi Ducky

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

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

img_0788

I win. ;)

Oh, man. You evil guy.

Mr-iX commented

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

@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.

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

Mr-iX commented

img_0712

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

@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

@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.

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

And no, that is not the correct diagram.

Mr-iX commented

@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.

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

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

Mr-iX commented

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

@BlueArduino20 Sorry I understood you wrong

@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;

@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.

@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?

@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 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).

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

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

@supersjimmie I sent you a mail.

@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. ;)

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

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

Mr-iX commented

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_duck_4mb.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?

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

Mr-iX commented

@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

@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

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

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?

@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 ;-)

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

@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!

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

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

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