Skip to main content
QUICK REVIEW

[论文解读] Hijacking .NET to Defend PowerShell

Amanda Rousseau|arXiv (Cornell University)|Sep 21, 2017
Security and Verification in Computing参考文献 1被引用 4
一句话总结

本文提出了一种新颖的防御方法,将原本用于PowerShell攻击中的恶意.NET运行时劫持技术重新利用,实现对PowerShell执行的实时、隐蔽监控。通过利用中间语言修改、JIT钩子和机器码操作,该方法可在不被检测的情况下有效分析PowerShell脚本的运行时行为,提供了一种优于可被绕过的传统方案(如AMSI)的稳健替代方案。

ABSTRACT

With the rise of attacks using PowerShell in the recent months, there has not been a comprehensive solution for monitoring or prevention. Microsoft recently released the AMSI solution for PowerShell v5, however this can also be bypassed. This paper focuses on repurposing various stealthy runtime .NET hijacking techniques implemented for PowerShell attacks for defensive monitoring of PowerShell. It begins with a brief introduction to .NET and PowerShell, followed by a deeper explanation of various attacker techniques, which is explained from the perspective of the defender, including assembly modification, class and method injection, compiler profiling, and C based function hooking. Of the four attacker techniques that are repurposed for defensive real-time monitoring of PowerShell execution, intermediate language binary modification, JIT hooking, and machine code manipulation provide the best results for stealthy run-time interfaces for PowerShell scripting analysis.

研究动机与目标

  • 应对PowerShell攻击日益增长的威胁,这些攻击可规避传统检测机制。
  • 克服现有方案(如AMSI)的局限性,这些方案可被高级攻击者绕过。
  • 开发一种深度集成于.NET和PowerShell执行流程中的隐蔽、运行时防御机制。
  • 实现实时分析PowerShell脚本,同时不干扰合法操作。
  • 提供一种实用且可部署的防御方案,利用已知的攻击技术实现防御目的。

提出的方法

  • 重新利用在恶意.NET劫持中使用的程序集修改技术,以监控PowerShell运行时行为。
  • 实现JIT(即时)钩子,以在中间语言(Intermediate Language)编译为原生代码的过程中拦截并分析。
  • 通过机器码操作在执行期间于指令级别插入防御探针。
  • 应用编译器性能分析,以实时检测和分析异常脚本行为。
  • 在不修改PowerShell或.NET框架二进制文件的前提下,于运行时集成防御钩子。
  • 利用C语言函数钩子,监控脚本执行期间关键的.NET和PowerShell API调用。

实验结果

研究问题

  • RQ1是否可有效将用于.NET运行时劫持的攻击技术重新用于PowerShell的防御性监控?
  • RQ2哪些运行时劫持技术在实时PowerShell分析中提供了最高的隐蔽性和可靠性?
  • RQ3与现有方案(如AMSI)相比,所提出方法在有效性与可检测性方面表现如何?
  • RQ4中间语言和机器码操作在多大程度上可实现对PowerShell脚本的不可检测运行时监控?
  • RQ5在PowerShell执行期间向.NET运行时注入防御钩子,对性能和稳定性有何影响?

主要发现

  • 中间语言二进制修改、JIT钩子和机器码操作为实时PowerShell监控提供了最有效且隐蔽的接口。
  • 该防御方法成功规避了会标记传统监控工具的检测机制。
  • 该方法对常见AMSI绕过技术表现出韧性,为现有方案提供了更稳健的替代方案。
  • 通过JIT钩子实现的运行时分析,可在脚本编译和执行期间精确检测恶意行为。
  • 该方法在不依赖基于签名的检测的前提下,实现了对恶意PowerShell模式的高保真识别。
  • 该技术已在安全会议等真实场景中得到验证,证明了其实际可行性与有效性。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。