In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to use Digispark and Duck2Spark to create a cheap USB rubber duck. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
USB Rubber Duck is a keystroke injection tool disguised as a flash drive. When plugged into the computer's USB interface, the computer recognizes it as a regular keyboard and automatically accepts its preprogrammed keystroke payload at a rate of more than 1000 words per minute. With only a few seconds of physical access, some advanced penetration testing attacks or IT automation tasks can be easily deployed on the target computer. In addition, Rubber Ducky also has some parody features, such as scripts that quickly change the wallpaper of a colleague's workstation. Although the function is powerful, it has no advantage in terms of price. At present, the official price is $45, plus freight, which is not cheap.
Step 1: set up the Digispark development environment
Before we can start using the board, we must install Arduino IDE. After that, we also need to download the compatibility package of the board, which is very simple:
Https://www.arduino.cc/en/main/software
When the installation is complete, open the Arduino IDE application, select File-> Preferences, and enter the following URL in the input box named "Additional Boards Manager URL".
Http://digistump.com/package_digistump_index.json
Open Arduino IDE-- Preferences Tools-- > Board-> Boards Manager, select "Contributed" from the drop-down menu, select the Digistump AVR Boards package and install it.
Now, we need to install the Digispark Bootloader driver.
Https://github.com/digistump/DigistumpArduino/releases/download/1.6.7/Digistump.Drivers.zip
In general, there are problems with the driver installation process. Therefore, make sure that the driver is installed correctly.
Finally, open Tools-> Board, then select Digispark (Default - 16.5mhz) and set it to the default value.
Step 2: clone the Rubber Ducky script
Rubber Ducky uses a simple scripting language to create payloads. For Digispark, it is much more complicated. We need to write our own payloads using Digikeyboard.h and Arduino IDE. Some scripts that can be used for Digispark ATTiny85 can also be found online, but they can't meet the needs of our daily tasks.
Here, first of all, I would like to thank my friend MaMe82 (Marcus Mengs) for creating a duck2spark project that converts Rubber Ducky scripts to Digispark:
Https://github.com/mame82/duck2spark
One of the great features of Duck2spark is that it supports non-American keyboard layouts. This function is mainly realized by DuckEncoder, which supports a variety of keyboard layouts.
Duck2spark is also very easy to use. Here is a classic example of hello world:
Generate a DuckyScript test.duck you want to use as output:echo "STRING Hello World" > test.duckCompile the script using DuckEncoder with your keyboard layout (de in example) or use my python port:java-jar encoder.jar-I test.duck-o raw.bin-l deUse duck2spark.py to convert into Arduino Sketch (options for single run, 2 seconds startup delay): duck2spark.py-I raw.bin-l 1-f 2000-o sketch.inoAfter setting up the Arduino IDE load the example "DigisparkKeyboard" and replace the Sketch source by the one saved to sketch.ino
Click Sketch-> Upload or click the Upload button in the upper left corner. Open your notepad. Insert Digispark USB again and we will see the automatic input of "Hello World" on the screen.
You can also create Rubber Ducky Payloads for other uses, depending on your purpose and intention. For example, you can create wireless network associations, download and execute payloads, reverse shell, etc. When doing penetration testing, we can even use powershell payloads such as Meterpreter,Empire,Unicorn:
Https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads
Finally, you can use some heat-shrinkable tubes to provide electrical insulation, mechanical protection, sealing and concealment for your Digispark-Ducky.
Thank you for reading! This is the end of the article on "how to use Digispark and Duck2Spark to create a cheap USB rubber duck". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.