查看: 2945|回复: 2
收起左侧

[其他事项] (搬运)EMET 3.5技术预览利用安全缓解的BlueHat奖

[复制链接]
ljia885
发表于 2012-11-13 23:59:52 | 显示全部楼层 |阅读模式
EMET 3.5 Tech Preview leverages security mitigations from the BlueHat Prize

swiat 24 Jul 2012 4:45 PM
Last year at Black Hat Las Vegas, we announced the BlueHat Prize contest – a large cash prize awarded for defensive security research. One month ago, we announced the names of three finalists. On Thursday night shortly after 10 PM, at the Microsoft Researcher Appreciation Party, we will unveil which finalist won which prize – the grand prize of $200,000 USD, the second prize of $50,000 USD, and the third prize of an MSDN subscription, valued at $10,000 USD. We are excited to reveal this to the finalists and to the world live at the same time.

Having said that, each of these winning submissions demonstrated creative ways that help increase the difficulty of exploiting memory safety style vulnerabilities, allowing for arbitrary code execution. We wanted to put these novel ideas to work right away to help protect customers. To that end, today we are announcing that a new version of EMET incorporates several ideas from one of the contest finalists and is available for immediate download: EMET 3.5 Tech Preview.

In this blog post we are going to take a look at the new updates and mitigations that are implemented in EMET 3.5 Tech Preview. Please note this is a “tech preview” release intended to evaluate the application compatibility risk of several mitigation ideas in real-world scenarios. EMET 3.0 is ready for wide-spread enterprise adoption. EMET 3.5 Tech Preview is available to help us field test these new ideas in real-world environments.

In this release, we implemented four ROP mitigations that we selected from the BlueHat Prize submissions.

The new ROP mitigations

We have implemented four new ROP mitigations in this tech preview version. Some of the mitigations we received in the BlueHat submission were not original (please see the following section) but can provide protection against many current exploits. The “Execution flow simulation mitigation” (described below) was the main novel contribution in this submission.

Previous work on ROP mitigations

Some of the mitigations we implemented have already been addressed by the security community. For example, Piotr Bania wrote a nice paper about ROP mitigations which can be found here: http://kryptoslogic.com/download/ROP_Whitepaper.pdf

Mitigations description

The ROP mitigations rely on the fact that at some point the ROP chain will need to call certain critical functions (VirtualAlloc, VirtualProtect, HeapCreate, LoadLibrary, etc…) before they transfer execution to the shellcode. EMET will filter all calls to those critical functions and perform the following checks:

Caller checks mitigation

EMET will make sure that when a critical function is reached, it is reached via a “call” instruction rather than a “ret” instruction. This is a very useful mitigation and breaks many ROP gadgets. This mitigation may be incompatible with some programs so use it with caution.

Execution flow simulation mitigation

This mitigation tries to detect ROP gadgets following a call to a critical function. It works by emulating a specified number of instructions at the return address of the caller of a critical function. The number of instructions to emulate can be configured manually by editing the desired application’s registry key and creating the “SimExecFlowCount” DWORD value as shown below:



By default, 15 instructions are simulated. Like the “Caller checks”, this mitigation may not be compatible with all programs.

Stack pivot mitigation

This mitigation is very useful and is used to detect if the stack has been pivoted. It is compatible with most programs, so it is safe to enable it by default.

Special function checks

The special function checks mitigation is split into:

Load library checks
Memory protection checks


The former validates calls to load library to see if it comes from a ROP gadget or shellcode, while the latter aims at preventing any attempts to change the protection of stack area for a given thread.

Changes in the user interface

Because the total number of mitigations in EMET grew and do not nicely fit in one screen anymore, we decided to group the mitigations into tabs. The screenshot below shows the new ROP mitigations:



We also added a context menu item in the notifier tray icon that allows you to easily launch EMET graphical interface:




Enabling the ROP mitigations

The ROP mitigations are disabled by default, you have to explicitly enable them. It is possible to import a preconfigured set of applications from the “Application Configuration” dialog:





Select File/Import and then navigate to “[EMET_Install_Folder]\Deployment\Protection Profiles” and choose “All.xml”. To enable certain ROP mitigations for all applications, just edit the “DefaultConfig/Mitigations” node and set the desired ROP mitigations to “true”:



When a ROP attempt is detected, EMET will show you a tooltip and create an event log entry:



