zoukankan      html  css  js  c++  java
  • 检测并移除WMI持久化后门

     
      WMI型后门只能由具有管理员权限的用户运行。WMI后门通常使用powershell编写的,可以直接从新的WMI属性中读取和执行后门代码,给代码加密。通过这种方式攻击者会在系统中安装一个持久性的后门,且不会在磁盘中留下任何文件。
      WMI型后门主要有两个特征:无文件和无进程。其基本原理是:将代码加密存储在WMI中,达到所谓的无文件;当设定的条件满足时,系统将自动启动powershell进程去执行后门程序,当后门程序执行后进程就会消失。
     
    检查WMI后门,CommandLineTemplate的内容就是程序要执行的命令。
    Get-WMIObject -Namespace rootSubscription -Class CommandLineEventConsumer -Filter "Name='Updater'"
     
    清除WMI后门的常用方法有:
    1.删除自动运行列表中的恶意WMI条目。
    2.在powershell中使用Get-WMIObject命令删除与WMI持久化相关的组件。
     
    WMI后门检测
    # Reviewing WMI Subscriptions using Get-WMIObject
    # Event Filter
    Get-WMIObject -Namespace rootSubscription -Class __EventFilter -Filter "Name='Updater'"
    # Event Consumer
    Get-WMIObject -Namespace rootSubscription -Class CommandLineEventConsumer -Filter "Name='Updater'"
    # Binding
    Get-WMIObject -Namespace rootSubscription -Class __FilterToConsumerBinding -Filter "__Path LIKE '%Updater%'"
     
    使用Remove-WMIObject命令来删除WMI持久性后门的所有组件。
    # Removing WMI Subscriptions using Remove-WMIObject
    # Event Filter
    Get-WMIObject -Namespace rootSubscription -Class __EventFilter -Filter "Name='Updater'" | Remove-WmiObject -Verbose
    # Event Consumer
    Get-WMIObject -Namespace rootSubscription -Class CommandLineEventConsumer -Filter "Name='Updater'" | Remove-WmiObject -Verbose
    # Binding
    Get-WMIObject -Namespace rootSubscription -Class __FilterToConsumerBinding -Filter "__Path LIKE '%Updater%'" | Remove-WmiObject -Verbose
     
    参考链接:
     
  • 相关阅读:
    net事件丢失解决方法
    Google排名经验谈
    动力漏洞
    Understand简明参考
    修复iReaper
    Bootstrap源码分析
    UTF8编码字节流错误小析
    OAuth2学习及DotNetOpenAuth部分源码研究
    DynamicModuleUtility对象在.net不同版本下的兼容性问题
    MediaWiKi简明安装与配置笔记
  • 原文地址:https://www.cnblogs.com/micr067/p/12323237.html
Copyright © 2011-2022 走看看