flipperdevices / flipperzero-firmware

Flipper Zero firmware source code
https://flipperzero.one
GNU General Public License v3.0
11.76k stars 2.6k forks source link

Feature Request: "Twin Duck" usb rubber ducky emulation #1040

Open Patronics opened 2 years ago

Patronics commented 2 years ago

Many of the sample badusb scripts from Hak5 use the "Twin Duck" firmware, emulating a USB drive in addition to a keyboard input. This would add a lot more flexibility to the BadUSB feature.

MuddledBox commented 2 years ago

This has been requested a bit in the Discord.

Currently the SD card in the Flipper Zero is not recognized as a mass storage device by Windows. That would probably be a good step one before implementing this feature.

skotopes commented 2 years ago

Theoretically possible. But going to be suuuuuuper slow. We'll keep this thing in backlog, but don't expect it be implemented anytime soon.

Lucaslhm commented 2 years ago

1+ to this. This is an important feature on the ducky and bash bunny that allows you to quickly download payloads off the usb onto the target machines, or take data off the target machine and store it on the drive, negating the need for internet.

Hope to see this implemented at some point!

Woodie4 commented 1 year ago

+1 This would be amazing... I really hope this will get implemented

TotallyNotSethP commented 1 year ago

DuckyScript 3.0 transfers data by flashing the CapsLock and NumLock LEDs, meaning the OS wouldn't have to use the card as mass storage at all. Maybe you could implement it that way?

nuschpl commented 1 year ago

IMHO The feature of masstorge is important not only from perspective of copying data from/to it. It is also some form of cover channel - one could delay execution of ducky script and pretend it's just a storage, or have an excuse when catched with device connected

PeterHindes commented 1 year ago

This is a much needed feature for full badusb functionality. The current level of functionality can be achieved with a $5 arduino.

skotopes commented 1 year ago

Storage subsystem went throw a bunch of optimization. Now we can say that there is nothing else we can do to improve it any more.

We still don't think that current performance is enough for normal work of twin ducky, but community can try to implement it. Could work for some cases.

nuschpl commented 1 year ago

IMHO we shouldn't directly access Flipper SD card for "Twin Duck" mass storage purposes for Flipperr operator's own safety. IMHO we should emulate mass storage on some buffer with very limited size suitable for moving config files/powershell scripts back and forth. Then the buffer could be synced with flipper SDcard. Or what's about Flipper internal storage - is 100% occupied by firmware those days ?

calcdot commented 8 months ago

While looking for this functionality i have came across this - https://github.com/emptythevoid/flipperzero/blob/main/badusb/save_to_flipper_poc/save_to_flipper_fast.txt Caveats being, you need to exit bad usb in order for script to use COM port and reveal flipper zero VID/PID to AV/EDR. Speeds seem to be enough for sending/receiving payloads/stdout/similar without issues.

Hope to see "Twin Duck" implemented either trough COM port or Mass Storage due to so many benefits it offers -

  1. Works in air gaped environments.
  2. Produces way less noise especially network indicators.
  3. Can be faster and simpler to deploy/execute scripts.
  4. While speed is an issue, it does not prevent us to implement tone of features that rely on small amount of data transfer.

PS, i have taken a look into source code of bad_usb.fap (and similar apps) however, sadly i dont have enough coding experience in C in order to develop this feature.