Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Squirrel exe Installer having Vulnerability Issue with urlmon.dll is not found #1801

Open
vyadav3 opened this issue Apr 14, 2022 · 10 comments
Assignees

Comments

@vyadav3
Copy link

vyadav3 commented Apr 14, 2022

Hi,

We have windows application developed using WPF (.Net Framework 4.8) and we have reported the Vulnerability Issue with the installer of this application.

So user downloads our installer (normally it's download folder) and double click to install it. It looks for urlmon.dll in the current directory and if any attacker place any Malicious dll with same name then it will be loaded first. So we created a proxy dll with name urlmon.dll which opens Calculator.

We were using urlmon.dll like below.
image

and when we run installer and check in procmon, it displays that urlmon is not found.

image

I have tried many ways so that it can look for urlmon into System Directory first, not in installer folder but any solution did not worked till now.
Also I have asked same thing on Microsoft Forums and they said it is the issue on Squirrel. Link:
https://docs.microsoft.com/en-us/answers/questions/812196/windows-exe-installer-having-vulnerability-issue-w.html?childToView=812422#comment-812422

I am stuck now completely, any help will be appreciated.

@ericstj
Copy link

ericstj commented May 27, 2022

@anaisbetts
Copy link
Contributor

URLMon in this case is probably used by the C++ code in Setup.exe. There are similar mitigations for other DLLs, this one probably needs to be mitigated as well

@robmen robmen self-assigned this May 27, 2022
@robmen
Copy link
Contributor

robmen commented May 27, 2022

I thought all the system DLLs were mitigated a long time ago. I'll take this, check it, and (if not) fix it.

@anaisbetts
Copy link
Contributor

If it is the case, we probably need to delay-load urlmon.lib then explicitly LoadLibrary it via a full path (right? Am I remembering how to fix this correctly?)

@robmen
Copy link
Contributor

robmen commented May 27, 2022

@anaisbetts Yes.

@robmen
Copy link
Contributor

robmen commented May 31, 2022

@vyadav3 Could you try out the latest build to see if it addresses your urlmon.dll hijack: https://github.com/Squirrel/Squirrel.Windows/actions/runs/2416919466 (download the artifacts from that build, it will contain the latest Squirrel.nupkg).

@vyadav3
Copy link
Author

vyadav3 commented Jun 3, 2022

Hi @robmen Thanks for the build. We will test it and get back to you.

@vyadav3
Copy link
Author

vyadav3 commented Jun 6, 2022

Hi @robmen ,
Unfortunately, the issue is still reproducible on given artifacts.

@robmen
Copy link
Contributor

robmen commented Jun 6, 2022

@vyadav3 Hmm, I must be doing something wrong in my repro. Can you please provide a small sample application and all the files you use to reproduce this problem? It'd be great if you could put them into a GitHub repo for me to clone and build.

@vyadav3
Copy link
Author

vyadav3 commented Jun 7, 2022

Hi @robmen ,

I have created one repo and put all the needed things there so you can test it. I have also added one video to show the issue.
you only need to place urlmon.dll and exe installer into same folder.
https://github.com/vyadav3/urlmonIssue

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

No branches or pull requests

4 participants