spacehuhntech / wifiduck Goto Github PK
View Code? Open in Web Editor NEWWireless keystroke injection attack platform
Home Page: http://wifiduck.com
License: MIT License
Wireless keystroke injection attack platform
Home Page: http://wifiduck.com
License: MIT License
Testing the ES layout on my WiFiDuck:
REM es char test
LOCALE ES
GUI r
notepad.exe
ENTER
DELAY 200
STRING !"#$%&'()*+,-./0123456789: =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~¿¡ñÑçǺª€·¨`
ENTER
returns the following in a notepad:
!"#$%&.()*+,-./0123456789: =>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvwxyz{|}~¿¡ñÑçǺª€·¨`
As you can see, every character is translated correctly except for the 7th one, where the apostrophe (') is translated into a dot (.)
This is making it impossible for me to type powershell commands into the wifiduck, as that character is commonly required.
In a common spanish keyboard layout, (') is located just after the top numeric line, so it is like this:
ESC 1 2 3 4 5 6 7 8 9 0 ' ¡ BACKSPACE
Any advice will be appreciated. Thanks in advance.
Having an issue where I have a string that is types out followed by another command. In this case ENTER
.
What happens is it types out ENTER instead of pressing the enter key.
It only types out: https://grabify.link/8ESENTER
Where it should be typing out https://grabify.link/8ESCC1
This is the code:
DEFAULTDELAY 200
GUI r
STRING https://grabify.link/8ESCC1
ENTER
But splitting them onto 2 lines solves the issue e.g
DEFAULTDELAY 100
GUI r
STRING https://grabify.link/
STRING 8ESCC1
ENTER
Hello,
I just received this today. I flashed the updated version. I tried to run a short script that checked the devices IP and it was having troubles. It would randomly open desktop shortcuts or only print 1/3rd of the string.
This is the script I used:
WINDOWS r
STRING powershell
ENTER
STRING ipconfig
ENTER
Thanks so much,
N.H
I know that the Attiny85 has little memory space, but he can emulates a keyboard as well as the Arduino Leonardo, so could be possible to run in it?
Thanks and sorry for the bad English.
https://raw.githubusercontent.com/spacehuhn/hardware/master/wifiduck/package_wifiduck_index.json
Internet connection failed
Cant set a SSID or a password with a space in it.
I have found and fixed this issue. Will create a PR soon
When I upload the code "esp_duck.ino" from the Arduino IDE I get an error
I have installed all the libaries installed including the one for ESP8266 (Im using the NodeMCU)
I open de folder and left it as it was and tried to upload it but it gave me the error
Here is the copy of the error :
(some parts are in spanish but i think they are not very imprtant)
Arduino:1.8.10 (Windows 10), Tarjeta:"NodeMCU 1.0 (ESP-12E Module), 80 MHz, Flash, Disabled, All SSL ciphers (most compatible), 4M (3M SPIFFS), v2 Lower Memory, Disabled, None, Only Sketch, 115200"
El Sketch usa 413040 bytes (39%) del espacio de almacenamiento de programa. El máximo es 1044464 bytes.
Las variables Globales usan 32104 bytes (39%) de la memoria dinámica, dejando 49816 bytes para las variables locales. El máximo es 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM6
Connecting........_____....._____....._____....._____....._____....._____.....____Traceback (most recent call last):
File "C:\Users\j_mor\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.5.2/tools/upload.py", line 25, in <module>
esptool.main(fakeargs)
File "C:/Users/j_mor/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 2653, in main
esp.connect(args.before)
File "C:/Users/j_mor/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.5.2/tools/esptool\esptool.py", line 468, in connect
raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
I m using the Arduino IDE
Describe the error
After connecting to the duck there is a yellow bar at the top saying that there is an internal connection problem. There is no output to the serial monitor and I can't type anything using the duck
Environment:
Attempts
I have tried connecting to the serial monitor without success and I have checked all the solder connections which are fine
Does anyone have any idea what the issue might be?
Error:
I bought a fresh DSTIKE WiFi Duck, plugged it in, followed the basic instructions to connect to its network, change the SSID and password, and writing a script. Whenever I load the main page, an "Internal Connection Problem" banner appears at the top of the screen. I then attempted to run the following script, but it did not execute:
REM Hello World
DEFAULTDELAY 200
GUI SPACE
STRING terminal
ENTER
STRING ls
Despite these two issues, the following script will execute properly (though the internal connection problem banner remains):
STRING test
Environment:
Attempts:
I tried updating to the latest firmware, but was prevented from flashing to the ATMEGA due to an error:
Arduino: 1.8.10 (Mac OS X), Board: "DSTIKE WiFi Duck (ATmega32u4), Arduino Leonardo, Serial (115200b, newline)"
Sketch uses 14384 bytes (50%) of program storage space. Maximum is 28672 bytes.
Global variables use 1765 bytes (68%) of dynamic memory, leaving 795 bytes for local variables. Maximum is 2560 bytes.
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_drain(): read error: Device not configured
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = ""; type = �
Software Version = �.�; Hardware Version = �.�
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: ser_send(): write error: Device not configured
avrdude: ser_recv(): read error: Device not configured
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: ser_close(): can't reset attributes for device: Device not configured
the selected serial port avrdude: ser_close(): can't reset attributes for device: Device not configured
does not exist or your board is not connected
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I just followed the directions given. ATMEGA flashed fine. COM is there.
Expected behavior
Honestly, after ATMEGA flashed perfectly fine I expect this to work.
Executable segment sizes:
IROM : 386384 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 28600 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1316 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 3920 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 26664 ) - zeroed variables (global, static) in RAM/HEAP
Sketch uses 420220 bytes (40%) of program storage space. Maximum is 1044464 bytes.
Global variables use 31900 bytes (38%) of dynamic memory, leaving 50020 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.8
Serial port COM11
Connecting...
Traceback (most recent call last):
File "C:\Users\didymus\Documents\ArduinoData\packages\wifiduck\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
esptool.main(cmdline)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2890, in main
esp.connect(args.before)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 475, in connect
last_error = self._connect_attempt(mode=mode, esp32r0_delay=False)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 455, in _connect_attempt
self.sync()
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 394, in sync
timeout=SYNC_TIMEOUT)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 337, in command
self.write(pkt)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 300, in write
self._port.write(buf)
File "C:/Users/didymus/Documents/ArduinoData/packages/wifiduck/hardware/esp8266/2.6.3/tools/pyserial\serial\serialwin32.py", line 323, in write
raise writeTimeoutError
serial.serialutil.SerialTimeoutException: Write timeout
the selected serial port serial.serialutil.SerialTimeoutException: Write timeout
does not exist or your board is not connected
Environment (please complete the following information):
Attempts
Generic ESP8266
instead of Node MCU ESP-12E
(which it is)Additional context
I went on the 8266 forum and maybe the module itself is bad? I'm not sure. This is the first Arduino thing I've messed with.
Maybe there is supposed to be some timeout specified in the code that ArduinoIDE looks for? I will look into this further after an unrelated appointment I have in a few minutes.
Hello, Bit of a shot in the dark
When creating a file in serial with debug enabled using the commands (create example.duck) then (write example.txt "STRING Hello World!") it creates the file perfectly and reports success!
When I then run that file form serial ie (run "example.txt") the first HID output is correct i get "Hello world" but the following run requests from serial output over HID as "STRING Hello World" until the esp is reset and it will run correctly once more until another reset!
I have come in to this issue after adding mqtt to cli and using mqtt to create/remove/run scripts - it works great the first time round the following runs always include the "STRING" prefix until the esp is reset again
I just wanted to know if this is something that's been designed as a feature as I am using it in debug mode and if so is there a way i can work around it.
if I create the file in the webui I can run it from serial just fine as many times as i want its just when running a file created in the serial console that only works without including the word STRING in the output once.
I did double check and found this is also true in the current build of wifi ducky! Im happy to share my mqtt version with you if any of this sounds interesting!
it uses wifi manager connects to a mqtt server and waits for a payload however can only be used once before a reboot :D
hello im very new to esp boards, i have a 5v arduino pro micro and a bare esp12e, how can i connect them
We need a way to automatically increment the version number so we know what version we are using. I suggest using the Git Commit ID as it will be quite easy to do with that
Error:
Hi, I've built a DIY Malduino W with a "USB Tipe-C Nano SAMD21 48MHZ Cortex M0 32 Bit Microcontroller" and "WeMos D1 Mini Pro V3.0 NodeMcu 4MB/16MB byte".
I followed a guide on youtube (by Seytonic) about it, sadly in the video they used a "Adafruit Trinket M0", but on the description it was said i could use the one I'm currently using.
Anyways I managed to solder the pins needed for it to work and I was able to connect to the Malduino W connection and to see the Script page.
Once there there is a issue Running scripts, I know that there are only some keyboards supported and I was using the US layout so i used "LOCALE US" in the script. To test it I also added a line of script that was going to open the "Run" program.
After I saved the script and ran it nothing happened, I tried others scripts, and also to restart the pc but nothing.
On screen i can see the website letting me know that the Script is running so I don't know what could be the problem.
Yes, I've made sure all the pins are on the right spot and well soldered.
Now I'll try to see if the pins need some adjustments, but I doubt it.
I'm available for any question or suggestions.
Thank you very much
I know you haven't worked on this project for a while but if you start making updates again you could add a Backup-Function (Downloading all Scripts with one click)
Is the new WifiDuck firmware compatible with WHID Cactus? Is there any tutorial on how to flash it in WHID? All I can find is flashing the old Wifi_ducky tutorials on the web. I had to buy WHID just because of the unavailability of Wifi Duck in my region.
Please search for existing (open and closed) issues to avoid duplicates.
I recently bought a Cactus WHID and when I checked the Github for it, it stated that the device has support for the original Wifi Ducky project. So I was wondering if this worked with this one too.
It would be awesome to add the functionality to be able to change the device type/PID live without needing to re program it with arduino studio.
I have a few ideas on how this can be done.
Please search for existing (open and closed) issues to avoid duplicates.
Hi,
I remember setting the ATmega32u4 board to mimic some Logitech keyboard.
But searching the source code for the word logitech
doesn't return anything, so where is the struct and data containing information about vendor ID and stuff like that?
I am curious because in my fork, I'd like to implement more vendors and mice also.
Thanks.
Thinking it would be cool to choose a script to auto run when the duck is inserted. This could be user configurable from the interface or potentaully with the dip switches on device itself. this way we can execute quick attacks without needing to wait for it to boot and connect via WiFi.
Merry Christmas!
I just got a new chinese PCB called the CJMCU-32 12 that has the ESP module, AtMega and sdcard slot all in one pcb. I tried flashing it with your old version using a tutorial linked here , and it worked well. I first flashed the AtMega with the ESP programmer, bridged the pads (as the tutorial says) and got your old wifi_ducky repo to work on it. I try the same steps but this time using an esp bin file from the new repo WIFI DUCK, and flashed the new AtMega firmware, and I just think its incompatible. Is there a way this board could work? Its a nice pcb, and I'd like to take advantage of the new features of the new repo. I have the pinout linked, I think it doesnt work due to the way payloads are communicated between the esp and atmega modules.
Could you please give me the code where I can use an RGB LED instead of Neopixel LED?
recipe.preproc.macros pattern is missing
Error compiling for board NodeMCU 1.0 (ESP-12E Module).
I study it about one years and have tried many version or applicaiton.
what i matter most is that, whether the wifiducky can send and receive data between target and host pc.
Can you solve it ????Attention, with no network else, just esp8266.
Nearly, most of wifiducky of github just could send commands from host to target, but it cannot download datas or files from target pc, just lile nc to nc ,ftp to ftp, c&c, even meterpreter of kali.
Now, what i do is as follows, under c/s model, plant a client.exe on the target, and communicate with it via server.exe on attact host. I finish it.
With no network else, do you have other way to communication (send and receive)???
Hello. I'd like to add a russian layout to your amazing project. I have wrote file locale_ru.h and made all needed changes as you explain. But instead russian word, for example, "мама" (mother in english) I see word "fVfFfVfF". Letters V and F on russian layout is in place of russian letters м and а, but why they are in english and what means a small letter f before each of them?
I have attached my file, but Githab have wanted me to change extention to .txt. Initially it was .h.
I buyed the preflashed wifiduck on tindie. So i puged it in and connected to the wifi. It seams to be fine the site comes up i can see the main page, terminal, settings. But anytime i click on the run or save button nothing happens. See in the screenshot there is no request send to the ducky. So i tried to add a file on the web-terminal. There i can see the output of the other commands but either not able to crate a new file.
The error is
invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
This is the log
sketch\cli.cpp: In lambda function:
sketch\cli.cpp:112:29: warning: passing NULL to non-pointer argument 1 of 'String::String(int, unsigned char)' [-Wconversion-null]
String s { NULL };
^
sketch\spiffs.cpp: In function 'void spiffs::write(String, const char*)':
spiffs.cpp:109:24: error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
f.write(str);
^
In file included from sketch\spiffs.h:10:0,
from sketch\spiffs.cpp:7:
C:\Users\gilla\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/FS.h:54:12: error: initializing argument 1 of 'virtual size_t fs::File::write(uint8_t)' [-fpermissive]
size_t write(uint8_t) override;
^
sketch\spiffs.cpp: In function 'void spiffs::streamWrite(const char*, size_t)':
spiffs.cpp:153:50: error: invalid conversion from 'const char*' to 'const uint8_t* {aka const unsigned char*}' [-fpermissive]
if (streamFile) streamFile.write(buf, len);
^
In file included from sketch\spiffs.h:10:0,
from sketch\spiffs.cpp:7:
C:\Users\gilla\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.0.0\cores\esp8266/FS.h:55:12: error: initializing argument 1 of 'virtual size_t fs::File::write(const uint8_t*, size_t)' [-fpermissive]
size_t write(const uint8_t *buf, size_t size) override;
^
exit status 1
invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
Just received a pre-built version of the WiFiDuck from Travis Lin. When connected, it seems to work and allows association to the wifiduck hotstop, nonetheless when trying to execute any script, pressing the run button or enabling the auto-run feature, a yellow warning appears saying "Internal Connection Problem". As I said, this is a pre-built model and not the separate boards featured on other topics with the same error message. I tried to import an existing ducky script as well, which works perfectly on the Rubber Ducky, and it does not work on the WiFiDuck either.
I also tried re-flashing both parts of the firmware, but I was able to do just one of them. The other (atmega) does not respond, according to the instructions on the videos. It is not even recognized in the Arduino IDE interface as a valid port, which is strange, since it works and as I said, allows association to the default WiFiDuck hotspot.
When issuing the command "status" on the terminal window of the tool, it generates the same error. Any help would be appreciated. Tried on Windows, Mac and Linux without results.
Is there a way to run any diagnostics to rule out a hardware failure?
Thanks for your help.
I have the ATMEGA32U4 ESP8266, which has both the Microcontroller part and the WIFI part in a single board. How do I use these scripts in this case?
Do I need to follow the same steps?
EEPROM does not seem to be working as any setting I change are not saved
Hi, I have the WiFi ducky from dstike and was wondering how do I set the led colour?
It was wrote on readme that " Here's a map of the pins that need to be connected. " .
There are three connections(D1 to SCL, D2 to SDA, GND to GND).
========================
ESP8266 | Atmega32u4 |
---|---|
D1 alias GPIO 5 | 3 alias SCL |
D2 alias GPIO 4 | 2 alias SDA |
GND | GND |
=========================
but, the image below the table shows that there is another connection.(5v to RAW?)
https://github.com/SpacehuhnTech/WiFiDuck/blob/master/img/diy_example.jpg
I've already tried the former pattern(=the three connection), but the system didn't move.
Please tell me right connection of the electric circuit.
Not too long ago, I was able to download and install on the old wifi ducky library on a knock wifi usb:
https://www.amazon.com/gp/product/B07F8QJ7ZP/ref=ppx_yo_dt_b_asin_title_o01_s00?ie=UTF8&psc=1
It seems that this bad usb is wired using serial. Because of this, the old library work just fine. I have however had trouble installing this new library. It seems that whenever I upload all the new code, I always result in an Internal connection error. I believe this is something at fault with the arduino. Uncommenting the debug lines results in no serial output from the mega. Could someone please point me in the right direction in terms of what all the settings should be and how I can set it to use serial.
More info about bad USB:
Runs a MEGA32U4 and an ESP8266MOD
It is wired in a way where the old project runs just fine
Thank You for any help
Hey,
is it possible to use the .bin upload feature of the original WifiDucky to upload the new WifiDuck bin to the ESP without having to unsolder everything?
Cheers,
craftycram
Please add LOCALE IT
Fixed by uploading files to the device.
I don't know if the issue is on my end, but when I add the repeat function to my scripts, it doesn't repeat the script, instead it displays the "running /(script name)" message until the script get's manually stopped.
SSID, password and channel won't save.
This I think is either 2 thing. It's not saving the eeprom or the front end is not passing it through correctly. I'll investigate and push a fix through
It gives an i2c connection problem when I run a script with this line
STRING msedge https://youtube.com
When that error came I can't run scripts until I replug the board.
Hi big boss,
since precompiled .bin v1.0.0 release, you've made several updates to the sources.
https://github.com/SpacehuhnTech/WiFiDuck/releases
i read that 43 changes have been made, would you like to re-run the sources and publish a .bin v1.0.1?
so we can upgrade easily directly from the web interface ♥
I have an ATmega32u4 Arduino Pro Micro and ESP8266 12-E Modules (NodeMCU 1.0). ** I dont have any LED :)
I connected them on breadbord just like your Tutorial (with wire jumps)
I flashed the software, everything is fine but when I connect to the Esp interface to run the scripts it appears Internal Connection Problem
Can you guys give me any suggestion on what to do?
Thanks :)
Link com vídeo do problema: https://photos.app.goo.gl/LaXWtYSDqBmR7ikp6
Estou usando a seguinte conexão: https://photos.app.goo.gl/Uw55MrXU4AacEBag6
Placa selecionada para o ESP8266: https://photos.app.goo.gl/Uw55MrXU4AacEBag6
Placa selecionada para o atmega: https://photos.app.goo.gl/99vVTME4REXJDH197
Foto adicional: https://photos.app.goo.gl/Nt5YKK93Em7dJTC38
A seguinte mensagem aparece quando tento executar um script pelo webserver: "Internal Connection Problem"
Alguém sabe no que estou errando?
Hello, I bought a generic rubber ducky board a long time ago and noticed there was an updated version of the Wifi duck project(this repository), but i didnt read enough so I proceeded to flash it without noticing that the new code comunicates the ESP8266 with the 32u4 via i2c and not via serial like the older code.
Is there any chance of serial support for older boards?
I am very impressed by the DIY Wi-Fi Duck project, but I am not able to know whether to insert the ESP8266 board of the Arduino Pro Micro board to the victim's PC?
Also, can you please tell on how to control the victim's pc after connecting either the ESP board or the other one.
How long should I keep it connected to the victim's pc and how to control it remotely?
It would be really helpful if you answered mu questin and cleared my doubts.
Best regards,
A Wifi Rubber Ducky
Please search for existing (open and closed) issues to avoid duplicates.
I have a wifi cactus WHID which is running ESPloitV2. so, how do I install wifi duck in that
In my use case i would prefer the WiFi duck connect to my home WiFi instead of creating a WiFi that devices connect to. I have setup the ESP8266 to connect to my WiFi to host a web page, but would not have the skill set to get the WiFi duck to do it.
Thoughts.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.