Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/ATTACKMODE/ATTACKMODE-example1.txt
2968 views
1
REM The ATTACKMODE command may be used multiple times throughout a payload.
2
REM Changing the attack mode will cause the target to re-enumerate the device.
3
4
ATTACKMODE HID
5
DELAY 2000
6
STRINGLN The USB Rubber Ducky is functioning as a keyboard.
7
STRINGLN It will function as a flash drive for the next 30 seconds.
8
ATTACKMODE STORAGE
9
DELAY 30000
10
ATTACKMODE HID
11
DELAY 2000
12
STRINGLN Now the USB Rubber Ducky is back to functioning as only a keyboard.
13
STRINGLN For the next 30 seconds it will function as both keyboard and storage.
14
ATTACKMODE HID STORAGE
15
DELAY 30000
16
STRINGLN Now the USB Rubber Ducky will disable itself.
17
ATTACKMODE OFF
18
19
REM This payload will begin by enumerating as a HID keyboard.
20
REM The USB Rubber Ducky will then enumerate as a mass storage "flash drive" for 30 seconds.
21
REM Once more it will be enumerated as only a HID keyboard.
22
REM Next it will enumerate as both a HID keyboard and a mass storage "flash drive".
23
REM Finally, the device will seem to be disconnected.
24