惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

aimingoo的专栏
aimingoo的专栏
Engineering at Meta
Engineering at Meta
有赞技术团队
有赞技术团队
博客园_首页
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
G
Google Developers Blog
Blog — PlanetScale
Blog — PlanetScale
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
Y
Y Combinator Blog
B
Blog
The GitHub Blog
The GitHub Blog
M
MIT News - Artificial intelligence
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Stack Overflow Blog
Stack Overflow Blog
C
Check Point Blog
Microsoft Azure Blog
Microsoft Azure Blog
D
DataBreaches.Net
I
InfoQ
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
腾讯CDC
H
Help Net Security

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Deep inside the COM: Reading Windows ROT Without Asking P...
Pastukhov Al · 2026-05-11 · via DEV Community

This is Part 4 of the "Inside the Running Object Table" series. Parts 1-3 covered the public COM API and rpcss internals. This one is about going further & getting it wrong several times before getting it right.

## The goal

GetRunningObjectTable() returns 15 entries on my machine. We wanted to read the same table without calling that function at all, directly from rpcss memory. Without ole32 & ALPC. Raw ReadProcessMemory.

The motivation: the public API filters. AppContainer entries disappear. Security policy silently drops others. We wanted the unfiltered view.

Simple idea. But suddenly aint simple path.

## Phase 1. Ghidra and the structure hunt

We opened rpcss.dll in Ghidra, loaded the PDB from Microsoft's symbol server, and searched for ROT in the Symbol Table.

CScmRotEntry::GetAllowAnyClient
CScmRotEntry::GetProcessID
CScmRotEntry::IsValid
CScmRotMgotEntryBase::CScmRotMgotEntryBase

Enter fullscreen mode Exit fullscreen mode

Aint CROTEntry. CScmRotEntry. SCM: Service Control Manager. The ROT is wired into the service layer at a level the documentation never mentions.
Me just reverse-engineered the full structure from constructors alone. Constructors are better than documentation - every field gets initialized with its exact offset. Two hours of reading decompiled C later, discovered:

struct CScmRotMgotEntryBase {
    void            *vtable;        // +0x00
    longlong        *pNext;         // +0x08  linked list
    DWORD            dwRefCount;    // +0x10
    tagInterfaceData *pIFaceData;   // +0x18
    _MnkEqBuf       *pMnkEqBuf;    // +0x20  moniker comparison buffer
    CToken          *pToken;        // +0x28  integrity level token
    ushort          *pwszName;      // +0x30  display name
};
struct CScmRotEntry : CScmRotMgotEntryBase {
    DWORD  dwMagic;      // +0x50  = 0x746F7263 = "crot"
    DWORD  dwROTFlags;   // +0x68  bit 1 = AllowAnyClient
};

Enter fullscreen mode Exit fullscreen mode

The magic signature "crot" at +0x50 was a gift. The hash table: 251 buckets, rolling hash (hash * 3 ^ byte) % 0xFB.
We also found gpscmrot - the global pointer to the CScmRot object, at Ghidra address 0x180161270. RVA: 0x161270.
Now had a map. Time to read the territory.

## Phase 2. The RVA that lied
With SeDebugPrivilege and ReadProcessMemory, opened the svchost hosting rpcss.dll and read the gpscmrot slot:
First hit: u"ROTFlags" at 0x180136070. One xref. Inside a very large function. But the Symbol Table itself gave us the real prize:
rpcssBase + 0x161270 → 0x0000000000000000

NULL. Every time. On a live system with 15 ROT entries visible via ole32.
Dumped 64 bytes around the address. The slot was genuinely zero. gpProcessList - also zero. gScmMgot - zero.
Spent time scanning every memory region in rpcss for the "crot" magic. MEM_PRIVATE. MEM_MAPPED. All regions. Zero results. We searched for L"Personal-Monikers" across every svchost process. Nothing.
At this point the honest assessment was: we don't know where the data is.

## Phase 3. The LOAD/STORE revelation
Then came the constructor analysis of CScmRot::Register. In Ghidra's
write-site xref listing:

1800ffe77: MOV qword ptr [gpscmrot], RSI   ← STORE

Enter fullscreen mode Exit fullscreen mode

