references/workflow.md
GitHubWorkflow
Capture
Run the bundled watcher from an elevated PowerShell session:
powershell -NoProfile -ExecutionPolicy Bypass -File ".\scripts\Watch-InProcServer32Misses.ps1" -ProcessName Zoom -ResolveProcessName -DurationSeconds 30
The watcher polls a live ETW registry trace and prints one JSON object per matching OpenKey miss where:
Status == 0xC0000034- the path ends with
InProcServer32 - the process name matches
-ProcessNameif supplied
Each event includes the parsed Clsid and the machine-wide HKLM\SOFTWARE\Classes\CLSID\{...}\InProcServer32 default value as MachineInprocServer32.
Candidate Selection
- Keep only paths under the current user's
HKCU\Software\Classes\CLSID\{...}\InProcServer32equivalent. - Drop any event where
MachineInprocServer32is empty. - Deduplicate by
Clsid. - Test candidates one at a time from a fresh target launch.
Proxy Build
Use a local Koppeling checkout when available.
Expected pattern:
- Patch
Koppeling\Theif\main.cppso the payload only runs inside the target process. - Build the Koppeling payload DLL.
- Clone the target HKLM DLL's exports onto the payload DLL with
NetClone.
The payload used during development was calc.exe.
The codified path now is:
- Use
scripts\Build-KoppelingPayload.ps1with one or more target process names. - Let it generate
Koppeling\Theif\main.cppfromassets\theif-main-template.cpp. - Build
Theif.dll. - Restore the original
main.cpp.
HKCU Override Loop
The per-user override key is:
HKEY_CURRENT_USER\Software\Classes\CLSID\{CLSID}\InProcServer32
For each candidate:
- Read and save the existing HKCU default value and
ThreadingModel. - Set the default value to the proxy DLL path.
- Set a compatible
ThreadingModelsuch asBothif needed. - Launch a fresh target process.
- Check whether the payload fired and whether the proxy DLL loaded.
- Restore the old HKCU values, or delete the key if it did not exist before the test.
Config-Driven Runs
Prefer the manifest in assets\apps.json over inferring launch paths in chat.
Current wrappers:
scripts\Invoke-ComHijackApp.ps1scripts\Invoke-ComHijackSurvey.ps1
These wrappers:
- load the app spec from the manifest
- build a target-specific payload DLL
- run the probe script
- append results into the JSONL database