Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

DCOMPotato

> 编程语言
Open source

Some Service DCOM Object and SeImpersonatePrivilege abuse.

370 stars0 likes0 views
WebsiteGitHub

About

Some Service DCOM Object and SeImpersonatePrivilege abuse.

Exploit collection for some Service DCOM Object local privalege escalation vulnerability(by SeImpersonatePrivilege abuse)

writeup

DCOM use RPC_C_IMP_LEVEL_IDENTIFY as default impersonation level, for the default out-bound IUnknown call, see . Of course, COM Server can override by call CoInitializeSecurity explicitly.

We known most windows service register their DCOM Server to provide features, Shared Process Service was hosted by svchost, read the default impersonation level from registry.

If we pass a malicious IUnknown object as parameter at some DCOM call, service process will call IRemUnknown::RemQueryInterface/RemRelease/RemAddref on the ProxyObject, now we can got a SecurityImpersonation token by CoImpersonateClient because we are DCOM Server at this time.

Follow was the explicit setting ImpersonationLevel as RPC_C_IMP_LEVEL_IMPERSONATE in default installation:

#after 12r2
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost\print@ImpersonationLevel

#2022 only
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Svchost\McpManagementServiceGroup@ImpersonationLevel

The services are PrinterNotify and McpManagementService, running as SYSTEM.

build

Note this code was supports x64 and NetFX 4.x only, but you can do a little change for FX2.0/x86 compatibility(IUnknown vtbl hook, see McpManagementPotato).

bash
csc /unsafe PrinterNotifyPotato.cs
csc /unsafe McpManagementPotato.cs

usage

bash
McpManagementPotato/PrinterNotifyPotato 

Thanks for UnmarshalPwn!

(and love my cat, Vanilla, can someone make it nekogirl?)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

C#

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言