The instruction that writes gpscmrot is a STORE: mov [mem], reg.
Our behavioral scorer was built to find LOAD instructions: mov reg, [rip+disp].
We had been hunting in the right neighborhood but looking at the wrong side of the street. The constructor writes to gpscmrot. The functions that use it read from it. The scorer finds readers, not writers.
So when the scorer found a candidate at 0x160DE8 instead of 0x161270, it was not wrong , it found a different global, one that functions read from with the same CScmRot usage pattern. Two different addresses. Both valid entry points into the same object graph.

instruction VA:  0x1800ffe77
next RIP:        0x1800ffe7e
displacement:    0x000613f2
gpscmrot slot:   0x1800ffe7e + 0x613f2 = 0x180161270  ✓

Enter fullscreen mode Exit fullscreen mode

The math was right all along. The object just happened to be NULL in the svchost we were reading.

## Phase 4, Two svchosts, one ROT
rpcss.dll was loaded in two different svchost processes.
EnumProcesses returns processes in an unspecified order. We were consistently landing in the svchost where rpcss was loaded but the ROT was not yet initialized, a secondary instance handling a different service role.
The fix: check whether gpscmrot is non-null before committing to a process.

DWORD_PTR slotAddr = rpcssBase + RVA_GPSCMROT;
DWORD_PTR pScmRot = 0;
if (ReadPtr(hProc, slotAddr, &pScmRot) && pScmRot != 0) {
return pid; // this is the active instance
}
// null → wrong svchost, keep looking

One loop change. Suddenly everything was non-null.

Phase 5 The behavioral scorer

We built a parallel approach: find gpscmrot dynamically from binary behavior, without trusting the hardcoded RVA.

Any function managing CScmRot does all of these:

  1. Load a global pointer via mov reg, [rip+disp]
  2. Call a mutex CMutexSem2::Request
  3. Access [base + 0x30] registration counter
  4. Take address of [base + 0x38] CScmRotHintTable
  5. Take address of [base + 0x48] CScmHashTable Microsoft can rename gpscmrot. They can strip PDB symbols. They cannot remove the mutex, the counter, and the hash table without breaking COM entirely. We scored 2 points per pattern, +4 bonus for all four simultaneously.
[] Scoring 2048 functions...
[] Candidates: 407
[*] Best score: 13  slot: 0x00007FFC15460DE8
uses_lock    = true
uses_[+0x30] = true
uses_[+0x38] = true

Enter fullscreen mode Exit fullscreen mode

Score 13. Maximum possible. Found without symbols, without hardcoded addresses, from behavior alone.

CScmRot + 0x48  →  CScmHashTable
(CScmHashTable) →  bucket array (251 entries)
bucket[i]        →  CScmRotEntry
+0x50            →  "crot" magic (validate)
+0x20            →  _MnkEqBuf
_MnkEqBuf + 0x14 →  moniker name (uppercase wide string)

Enter fullscreen mode Exit fullscreen mode

The _MnkEqBuf buffer has 4 bytes size header, 12 bytes COM metadata, then the name. Final output with Office open:

[ROT][bucket 000]  C:\USERS\USER\SOURCE\REPOS\IBULDOSER\IBULDOSER.SLN
[ROT][bucket 011]  !PERSONAL-MONIKERS::STORAGEPROVIDERSEARCHHANDLER
[ROT][bucket 020]  !VISUALSTUDIO.DTE.18.0:12600
[ROT][bucket 192]  C:\USERS\USER\APPDATA...[redacted].XLAM

Enter fullscreen mode Exit fullscreen mode

[+] Total ROT entries found: 22
ole32 had shown 15. We found 22. The 7 extra entries are what the public API silently discards.

## What is the key

The LOAD/STORE distinction matters. Ghidra shows where a variable is written. Your scanner needs where it is read. These can be different globals.
NULL is not evidence of absence. Two processes loaded rpcss.dll. Only one had an initialized ROT. Always validate the pointer before committing to a process.
Behavior survives refactoring. Addresses don't. The scorer found a valid CScmRot using four behavioral signals that cannot be removed without breaking Windows COM. Hardcoded RVAs last until the next update. Behavioral signatures last until the architecture changes.

The buffer is always 16 bytes ahead of the string. A lesson in reading COM serialization formats the hard way.

## Phase 6 — Reading the table
With a valid CScmRot*, the rest was mechanical:
uses_[+0x48] = true`

The write-site calculation confirmed 0x161270:

## Code
github.com/ssteelfactor-oss/iBuldoser