Skip to content

Added ymls for setupupc.exe and xpsrchvw.exe#498

Merged
wietze merged 12 commits into
LOLBAS-Project:masterfrom
karminang:master
Jun 15, 2026
Merged

Added ymls for setupupc.exe and xpsrchvw.exe#498
wietze merged 12 commits into
LOLBAS-Project:masterfrom
karminang:master

Conversation

@karminang

Copy link
Copy Markdown
Contributor

Description

setupugc.exe (Setup Unattend Generic Command Processor) can be abused to execute arbitrary commands. By modifying the registry at HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\UnattendSettings\Setup-Unattend-Settings\RunSynchronous\<N>\Path, an attacker can define a command path. When setupugc.exe is executed with a valid Windows setup pass argument (e.g., specialize), it reads the registry value and launches the specified process via CreateProcessW.

Detection

Monitor for unauthorized modifications to the UnattendSettings registry key or unexpected execution of setupugc.exe in association with setup operations.

Contribute to lolbas project by submitting a new microsoft binary named setupugc.exe (Setup Unattend Generic Command Processor) which reads command entries from HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\
UnattendSettings\Setup-Unattend-Settings\RunSynchronous\<N>\Path and executes them via CreateProcessW when invoked with a Windows setup pass argument (e.g. specialize).
@karminang karminang requested a review from a team as a code owner April 19, 2026 16:43

@karminang karminang left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made changes.

Contribute to the LOLBAS project by submitting a new Microsoft-signed binary: xpsrchvw.exe (Windows XPS Viewer).

xpsrchvw.exe is vulnerable to DLL search order hijacking. When copied from C:\Windows\System32\ to a user-writable directory and executed, it resolves DLLs from its application directory before falling back to System32. Placing a malicious WINMM.dll in the same directory as the copied binary causes it to be loaded and executed under the context of the Microsoft-signed process, allowing an attacker to proxy code execution and mask process parentage.

This technique requires only User-level privileges and abuses legitimate Windows DLL resolution behaviour (MITRE T1574.001). A proof-of-concept demonstrating DLL construction for this sideload is available at: https://github.com/karminang/poc/blob/main/x64-sideload-DLL-WINMM.py
@karminang karminang changed the title Create setupupc.yml Added ymls for setupupc.exe and xpsrchvw.exe Apr 20, 2026

@wietze wietze left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey I removed xpsrchvw as it doesn't meet the requirements for this project (because it involves DLL Hijacking that requires relocation of the binary in question).
setupupc does, despite requiring a registry change - I did restructure the file somewhat and added the required tag.

Thanks for contributing

@wietze wietze merged commit 6985f2a into LOLBAS-Project:master Jun 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants