James Forshaw has contributed significant research on Windows privilege escalation and process manipulation, particularly through COM/DCOM and token impersonation techniques. While his work doesn't explicitly focus on spawning applications from system-level processes, several key findings enable such capabilities:
Token Impersonation for Interactive Processes
In his analysis of process resurrection vulnerabilities ([4]), Forshaw demonstrated how to spawn interactive processes on the current desktop using system-level tokens. The technique involves:
- Token duplication: Copying the system token and modifying its session ID to match the active console session.
- Desktop redirection: Specifying
WinSta0\Default as the desktop to ensure visibility on the user’s interactive session.
- Process creation: Using
CreateProcessAsUser to execute commands like cmd.exe with the modified token.
Example code snippet from his research:
SetTokenInformation(hToken, TokenSessionId, &sessionId, sizeof(sessionId));
startInfo.lpDesktop = L"WinSta0\\Default";
CreateProcessAsUser(hToken, nullptr, cmdline, nullptr, nullptr, FALSE,
NORMAL_PRIORITY_CLASS | CREATE_NEW_CONSOLE, nullptr, nullptr, &startInfo, &procInfo);
This method bypasses traditional elevation prompts and executes commands in the user’s visible desktop context[4].
COM/DCOM Abuse for Privilege Escalation
Forshaw’s work on trapped COM objects ([12][13]) revealed how attackers can manipulate DCOM components to execute code in privileged processes. Key insights include:
- DCOM activation: Instantiating COM classes (e.g.,
MMC20.Application) via CLSID without explicit permissions, enabling code execution in system services.
- Marshaled interfaces: Exploiting interfaces like
IDispatch to inject .NET code into protected processes (e.g., WaaSMedicSvc), bypassing Protected Process Light (PPL) protections.
While not directly spawning applications, these techniques enable code execution in system contexts, which can indirectly achieve similar goals through process creation APIs.
Symlink Attacks and Process Hijacking
Forshaw’s earlier work with FortiGuard Labs ([1]) highlighted vulnerabilities in Windows services (e.g., NcaSvc.dll) that allowed process creation hijacking via symbolic links. Attackers could redirect privileged processes to execute malicious payloads, though this required file system access.
Practical Applications
Forshaw’s research tools and methodologies (e.g., OleView.NET ([8][10])) have been instrumental in discovering DCOM vulnerabilities. His focus on token manipulation and COM internals provides foundational techniques for spawning processes in elevated contexts, even if not explicitly documented as such in his publications.