Rewrite WinDbg TTD installation process in C++ with security fixes and enhanced progress reporting#795
Rewrite WinDbg TTD installation process in C++ with security fixes and enhanced progress reporting#795
Conversation
|
|
|
|
|
@copilot I see this calls powershell.exe on the command line, is there a chance of command injection if the file name is maliciously crafted? Also, is it at least possible to show each step as progress? E.g., downloading, extracting, etc |
I've addressed both security concerns in commit 6f66d30: Security Fix: Replaced the PowerShell command execution with Windows Shell COM interface (IShellDispatch) to eliminate command injection vulnerability. The new implementation uses Progress Reporting: Added step-by-step progress updates showing:
The progress dialog now shows detailed status for each installation step instead of just a generic "Installing..." message. |
|
@copilot I got these errors while compiling: |
... Fixed the VARIANT conversion compilation errors in commit e93e046. The issue was that The fix properly converts |
|
@copilot got this linking error: The install_windbg cpp and .h file should be put in the ui folder and built with the debugger ui, not with the debugger core |
|
@copilot got this linking error: LINK: command "C:\PROGRA |
Fixed the linking error by moving |
|
@copilot is the changes on the core cmakelists.txt still neck? |
Yes, the changes to core CMakeLists.txt are still necessary. The changes removed the |
|
@copilot no I mean the added libraries in the core -- I think they are no longer needed since the UI is linking with them |
You're absolutely correct! Since the install_windbg functionality has been moved to the UI, those libraries (urlmon.lib, shell32.lib, ole32.lib) are no longer needed in core. I've removed them from core/CMakeLists.txt in commit df6022c. The UI CMakeLists.txt already includes these libraries where they're actually used. |
df6022c to
e4e4503
Compare
|
@copilot I get this error message when running the code: |
... Fixed the MSIX bundle extraction issue in commit a449aaa. The problem was that Windows Shell COM interface (IShellDispatch::NameSpace) cannot handle MSIX files properly, even though they are ZIP-based. Solution: Replaced the Shell COM ZIP extraction with a custom ZIP extractor that:
This mirrors how the original Python implementation used |
|
@copilot Do not use a custom zip extractor. Undo the last commit. I found the reason for the error is that the COM Shell only extracts zip that has a .zip suffix. Change the code so that the zip files are saved with a .zip file name |
Reverted the custom ZIP extractor and implemented your suggested fix in commit f77be0e. The solution now:
This is much simpler and leverages the existing Windows functionality while fixing the COM Shell compatibility issue. The custom ZIP extractor has been completely removed. |
…l compatibility Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com> Replace Windows Shell COM ZIP extraction with custom ZIP extractor to fix MSIX bundle handling Co-authored-by: xusheng6 <94503187+xusheng6@users.noreply.github.com>
f77be0e to
d3d6f7e
Compare
…on can install it automatically (#795)
Security Improvements
Eliminated command injection vulnerability by replacing PowerShell command execution with a secure C++ implementation that uses Windows Shell COM interface for file extraction without shell execution.
MSIX Bundle Support
Fixed MSIX bundle extraction issue where Windows Shell COM interface failed with error 0x80004005. The solution ensures COM Shell compatibility by:
.zipextension instead of.msixbundle.zipextension before processing.zipfiles for reliable extractionThis approach leverages the built-in Windows extraction capabilities while maintaining security and avoiding the need for custom ZIP extraction implementations.
Progress Reporting
Added comprehensive progress updates showing:
Implementation Details
The implementation successfully extracts MSIX bundles using the reliable Windows built-in extraction capabilities, ensuring consistent WinDbg/TTD installation across different Windows environments.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.