Skip to content

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

Open
karminang wants to merge 6 commits intoLOLBAS-Project:masterfrom
karminang:master
Open

Added ymls for setupupc.exe and xpsrchvw.exe#498
karminang wants to merge 6 commits intoLOLBAS-Project:masterfrom
karminang:master

Conversation

@karminang
Copy link
Copy Markdown

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
Copy link
Copy Markdown
Author

@karminang karminang left a comment

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
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.

1 participant