Additionally, in this tech preview version, EMET will display a message box with more details about the detected ROP attempt and will present you with a choice to continue (ignoring the ROP checks) or terminate the process. We present the user with this dialog so that if a false positive was detected EMET won’t terminate your application immediately. The confirmation dialog looks like this:



ROP mitigations in action

We tested EMT 3.5 against a bunch of public ROP exploits. The following screenshot shows how EMET 3.5 TP mitigates against Metasploit’s ms12_037_same_id :



Here we see how EMET blocks CVE-2010-0188 (LibTIFF):



A Note about Application Compatibility

Security mitigations carry an application compatibility risk with them. Some applications rely on precisely the behavior that the mitigations block. For this reason mitigations are typically turned off by default and require opt-in from a developer before they are enabled. While EMET allows users to override this, it is important to be aware of the risk. EMET is intended for tech savvy users such as IT professionals and security researchers who can troubleshoot issues that these mitigations may introduce. We also recommend testing your applications and use scenarios with these mitigations prior to deploying them on any production systems.

Known limitations

As stated above, as long as one of the critical functions is called then ROP checks will take place. It is possible for the attacker to circumvent this by not calling any of the hooked functions (for example directly calling into NTDLL and not kernel32) or just circumventing the hook. The following Phrack article presents many attack vectors that can be used to break those mitigations: 5   http://www.phrack.org/issues.html?issue=62&id=5

Feedback

EMET 3.5 TP requires uninstalling previous versions of EMET first. Previously configured applications and rules will be retained and will work again after installing EMET 3.5 TP.

We encourage you to download and try out this release. Any feedback or comments are welcome; you can reach us at switech@microsoft.com.

Acknowledgements

I would like to thank the MSRC engineering and the science team, in particular: Chengyun Chu, Suha Can, Elia Florio.

Elias Bachaalany, MSRC Engineering

