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

Security issue: DLL injection possibility #468

Open
dragetd opened this issue Nov 18, 2024 · 1 comment
Open

Security issue: DLL injection possibility #468

dragetd opened this issue Nov 18, 2024 · 1 comment
Labels
dependencies Pull requests that update a dependency file security windows specific

Comments

@dragetd
Copy link
Member

dragetd commented Nov 18, 2024

We are using andlabs/ui which is loading GTK and Cairo - all static compiled into the binary. But it loads dynamically other DLLs like write DWrite.dll or UxTheme.dll etc.

These are loaded with relative paths - so before the trivrost.exe is even loaded, it tries to find them in the current directory as well. This allows DLL dependency injection if a malicious DLL is placed there.

This is usually not the case, even in the Download directory, people to not download random DLLs. But this is still not nice.

Since this code runs before our init() or main(), we cannot change the DLL Search Path or do anything about it. Windows Manifests allow doing things with assemblies, but not simple DLLs. At least we were not able to find anything to control the DLL loading.

We exhausted all options except:

  • Using a wrapper to unpack trivrost into a clean temporary directory and run it from there if it is not at it's final path. Will cause a lot of new access problems. Rather ugly/complicated approach
  • Do not use andlabs/ui anymore but a UI library that does not load DLLs like this.

If anyone has any other idea, I'd be more than happy to hear!

@dragetd dragetd added windows specific security dependencies Pull requests that update a dependency file labels Nov 18, 2024
@dragetd
Copy link
Member Author

dragetd commented Nov 18, 2024

Internal references:
Audit: E20247032-5
TP 61500 / 63654

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file security windows specific
Projects
None yet
Development

No branches or pull requests

1 participant