(via Security Research & Defense

评分

参与人数 1经验 +10 收起 理由
飞霜流华 + 10 感谢提供分享

查看全部评分

ljia885
 楼主| 发表于 2012-11-14 00:00:57 | 显示全部楼层
(google翻译)(http://blogs.technet.com/b/srd/a ... -bluehat-prize.aspx
去年在拉斯维加斯黑帽,我们宣布的BlueHat奖大赛 -防御性的安全研究的大量现金奖。一个月前,我们宣布了三位决赛选手的名字。晚上约十时在星期四晚上,在微软研究员欣赏党,我们将揭开其中进入决赛赢得奖金-在盛大的奖金$ 20万美元,的第二个奖金为50,000美元,和的第三个奖的MSDN订阅,价值$ 10,000美元。我们很高兴能透露的候选人,并在世界上生活在相同的时间。

说,每一个这些获胜提交的证明创造性的方式帮助提高利用存储安全性风格的漏洞的难度,允许任意代码执行。我们希望把这些新奇的想法,工作的权利,以保护客户的利益。为此,今天我们宣布一个新的版本的EMET采用一些想法,从入围竞赛之一是:立即下载EMET 3.5技术预览。

在这篇博客文章中,我们将看一看EMET 3.5技术预览版中实现的新的更新和缓解。请注意,这是一个“技术预览版”的发布旨在评估应用程序兼容性的风险缓解的想法在现实世界的场景。EMET 3.0是为广泛的企业采用。EMET 3.5技术预览版,是可以帮助我们实地测试这些新的想法在现实世界环境中。

在此版本中,我们实施了4个ROP的缓解,我们选择从提交的BlueHat奖。

新的ROP缓解措施

我们已经实施了四个新的ROP缓解的这个技术预览版本。我们收到的BlueHat提交的缓解而不是原来的(请参阅下面的部分),但可以提供保护,防止目前许多战功。“执行流程模拟缓解”(见下文)在此提交新的贡献。

以前的工作ROP的缓解

我们实施的缓解已经解决的安全社区。例如,彼得·巴尼亚写了一个很好的一篇关于ROP的缓解,可以在这里找到:http://kryptoslogic.com/download/ROP_Whitepaper.pdf

缓解描述

早产儿视网膜病变的缓解依赖的事实ROP链,在某些时候,需要调用某些关键功能(VirtualAlloc的,VirtualProtect,HeapCreate调用LoadLibrary,等等)之前,他们将执行的shellcode。EMET会过滤所有的这些关键功能的调用,并执行下列检查:

来电检查缓解

EMET将确保,当达到一个关键的功能,达到通过“呼叫”指令,而不是一个“ret”指令。这是一个非常有用的缓解和打破许多ROP小工具。缓解可能与一些计划,以便谨慎使用。

执行流程模拟缓解

这缓解尝试检测ROP小工具,调用一个关键的功能。它的工作原理是模拟指定数量的指令在一个关键的功能的调用者的返回地址。的指令数来模拟,可以手动配置,编辑所需的应用程序的注册表项和创造了“SimExecFlowCount的”DWORD值,如下所示:



默认情况下,,15条指令模拟的。“来电检查”一样,这种缓解可能不兼容的所有程序。

堆栈枢纽缓解

缓解是非常有用的,是用来检测堆栈已被旋转。这是与大多数程序兼容,所以它是安全的,它在默认情况下启用。

特殊功能检查

特殊功能检查,减轻分为:

加载库检查
检查内存保护
前验证调用加载库,看它是否来自一个ROP小工具或shellcode的,而后者旨在防止任何企图改变给定线程的堆栈保护区。

在用户界面中的变化

由于EMET缓解的总人数的增长并不能很好地适应在一个屏幕上了,我们决定到标签分组的缓解。下面的截图显示了新的ROP缓解措施:



我们还增加了上下文菜单项的通知托盘图标,让您轻松地启动EMET的图形界面:





启用ROP的缓解措施

早产儿视网膜病变的缓解默认情况下禁用,你必须明确启用它们。从“应用程序配置”对话框中,可以导入一个预配置的应用:





选择“文件/导入”,然后定位到“[EMET_Install_Folder] \部署\保护配置文件”和选择“All.xml”。为了使一定的ROP减轻的所有应用程序,只需编辑的“DefaultConfig /缓解”节点,然后设置为“true”所需的ROP的缓解:



当检测到一个ROP尝试,EMET将显示一个工具提示,并创建一个事件日志条目:



此外,在这个技术预览版本,EMET会显示一个消息框,更详细的检测到的ROP尝试,将为您呈现一个选择继续(忽略的早产儿视网膜病变检查)或终止该进程。我们呈现给用户使用此对话框,因此,如果假阳性的检测EMET不会终止立即与您的应用程序。的确认对话框看起来是这样的:



早产儿视网膜病变的缓解行动

我们测试的3.5 EMT对公共ROP的攻击一堆。下面的屏幕截图显示了如何EMET 3.5 TP减轻对Metasploit工具的ms12_037_same_id:



在这里,我们看到了如何的EMET块CVE-2010-0188(的libtiff):



有关应用程序兼容性的一个注记

安全缓解与他们进行应用程序兼容性风险。有些应用程序依赖恰恰是行为的缓解块。出于这个原因的缓解通常是关闭默认情况下,需要选择从一个开发人员才启用。虽然EMET允许用户覆盖此,重要的是要注意的风险。EMET的目的是精通技术的用户,如IT专业人士和安全研究人员就可以解决的问题,这些缓解措施可能会推出。我们还建议测试您的应用程序和使用方案,这些缓解措施之前,他们在任何生产系统中部署。

已知的限制

如上所述,只要作为重要的功能之一,被称为ROP检查将采取地方。这是可能的攻击者可以绕过这个不调用任何的钩状的功能(例如直接调用NTDLL,而不是kernel32的)或规避钩的。以下Phrack的文章,提出了许多攻击的载体,可以被用来破坏这些缓解措施:http://www.phrack.org/issues.html?issue=62&id=5

反馈

EMET 3.5 TP需要卸载以前版本的EMET第一。在此之前配置的应用程序和规则将被保留,并会后,再次安装EMET 3.5 TP。

我们鼓励您下载并尝试此版本。任何反馈或意见,欢迎您可以达到我们switech@microsoft.com的。

致谢

我要感谢MSRC工程和科学的团队,特别是:李成云楚,苏哈灿,埃利亚弗洛里奥。

埃利亚斯Bachaalany,MSRC工程
UDady
发表于 2012-11-14 11:25:29 | 显示全部楼层
不错,折腾必备
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-11-24 19:30 , Processed in 0.123995 second(s), 17 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表